>|Why does QT (version 3.3.7) and hence KDE (version 3.5.5) not recognize>|Luxi Mono as a monospaced typeface, despite >| >| <alias> >| <family>Luxi Mono</family> >| <default><family>monospace</family></default> >| </alias> >| >| >| <alias> >| <family>monospace</family> >| <prefer> >| <family>Luxi Mono</family> >| </prefer> >| </alias> I may have (part of) the answer. Compare % fc-list "Luxi Mono" : family style file spacing /usr/share/fonts/luxi/luximbi.ttf: Luxi Mono:style=Bold Oblique /usr/share/fonts/luxi/luximr.ttf: Luxi Mono:style=Regular:spacing=100 /usr/share/fonts/luxi/luximb.ttf: Luxi Mono:style=Bold /usr/share/fonts/luxi/luximri.ttf: Luxi Mono:style=Oblique:spacing=100 and % fc-list "Courier" : family style file spacing /usr/share/fonts/AdobeType1/Courier-Oblique.pfb: Courier:style=Oblique:spacing=100 /usr/share/fonts/AdobeType1/Courier-BoldOblique.pfb: Courier:style=Bold Oblique:spacing=100 /usr/share/fonts/AdobeType1/Courier-Bold.pfb: Courier:style=Bold:spacing=100 /usr/share/fonts/AdobeType1/Courier.pfb: Courier:style=Regular:spacing=100 Is the lack of "spacing=100" for Bold [Oblique] significant? If so, why are Bold [Oblique] not properly tagged? Bob T.
On Fri, 2006-11-03 at 09:33 -0500, Bob Tennent wrote:> Is the lack of "spacing=100" for Bold [Oblique] significant? If so, why > are Bold [Oblique] not properly tagged?The lack of the spacing values is significant; this value is determined by examining the font and checking the spacing of each glyph; fonts where glyphs have different spacing values will not be marked as monospace <pedant>yes, the code detects dual-spacing fonts as well</pedant>. In particular, I found Type1 variants of the Luxi fonts on my machine for which even the Roman style face is not marked as monospace. Using fontconfig 2.4.1, you could override this by editing the spacing value detected in the font with the configuration file. -- keith.packard@intel.com -------------- 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/20061103/cdfd19ff/attachment.pgp
Keith Packard <keithp@keithp.com> ????????:> Using fontconfig 2.4.1, you could override this by editing the spacing > value detected in the font with the configuration file.How? The following does not work: <match target="font" > <test compare="contains" name="family" > <string>FreeMono</string> </test> <edit mode="assign_replace" name="spacing"> <const>mono</const> </edit> </match> -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ????????????? I $(0#n Unicode
On Mon, 2007-02-19 at 17:45 +0100, Mike FABIAN wrote:> Keith Packard <keithp@keithp.com> ????????: > > > Using fontconfig 2.4.1, you could override this by editing the spacing > > value detected in the font with the configuration file. > > How? > > The following does not work: > > <match target="font" >use <match target="scan"> instead -- that will let you edit the pattern that lands in the database. -- keith.packard@intel.com -------------- 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/20070219/99c8056a/attachment.pgp
Mike FABIAN
2007-Feb-21 09:12 UTC
[Fontconfig] Patch: avoid crashes is config files contain junk
If ~/.fonts.conf contains: <edit mode="assign_replace" name="spacing"> <int>mono</int> </edit> fontconfig crashes: mfabian@magellan:~$ fc-match sans Fontconfig error: "~/.fonts.conf", line 46: "mono": not a valid integer ????????????? (core dumped) mfabian@magellan:~$ Of course the above is nonsense, ?mono? is no valid integer indeed. But I think nevertheless fontconfig should not crash in that case. A patch is attached. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ????????????? I ? Unicode -------------- next part -------------- A non-text attachment was scrubbed... Name: bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.patch Type: text/x-patch Size: 374 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20070221/372ca6d1/bugzilla-246783-do-not-crash-when-config-files-contain-broken-stuff.bin
Keith Packard <keithp@keithp.com> ????????:> On Mon, 2007-02-19 at 17:45 +0100, Mike FABIAN wrote: >> Keith Packard <keithp@keithp.com> ????????: >> >> > Using fontconfig 2.4.1, you could override this by editing the spacing >> > value detected in the font with the configuration file. >> >> How? >> >> The following does not work: >> >> <match target="font" > > > use <match target="scan"> instead -- that will let you edit the pattern > that lands in the database.Thank you, that works. It is a handy workaround for some broken fonts. Recent versions of ?FreeMono? are broken. Because this is supposed to be a monospace font, all glyphs should have the same advance with (with the exception of combining characters, for them it is OK to have advance=0). But ?FreeMono? contains several glyphs which are too wide or too narrow. For details see http://bugzilla.novell.com/show_bug.cgi?id=246804 -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ????????????? I $(0#n Unicode
Frederic Crozat
2007-Aug-29 14:24 UTC
[Fontconfig] Patch: avoid crashes is config files contain junk
Le mercredi 21 f?vrier 2007 ? 18:11 +0100, Mike FABIAN a ?crit :> If ~/.fonts.conf contains: > > <edit mode="assign_replace" name="spacing"> > <int>mono</int> > </edit> > > > fontconfig crashes: > > mfabian at magellan:~$ fc-match sans > Fontconfig error: "~/.fonts.conf", line 46: "mono": not a valid integer > ????????????? (core dumped) > mfabian at magellan:~$ > > Of course the above is nonsense, ?mono? is no valid integer indeed. > > But I think nevertheless fontconfig should not crash in that case. > > A patch is attached.It seems this patch never got committed on GIT. Keith, any comment ? -- Frederic Crozat <fcrozat at mandriva.com> Mandriva