楼上的意思是因为大小写的原因?可我写了一个显示字体列表的程序:String fontNames[]=GraphicsEnvironment.getLocalGraphicsEnvironment(). getAvailableFontFamilyNames(); for(int i=0;i<fontNames.length;i++) { System.out.println(fontNames[i]); }输出的结果怎么都是大写字母开头的:Bookman Old Style Century Century Gothic Comic Sans MS Courier New Dialog DialogInput Dotum DotumChe Estrangelo Edessa Franklin Gothic Medium...
StyleName - 四种字体风格之一: plain, bold, italic, bolditalic. 总是小写。
PlatformFontName - 物理字体名:
在Windows上, 用这种形式表示:"Courier New" or "\uad74\ub9bc". "\uad74\ub9bc"查了一下是两个韩文字符。
在Solaris和Linux上, 用这种形式:"-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1".
ComponentIndex - 同样逻辑字体和风格有几种表现形式。
WindowsCharsetName - 以下Windows字符集之一: ANSI_CHARSET, DEFAULT_CHARSET, SYMBOL_CHARSET, SHIFTJIS_CHARSET, GB2312_CHARSET, HANGEUL_CHARSET, CHINESEBIG5_CHARSET, OEM_CHARSET, JOHAB_CHARSET, HEBREW_CHARSET, ARABIC_CHARSET, GREEK_CHARSET, TURKISH_CHARSET, VIETNAMESE_CHARSET, THAI_CHARSET, EASTEUROPE_CHARSET, RUSSIAN_CHARSET, MAC_CHARSET, BALTIC_CHARSET.
2.但是在WindowsCharset里好像没有所需要的,在JDK1.5的文档中查到font configuration又增加了几种支持的WindowsCharsetName,也都是unicode字符集的子集,还要再研究一下,不知道哪种行。3.JDK1.5中WindowsCharset变为了CharacterSubsetName,包括For Windows和For Solaris and Linux不同的字符集。并且去除了ComponentIndex属性,新增了Encoding,Language,Country三个属性。
getAvailableFontFamilyNames();
for(int i=0;i<fontNames.length;i++)
{
System.out.println(fontNames[i]);
}输出的结果怎么都是大写字母开头的:Bookman Old Style
Century
Century Gothic
Comic Sans MS
Courier New
Dialog
DialogInput
Dotum
DotumChe
Estrangelo Edessa
Franklin Gothic Medium...