Google
 
Web itpro-blogger.blogspot.com
土曜日, 7月 01, 2006

[Java]フォント

▼問題
フォント名を知るにはどうすればいいの?

▼回答
次のコードを実行すれば分かるよ。
String FontNames[] = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
for (int i = 0 ; i < FontNames.length ; i++) {
System.out.print(FontNames[i] + "\n");
}

■結果
Arial
Arial Black
Arial Narrow
Book Antiqua
Bookman Old Style
Century
Century Gothic
Comic Sans MS
Courier New
Default
Dialog
dialog.plain
DialogInput
dialoginput.plain
Garamond
Georgia
Haettenschweiler
HGP創英角ゴシックUB
HGP創英角ポップ体
HGPゴシックE
HGS創英角ゴシックUB
HGS創英角ポップ体
HGSゴシックE
HG丸ゴシックM-PRO
HG創英角ゴシックUB
HG創英角ポップ体
HG正楷書体-PRO
HGゴシックE
Impact
Lucida Bright
Lucida Console
Lucida Sans
Lucida Sans Typewriter
Lucida Sans Unicode
Marlett
Microsoft Sans Serif
Monospaced
monospaced.plain
Monotype Corsiva
MS Outlook
MS UI Gothic
Myriad Condensed Web
Myriad Web
Myriad Web Pro
Myriad Web Pro Condensed
OCRB
Palatino Linotype
SansSerif
sansserif.plain
Serif
serif.plain
Symbol
Tahoma
Times New Roman
Trebuchet MS
Verdana
Webdings
Wingdings
Wingdings 2
Wingdings 3
MS ゴシック
MS 明朝
MS Pゴシック
MS P明朝






Comments: コメントを投稿

<< Home

This page is powered by Blogger. Isn't yours?