How to prevent font-conf from using a specific font for a certain language/charset?
by david von tamar from LinuxQuestions.org on (#4H8CZ)
I'm trying to prevent font-conf from using my default font (FreeSerif) for Hebrew characters.
Except for the Hebrew characters, I'd like FreeSerif to be used as my default font for all characters.
I read this manual for font-conf, and also the following questions/articles:
Except for the Hebrew characters, I'd like FreeSerif to be used as my default font for all characters.
I read this manual for font-conf, and also the following questions/articles:
- How to match on charset?
- How to set font per Unicode range / codepoint in fontconfig?
- Configuring Per-Locale Font Selection with FontConfig
- Change Default Font for a Specific Language
- I stared into the fontconfig, and the fontconfig stared back at me
- Using the "lang" property to prepend my font of preference for Hebrew. It didn't work as intended, because if a sentence started with a non-Hebrew character then FreeSerif would be selected over the entire paragraph, despite that it may contain Hebrew characters.
- Removing the Hebrew characters directly from FreeSerif via fontforge. It didn't work quite well because my new version of FreeSerif had some weird spacing artifacts between the characters, I had no idea why and I just gave up.
- Removing the Hebrew charset range (U+0591 to U+05F4) from FreeSerif via font-conf's <match> pattern. It didn't work at all because font-conf says that "Expression doesn't take any effects for delete and delete_all" for properties like "lang" and "charset".