LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to prevent font-conf from using a specific font for a certain language/charset? (https://www.linuxquestions.org/questions/linux-software-2/how-to-prevent-font-conf-from-using-a-specific-font-for-a-certain-language-charset-4175655768/)

Existentialist Cafe 06-15-2019 09:55 AM

How to prevent font-conf from using a specific font for a certain language/charset?
 
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:
What I've tried so far, and it didn't work:
  • 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”.

Existentialist Cafe 06-17-2019 06:09 AM

Sadly there's no option to disable a range of character from a font on fontconfig.
I had edit FreeSerif directly and remove the Hebrew characters in order to force fontconfig to use my fall-back font for Hebrew.


All times are GMT -5. The time now is 04:57 AM.