4

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?

cyang
  • 5,574
  • 2
  • 25
  • 34

1 Answers1

0

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.

lyager
  • 76
  • 2
  • Thanks, it has actually been a while since I've moved away from this problem, but if you can provide a definitive way (assuming the backend is Fontconfig) to find the closest font match, then I will accept your answer. – cyang Jul 27 '12 at 07:56