zoukankan      html  css  js  c++  java
  • e651. 列出所有可用字体

    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
  • 相关阅读:
    11111
    单例-Singleton-03
    单例-Singleton-02
    单例-Singleton-01
    load和initialize
    OC中的static-01
    GCD-06
    GCD-05
    GCD-03
    UIView-01
  • 原文地址:https://www.cnblogs.com/borter/p/9575441.html
Copyright © 2011-2022 走看看