How do I determine the fallback font for Pango?

1.8k Views Asked by At

I'm rendering some text using pangomm, but the font that I am using doesn't have glyphs for parts of the text (in this case, there is some Japanese mixed in with English). Pango seems to render the text correctly using a fallback font.

How can I determine which font is being used as the fallback?

1

There are 1 best solutions below

1
On

Actually the font selection is based on the selected Pango font backend. Mostly used (I think) is Fontconfig.

You fonts are basically always chosen by looking at the fonts Unicode coverage, meaning that Fontconfig tries to choose the font that covers the letters in the text you want to render best.

Not knowing if your problem applies to Fontconfig, I won't go into to much detail. But if so, have a look at http://www.freedesktop.org/software/fontconfig/fontconfig-user.html, especially the section on 'font matching'.

Feel free to ask again.