码迷,mamicode.com
首页 > 其他好文 > 详细

e651. 列出所有可用字体

时间:2018-09-02 23:39:16      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:cse   order   nts   graph   lis   center   string   ida   font   

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. 列出所有可用字体

标签:cse   order   nts   graph   lis   center   string   ida   font   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!