zoukankan      html  css  js  c++  java
  • java获取本机所有可用字体

    <span style="font-size:18px;">//just for fun,那个28个字母的函数满满都是恶心
    
    import java.awt.GraphicsEnvironment ;
    class Tester
    {
       public static void main(String args[])
       {
          GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
          String forName[] = ge.getAvailableFontFamilyNames();           //好长的api、、、、
          for(int i=0;i<forName.length;i++)
          {
             System.out.println(forName[i]);
          }
       }
    }</span>



    //我的电脑运行结果,所有可用字体

    Aharoni
    Andalus
    Angsana New
    AngsanaUPC
    Aparajita
    Arabic Typesetting
    Arial
    Arial Black
    Batang
    BatangChe
    Browallia New
    BrowalliaUPC
    Calibri
    Calibri Light
    Cambria
    Cambria Math
    Candara
    Comic Sans MS
    Consolas
    Constantia
    Corbel
    Cordia New
    CordiaUPC
    Courier New
    DaunPenh
    David
    DFKai-SB
    Dialog
    DialogInput
    DilleniaUPC
    DokChampa
    Dotum
    DotumChe
    Ebrima
    Estrangelo Edessa
    EucrosiaUPC
    Euphemia
    Franklin Gothic Medium
    FrankRuehl
    FreesiaUPC
    Gabriola
    Gautami
    Georgia
    Gisha
    Gulim
    GulimChe
    Gungsuh
    GungsuhChe
    Impact
    IrisUPC
    Iskoola Pota
    JasmineUPC
    Kalinga
    Kartika
    Khmer UI
    KodchiangUPC
    Kokila
    Lao UI
    Latha
    Leelawadee
    Levenim MT
    LilyUPC
    Lucida Bright
    Lucida Console
    Lucida Sans
    Lucida Sans Typewriter
    Lucida Sans Unicode
    Malgun Gothic
    Mangal
    Marlett
    Meiryo
    Meiryo UI
    Microsoft Himalaya
    Microsoft JhengHei
    Microsoft New Tai Lue
    Microsoft PhagsPa
    Microsoft Sans Serif
    Microsoft Tai Le
    Microsoft Uighur
    Microsoft Yi Baiti
    MingLiU
    MingLiU-ExtB
    MingLiU_HKSCS
    MingLiU_HKSCS-ExtB
    Miriam
    Miriam Fixed
    Mongolian Baiti
    Monospaced
    MoolBoran
    MS Gothic
    MS Mincho
    MS PGothic
    MS PMincho
    MS UI Gothic
    MT Extra
    MV Boli
    Narkisim
    Nyala
    Palatino Linotype
    Plantagenet Cherokee
    PMingLiU
    PMingLiU-ExtB
    Raavi
    Rod
    Sakkal Majalla
    SansSerif
    Segoe Print
    Segoe Script
    Segoe UI
    Segoe UI Light
    Segoe UI Semibold
    Segoe UI Symbol
    Serif
    Shonar Bangla
    Shruti
    Simplified Arabic
    Simplified Arabic Fixed
    SimSun-ExtB
    Sylfaen
    Symbol
    Tahoma
    Times New Roman
    Traditional Arabic
    Trebuchet MS
    Tunga
    Utsaah
    Vani
    Verdana
    Vijaya
    Vrinda
    Webdings
    Wingdings
    仿宋
    宋体
    微软雅黑
    新宋体
    方正兰亭超细黑简体
    楷体
    黑体

  • 相关阅读:
    Java DB 访问(三)mybatis mapper interface接口
    android stdio 安装后gradle 编译失败,设置代理不管用
    超星自动签到并邮件通知
    关于解决Mac使用docker安装SQL server for Linux 中文乱码问题
    Bom简单介绍
    grid-layout
    Position
    前端学习(注册表)
    关于学精通一门语言的个人看法(欢迎留言补充)
    Google 最新推出数据集搜索
  • 原文地址:https://www.cnblogs.com/emoji/p/4436799.html
Copyright © 2011-2022 走看看