[Fontconfig] How can a font be blacklisted for some scripts

Nicolas Mailhot nicolas.mailhot at laposte.net
Mon Jun 12 12:11:24 PDT 2006


Le lundi 12 juin 2006 à 11:24 -0700, Jay Hobson a écrit :
> Nicolas,
> 
> I think that I have a solution that will work for you.

First, thank you a lot for trying to help.

> As part of a 
> seperate problem that I was trying to solve, I came up with restricting 
> some languages from particular fonts

> ...

> I have included the diffs file for fontconfig 2.3.2, and an example of 
> the entries needed in fonts.conf. Since it is possible for a font to 
> appear in more than one alias, such as Chinese, Japanese and Korean 
> fonts, etc, it may be necessary to distinguish which alias the 
> restriction is for, such as restricting Sans Serif English characters in 
> a Chinese font from the Serif alias.

So if I read the config sample correctly, you're essentially
whitelisting some languages when a font is evaluated in the context of
an alias, right?

Will it work if the font is part of a prefer list?

Could it be changed to blacklisting the languages you don't want instead
of whitelisting the languages you want ? (or maybe I don't understand
your restrict - I read it like a restrict to, but maybe it's actually a
hide)?

> <alias>
>         <family>Serif</family>
>         <restrict>
>                 <family>Lucida Bright</family>
>                 <lang>en</lang>
>                 <lang>de</lang>
>         </restrict>
> </alias>
> <alias>
>         <family>Monospace</family>
>         <restrict>
>                 <family>Arial</family>
>                 <lang>en</lang>
>         </restrict>
> </alias>
> 
> Hope this solves your problem. Let me know. If it does, then I'll work 
> with you to get it into the open-source fontconfig.

This is really much cleaner and closer to what we want to achieve than
my current hack.

I'll check if you patch applies to Fedora Devel fontconfig (2.3.95
based) and I'll report the results now.

Thank you for this positive contribution!

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/20060612/f93b5b8a/attachment.pgp


More information about the Fontconfig mailing list