Default Fonts - How they're chosen

2

1

My desktop environment is GNOME 2.30.2. I'm not sure if this question is GNOME-specific.

I know that going to System->Preferences->Appearance->Fonts will let me set the default fonts for various areas. For example, my "Window title font" is Sans bold of size 10. However, I also know that the Sans font does not contain all of the characters in, say the Basic Multilingual Plane. Therefore if I go to a site such as http://www.google.com.hk/imghp?hl=zh-tw&tab=wi and I do not have the proper fonts installed, the Window title will contain box characters.

My question is, if I DO have the proper fonts installed, how does the system choose which font to use for the characters that are not in Sans? For example I could have ten fonts that have the appropriate characters in them - which one is chosen?

Thanks in advance.

kaykun

Posted 2010-11-23T20:20:18.037

Reputation: 163

Answers

1

Fontconfig does the appropriate font substitutions based on both font properties and on substitution tables written in XML in /etc/fonts or a similar directory.

Ignacio Vazquez-Abrams

Posted 2010-11-23T20:20:18.037

Reputation: 100 516

I know that if I have a font called "VL Gothic" installed, then it will appear on the window title to replace certain characters that Sans doesn't have. However running grep "gothic" .conf in /etc/fonts comes up with no results. – kaykun – 2010-11-23T21:28:56.797

Did you pass -ri to grep? – Ignacio Vazquez-Abrams – 2010-11-23T21:39:53.493

It still comes up with no results with those options. And now I realize I didn't put an asterisk before the .conf in my comment, but I did include it. – kaykun – 2010-11-23T22:08:51.880

Assuming that there's no tables for it, it's using whatever logic is built into Fontconfig itself. – Ignacio Vazquez-Abrams – 2010-11-23T22:13:17.330