[Fontconfig] How can a font be blacklisted for some scripts
Nicolas Mailhot
nicolas.mailhot at laposte.net
Sat Jun 10 04:02:51 PDT 2006
Hi,
I'm running in the following problem. I am the Fedora Extras packager of
DejaVu, a FOSS family of typefaces with monthly releases and fast pace
of change.
Due to its FOSS nature and release early, release often process at one
point of time the fonts may not be suitable for intensive use with some
scripts. Moreover when unicode blocks are shared between scripts which
have different conventions on how the glyphs may be drawn, only one
script can be accommodated right now (even if both variants of the
glyphs are present in the font, as is the case today for Russian
cyrillic vs balkan cyrillic and may be in the future for Arabic vs
Farsi).
So I need to provide an optional way to blacklist these fonts with some
scripts in fontconfig. Optional because we do need users to test and
report on unfinished blocks, and while splitting the fonts by unicode
blocks would be possible, it would be a nightmare from packaging and
user font management point of views. I absolutely refuse to be
responsible for DejaVu-script variants as we had Foo-encoding variants
in the bad old pre-unicode pre-fontconfig days, and have users manually
combine them in documents because the font tools are too dumb to do font
management transparently.
Moreover users of the more mature blocks are very happy with the fonts
and are lobbying to make it the default in various distribution (at the
Sans... aliases level).
Thanksfully Fedora Devel sports fontconfig 2.3.95 so dropping files
in /etc/fonts/conf.d is a possibility. The question right now is what to
put in the conf files. I'm afraid fontconfig documentation is somewhat
esoteric for people not working with it every days, and I couldn't find
a clean example of what we want on the net.
To blacklist the font with some scripts the following snippets have been
proposed :
===============
<match>
<test name="lang">
<string>fa</string>
</test>
<edit name="family" mode="prepend" binding="same">
<string>Roya</string>
</edit>
</match>
===============
===============
<match>
<test name="lang"><string>fa</string></test>
<test name="family"><string>DejaVu Sans</string></test>
<edit name="family" mode="assign" binding="same">
<string>Roya</string>
</edit>
</match>
===============
Which ones will work best ? Are there better way to do it ?
To make DejaVu the default in aliases I've been
processing /etc/fonts/fonts.conf via xslt so far it works but is a tad
complex maybe now there is a way to do it by dropping a file in conf.d ?
Regards,
--
Nicolas Mailhot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Ceci est une partie de message
=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060610/5d4a187b/attachment.pgp
More information about the Fontconfig
mailing list