[Fontconfig] fontconfig not recognizing Luxi Mono as monospace
alan.coopersmith at oracle.com
Wed Jun 2 17:02:26 PDT 2010
Behdad Esfahbod wrote:
> On 05/10/2010 07:13 PM, Alan Coopersmith wrote:
>> >From digging around, it seems like there's a glyph with an advance width
>> of 0 in luximr.ttf that fontconfig doesn't expect in this font which is
>> confusing it, and making it classify it as not monospaced.
>> Is this a bug in fontconfig's monospace recognition or a bug in the font?
> I'd say both. Patch welcome.
Strangely, when trying to reproduce with a freshly updated git clone, it's
now the non-bold variants with spacing=100, and the bold ones failed to match.
By inserting a printf into FcFreeTypeCharSetAndSpacingForSize and running
fc-cache from git master, it's only finding characters with an advance of
1229 in luximr.ttf & luximri.ttf, but in luximb.ttf & luximbi.ttf it finds
4 each with an advance of 1338, and one with advance of 682:
Glyph: 0x 175 Advance: 682
Glyph: 0x c4 Advance: 1338
Glyph: 0x c5 Advance: 1338
Glyph: 0x c2 Advance: 1338
Glyph: 0x c6 Advance: 1338
I'm not sure why these glyphs are different width, or what criteria fontconfig
should be using to decide they're not to be counted towards the spacing
calculation, so I can't suggest a fontconfig patch right now.
I can easily add a fonts.conf file to the X.Org fonts/bh-ttf package to override
it there though.
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the Fontconfig