[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-fonts-devel] Defoma Hints



On 6/23/06, Paul Wise <pabs3@bonedaddy.net> wrote:
On Fri, 2006-06-23 at 00:08 +0200, Mohammed Adnène Trojette wrote:
> one of the first things I wanted to know when I started packaging fonts
> is how the hinting works in defoma. As I've adopted most of the font
> packages I have, I did change most of the hints files.

I used the utility in defoma to generate mine and then tweaked them
where they were obviously wrong.

Unfortunately, the hints in defoma don't actually have any behaviour forced on them and there is no 'lint' utility for checking them.  They are entirely a set of free-form key-value pairs that accompany the font through the defoma api and each application script does with them whatever it wants.

There are a set of 'expected' hints in the defoma-doc 'developers' documentation, but realistically you will probably need to investigate specific application scripts that aren't doing what you want and read their README.Defoma and/or read the script source to see exactly what hints it is working with.

> Does someone know any good documentation/tutorial link about this or
> could sum up what is necessary to survive.

Perhaps the defoma-hints manual page or the docs in the defoma-doc
package would help?

They are definately the best starting point.  Feel free to ask here for further help, I have been trying to scan this list every now and then looking for defoma questions.

> To give a concrete example: in ttf-arabeyes, AlMohanad is the preferred
> fonts for most applications. However, when I install the package, it
> never gets used as default (in Firefox, e.g.). More than that, if I
> install ttf-paktype, it is one of this package's fonts that gets chosen
> instead of the Arabeyes' one.

A while ago I had to read the source for defoma due to one of the
stylish fonts in ttf-khmeros being selected over the others, and I
concluded that the fontconfig support in defoma did not tell fontconfig
about defoma priorities. The stylish font was being selected purely on
the basis of filename.

fontconfig.defoma should be grouping the fonts by FontName and then picking the highest priority, since FontName is the primary selector fontconfig uses.

If your font is installed in /usr/share/fonts, its quite likely that the font is available to fontconfig both directly from /usr/share/fonts/ and via the priority-based symlink in /var/lib/defoma/fontconfig.d/, which means conflict resolution is up to whatever algorithm fontconfig uses (first found?).  Fixing this might be as simple as changing fontconfig's <dir> ordering to prefer the defoma symlinks.

(.. presuming AlMohanad does in fact have a higher defoma priority than its competitors of course.  If it doesn't and it really is the preferred font, please increase its defoma priority hint)

--
- Gus

(I didn't write defoma, I just thought the featureset was desirable enough that I didn't want to see the code die)

Reply to: