Behdad Esfahbod
2005-Nov-21 08:51 UTC
[Fontconfig] monospaced fonts and combining characters: fontconfig bug?
On Wed, 13 Jul 2005, Keith Packard wrote:> Yeah, probably. Is there a compact representation for all of the > combining characters?The Unicode General Category of the characters can tell you that. I can prepare a compact table if you need.> Or should we just permit advances of 0 for any > character? The latter would be far easier, and would follow the method > used to identify dual-spaced fonts, while the former might avoid > mis-identifying some broken fonts.I prefer the latter. Moreover, there was the discussion of monospace fonts on the OpenType list last week. Seems like according to the OpenType spec, a monospace font should have all the widths equal, no zero width allowed. Combining characters can get their width zeroed using OpenType tables. There were suggestions to change this behavior though.> -keith--behdad http://behdad.org/
Keith Packard
2005-Nov-21 08:51 UTC
[Fontconfig] monospaced fonts and combining characters: fontconfig bug?
On Wed, 2005-07-13 at 17:12 +0200, Mike FABIAN wrote:> Probably fontconfig should ignore all combining characters when > checking whether a font is monospaced.Yeah, probably. Is there a compact representation for all of the combining characters? Or should we just permit advances of 0 for any character? The latter would be far easier, and would follow the method used to identify dual-spaced fonts, while the former might avoid mis-identifying some broken fonts. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050713/43a00343/attachment.pgp
Keith Packard
2005-Nov-21 08:51 UTC
[Fontconfig] monospaced fonts and combining characters: fontconfig bug?
On Wed, 2005-07-13 at 12:45 -0400, Behdad Esfahbod wrote:> I prefer the latter. Moreover, there was the discussion of > monospace fonts on the OpenType list last week. Seems like > according to the OpenType spec, a monospace font should have all > the widths equal, no zero width allowed.Sure, but these aren''t OpenType fonts, they''re just TrueType, so there isn''t any way to set the glyphs correctly.> Combining characters > can get their width zeroed using OpenType tables. There were > suggestions to change this behavior though.I expect applications wanting monospaced fonts will mis-display these glyphs quite badly, and I''m not quite sure what to do about that; I know my text editor doesn''t expect glyphs in a monospaced font to overlap... -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050713/441a4fd6/attachment.pgp
Ming Hua
2005-Nov-21 08:51 UTC
[Fontconfig] monospaced fonts and combining characters: fontconfig bug?
On Wed, Jul 13, 2005 at 10:43:18AM -0700, Keith Packard wrote:> On Wed, 2005-07-13 at 12:45 -0400, Behdad Esfahbod wrote: > > > I prefer the latter. Moreover, there was the discussion of > > monospace fonts on the OpenType list last week. Seems like > > according to the OpenType spec, a monospace font should have all > > the widths equal, no zero width allowed. > > Sure, but these aren''t OpenType fonts, they''re just TrueType, so there > isn''t any way to set the glyphs correctly.If I am not mistaken, the discussion on the OpenType list should be inspired by the author of FontForge, who got asked about exactly this issue for TrueType fonts on FontForge list. The thread is: http://sourceforge.net/mailarchive/forum.php?thread_id=7578042&forum_id=39351 They were arguing whether a font of glyphs with only a certain width or zero width should be labelled as monospace by FontForge or not. The author of FontForge insists that it should not, and monospace font means all glyphs have the same width. I don''t know much about fonts, just to point that thread to the list, so that people with more knowledge can evaluate the opinions there. Also, a sincere thank you to the fontconfig developers. Ming, a happy Chinese Linux user 2005.07.14
Mike FABIAN
2005-Nov-21 08:51 UTC
[Fontconfig] Re: monospaced fonts and combining characters: fontconfig bug?
Keith Packard <keithp@keithp.com> ????????:> Yeah, probably. Is there a compact representation for all of the > combining characters? Or should we just permit advances of 0 for any > character? The latter would be far easier, and would follow the method > used to identify dual-spaced fonts, while the former might avoid > mis-identifying some broken fonts.Permitting advances of 0 for any character sounds like a good idea which is probably good enough for the moment. If it turns out that there are really some broken fonts which are mis-identified because of this, we could still add a list of combining characters and permit advances of 0 only for characters in that list. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ?????????????
Mike FABIAN
2005-Nov-21 08:51 UTC
[Fontconfig] monospaced fonts and combining characters: fontconfig bug?
Fontconfig fails to detect that the "FreeMono" fonts are monospaced, it doesn''t set spacing=100: mfabian@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@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@suse.de> http://www.suse.de/~mfabian ?????????????