开发者

Determining in Java whether a particular font can render a particular character

Is there a way in Java to determine whether a pa开发者_如何转开发rticular font can render a particular character?


Try

Font f = ... ; // you have your font
Character c = 'ن'; // Nun, N, in Farsi

if(!f.canDisplay(c)) {
    int gcode = f.getMissingGlyphCode();
    System.out.format("not supported.  Glyph code used: %d\n", gcode);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜