[Fontconfig] how to use multiple fonts?

Federic Zhang fontconfig@fontconfig.org
Tue, 04 Mar 2003 18:46:16 +0800


I am new to the Xft/FontConfig.  Today i try XftDrawStringUtf8() with
one sample program on Solaris, but encountered one problem. The program
is doing as below:

    XftOpenFont(dpy, scr, XFT_FAMILY, XftTypeString, "Sans-Serif",
                               XFT_SIZE, XftTypeDouble, 12.0, NULL);
    XftDrawStringUtf8(draw, &color, font, x, y, str, strlen(str));
    ==> the 'str' string is sequence of UTF-8 encoding, containing
                    Simplified chinese, traditional chinese and korean

After i updated the /etc/fonts/fonts.conf by adding the paths of korean,
and chinese TrueType fonts and removed the cache $HOME/.fonts.cache-1,
the program, the outstanding problems is:

              seems that it just picks ONLY one font and try to use it
to render the string
              no matter that the font can't cover all characters. So
korean character
              isn't be rendered correctly with one chinese TT font being
selected, and the ASCII
              glyph is also retrieved from the chinese TT font.

Would you please let me know what's wrong with my configuration?