microwindew True Type Fonts support
http://tw.myblog.yahoo.com/jw!GdTvlQ.YCR8E9rpahh6eqfZX9g--/article?mid=128&prev=132&next=126&l=f&fid=17
1.Set ttf font environment, if *.ttf at /tmp
export MWFONTS=/tmp
2.Load ttf font
GR_FONT_ID ttf_font;
ttf_font = GrCreateFont("kaiu", 12, NULL);
GrSetFontAttr(ttf_font, GR_TFANTIALIAS|GR_TFKERNING, 0);
3.Show ttf font
GrSetGCFont(w->gid, ttf_font);
GrText(w->wid, w->gid, 20, 20, "ABCDEFGHIJK", 8, GR_TFASCII | GR_TFTOP);
沒有留言:
張貼留言