[Fontconfig] how to use multiple fonts?
Federic.Zhang at Sun.COM
Tue Mar 4 21:46:16 EST 2003
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
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?
More information about the Fontconfig