2009-09-17 76 views

回答

1

对于您感兴趣的各字体:

bool IsFontAsian(Font font) 
{ 
    LOGFONT lf = new LOGFONT(); 
    font.ToLogFont(lf); 
    byte charSet = lf.lfCharSet; 
    return charSet == 136; // CHINESEBIG5_CHARSET -- probably also want to check others 
    // such as hangul, korean, vietnamese - it depends on what you consider 
    // "Asian" 
} 

MS文档here,看here为LOGFONT结构定义。

+0

谢谢, 但我发现一些支持CJK字符的字体会返回字符集作为DEFAULT_CHARSET,如“MS PMincho” – zunyite 2009-09-18 06:38:34

相关问题