首页 > 其他 > 详细

e651. 列出所有可用字体

时间:2018-09-02 22:44:19      阅读:178      评论:0      收藏:0      [点我收藏+]

A font family refers to a set of font faces with a related typographic design. For example, the font faces in the family Lucida Sans Typewriter might be Lucida Sans Typewriter Bold, and Lucida Sans Typewriter Regular. This example lists all available font family names.

Note: J2SE 1.4 only supports True Type fonts.

    // Get all font family names
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String fontNames[] = ge.getAvailableFontFamilyNames();
    
    // Iterate the font family names
    for (int i=0; i<fontNames.length; i++) {
    }
    // Aria
    // Comic Sans MS
    // Verdana
    // ...

 

Related Examples

e651. 列出所有可用字体

原文:https://www.cnblogs.com/borter/p/9575441.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!