Actually, I think my question is too basic, but, even after performing a deep search on internet, I still didn't understand how a browser selects a particular font for rendering a particular script on Linux systems. I know that Linux systems have fontconfig for managing font rendering in applications, but the behaviour of fontconfig is not consistent with respect to browsers. Mainly, Chromium and its derivatives don't always obey fontconfig rules. They try to select fonts on their own. On the other hand, Firefox and its derivatives have very good integration with Linux systems and they tend to obey fontconfig settings. I tried different browsers to test their behaviour and found that even we have configured rules for specific fonts in fontconfig, we still need more tweaking to get a consistent behaviour among browsers. They tend to choose their own fonts. This led me to confusion. So my questions regarding this are :
- How a browser actually selects a font as its UI font as well as font for rendering a particular script ?
- I know that we can specify fonts in CSS, but what will happen if we dont specify them ? How will browsers fallback fonts ?
- What is the role of fontconfig in terms of browsers ? Do browsers use fontconfig or something else to prioritize fonts ?
- Am I missing something ?
Please help me to clear my confusion. Any help will be appreciated.