On Mon, 2006-06-12 at 17:20 +0200, Ralf Stubner wrote:

> So where can we go to from here? I have just tested this in a sid
> pbuilder updated today. And I can still reproduce this behaviour there.
> However, on my sarge system I no longer see this behaviour! I know that
> /usr/X11R6/lib/X11/fonts/Type1/fonts.cache-1 was rebuild since then, as
> I removed some installed fonts.

As Josselin surmised, it entirely depends on the order of the fonts
within the font cache, which isn't very predictable by users. What I've
been doing of late is to try and identify 'decorative' variants of fonts
by looking at their style names for key words like 'caps' or 'shadow'.
By flagging those as decorative, and making the matching semantics
prefer non-decorative fonts, I've managed to eliminate mis-matches for
the fonts noted in this bug report. Coming up with a complete set of
decorative keywords for all fonts in the world will take somewhat longer
though.

> Is there any way to debug the creation of fonts.cache-1 files as well as
> the matching procedure based on that information? In a different
> context, I recently found that GFSDidot-Italic.pfb, which contains
> 
> /FontName /GFSDidot-Italic def
> [...]
> /FullName (GFS Didot Italic) readonly def
> /FamilyName (GFS Didot Rg) readonly def
> /Weight (Normal) readonly def
> /isFixedPitch false def
> /ItalicAngle -12 def
> 
> Is characterized as 'style=Regular' by fontconfig. Even though the only
> thing that might hint to 'Regular' is the 'Rg' in the FamilyName.
> Indeed, if I remove the Rg from there, the font is correctly recognized
> as 'style=Italic'.
> 
> Why does that happen? 

This happens as fontconfig attempts to extract the style name from the
combination of fullname and family name - when the family name is a
proper prefix of the fullname, fontconfig surmises that the remaining
portion of the fullname is the style name. Removing the 'Rg' from the
family name allows fontconfig to find 'italic' in the full name.

Note that TrueType fonts generally have far more accurate information as
their headers are more structured.

For the fonts listed here, I'll be closing this bug when I upload a
newer version of fontconfig.

-- 
[EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to