[Fontconfig] How to use different fonts for different characters?
Keith Packard
fontconfig@fontconfig.org
Wed, 30 Apr 2003 13:21:24 -0700
Around 4 o'clock on May 1, Wang WenRui wrote:
> Could you tell me how to get this work in source code? My program broke
> in this way(it just render letters only, while doesn't render any
> Chinese characters), but pango and mozilla works.
You need to use FcFontSort instead of FcFontMatch. This returns a list of
fonts in preference order; applications like pango and mozilla then search
the list of fonts for the first one supporting each character and use that
for drawing.
Xft could use some helper APIs to make this easier for applications; right
now it takes quite a bit of application code.
-keith