[Fontconfig] monospaced fonts and combining characters: fontconfig bug?

Mike FABIAN mfabian at suse.de
Thu Jul 14 01:12:10 EST 2005


Fontconfig fails to detect that the "FreeMono" fonts are monospaced,
it doesn't set spacing=100:

mfabian at magellan:~$ fc-list FreeMono family style spacing 
FreeMono:style=BoldOblique,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,polkrepko ležeče,Lodi etzana
FreeMono:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,polkrepko,đậm,Lodia
FreeMono:style=Medium,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,navadno,thường,Arrunta
FreeMono:style=Oblique,Cursiva,kurzíva,kursiv,Πλάγια,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,ležeče,nghiêng,Etzana
mfabian at magellan:~$

When checking why this happens, I found that the advance widths for
almost all glyphs in the "FreeMono" fonts are 600, *except* for U+0300
- U+0344 where the advance width is 0.

But all the characters in the range U+0300 - U+0344 are combining
characters and as I currently understand it, it is correct that the
advance width is 0 for combining characters.  It is like that in most
other fonts as well, for example in "Arial Unicode MS" (not
monospaced). "Courier New" is an exeption, it has the same advance
width for combining characters as for regular characters, therefore
fontconfig recognizes "Courier New" as monospaced.

Probably fontconfig should ignore all combining characters when
checking whether a font is monospaced.

Is that correct?

See also:

http://lists.gnu.org/archive/html/freefont-bugs/2003-08/msg00000.html
http://lists.gnu.org/archive/html/freefont-bugs/2003-09/msg00001.html
http://lists.gnu.org/archive/html/freefont-bugs/2003-09/msg00002.html


-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。




More information about the Fontconfig mailing list