[iPhone] 系統內置字型清單 System Fonts Available List

chowky 當develop 的過程找到一個問題,就是的字型有何choices? 當然中文就完全沒有choice。只得一種字型。

但英文字型就有不少的choices.

這是styling 上必定會遇到的問題。

不過問題是documentation 沒有提及,所以就有developer dump 了一個清單。(當然自己都可以在Interface builder 看都可以看到的。

如果只是想改font size 就很簡單,用法是

UIFont *mainTitleFont = [UIFont boldSystemFontOfSize:14.0];
UIFont *subTitleFont = [UIFont SystemFontOfSize:14.0];
UIFont *textFont = [UIFont italicSystemFontOfSize:12.0];

如果,你的做法不只一個的呢….就要自己create 一個object 呢

UIFont *altFont = [UIFont fontWithName:@”Courier-Bold” size:14.0];

以下的coding 就是dump 所有的fonts
// List all fonts on iPhone
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]];
NSArray *fontNames;
NSInteger indFamily, indFont;
for (indFamily=0; indFamily<[familyNames count]; ++indFamily)
{
NSLog(@”Family name: %@”, [familyNames objectAtIndex:indFamily]);
fontNames = [[NSArray alloc] initWithArray:
[UIFont fontNamesForFamilyName:
[familyNames objectAtIndex:indFamily]]];
for (indFont=0; indFont<[fontNames count]; ++indFont)
{
NSLog(@” Font name: %@”, [fontNames objectAtIndex:indFont]);
}
[fontNames release];
}
[familyNames release];

Using the iPhone SDK v2.1, the resulting output was as follows.

Family name: Hiragino Kaku Gothic ProN W3
Font name: HiraKakuProN-W3
Family name: Courier
Font name: Courier
Font name: Courier-BoldOblique
Font name: Courier-Oblique
Font name: Courier-Bold
Family name: Arial
Font name: ArialMT
Font name: Arial-BoldMT
Font name: Arial-BoldItalicMT
Font name: Arial-ItalicMT
Family name: STHeiti TC
Font name: STHeitiTC-Light
Font name: STHeitiTC-Medium
Family name: AppleGothic
Font name: AppleGothic
Family name: Courier New
Font name: CourierNewPS-BoldMT
Font name: CourierNewPS-ItalicMT
Font name: CourierNewPS-BoldItalicMT
Font name: CourierNewPSMT
Family name: Zapfino
Font name: Zapfino
Family name: Hiragino Kaku Gothic ProN W6
Font name: HiraKakuProN-W6
Family name: Arial Unicode MS
Font name: ArialUnicodeMS
Family name: STHeiti SC
Font name: STHeitiSC-Medium
Font name: STHeitiSC-Light
Family name: American Typewriter
Font name: AmericanTypewriter
Font name: AmericanTypewriter-Bold
Family name: Helvetica
Font name: Helvetica-Oblique
Font name: Helvetica-BoldOblique
Font name: Helvetica
Font name: Helvetica-Bold
Family name: Marker Felt
Font name: MarkerFelt-Thin
Family name: Helvetica Neue
Font name: HelveticaNeue
Font name: HelveticaNeue-Bold
Family name: DB LCD Temp
Font name: DBLCDTempBlack
Family name: Verdana
Font name: Verdana-Bold
Font name: Verdana-BoldItalic
Font name: Verdana
Font name: Verdana-Italic
Family name: Times New Roman
Font name: TimesNewRomanPSMT
Font name: TimesNewRomanPS-BoldMT
Font name: TimesNewRomanPS-BoldItalicMT
Font name: TimesNewRomanPS-ItalicMT
Family name: Georgia
Font name: Georgia-Bold
Font name: Georgia
Font name: Georgia-BoldItalic
Font name: Georgia-Italic
Family name: STHeiti J
Font name: STHeitiJ-Medium
Font name: STHeitiJ-Light
Family name: Arial Rounded MT Bold
Font name: ArialRoundedMTBold
Family name: Trebuchet MS
Font name: TrebuchetMS-Italic
Font name: TrebuchetMS
Font name: Trebuchet-BoldItalic
Font name: TrebuchetMS-Bold
Family name: STHeiti K
Font name: STHeitiK-Medium
Font name: STHeitiK-Light

Source: http://ajnaware.wordpress.com/2008/10/24/list-of-fonts-available-on-the-iphone/

Share
About Chowky
Chowky 希望可以透過這個blog 來分享自己學到的知識。亦希望可以分享最新的資訊。 IT 轉變得很快,要常常留意市場的變化,面對大陸的競爭,香港的 IT 方面的人才要更有市場觸覺,緊貼市塲走勢。因為其他地方的IT技術已經走得比以往更快。不進則退,就讓大家一起來交流、提昇IT的心得! Chowky 因為工作關係,所以一開始接觸的是visual basic, foxpro ( 這不代表我老 ) 之後是 .NET, MSSQL 和 Crystal Report. 由工作學到的project management, system analysis and design 以及 system testing, user acceptance tests and different documentations. 另外,由不同的freelance 方面學到dreamweaver, javascript, php, mysql. 後來興起CMS wave, Chowky 亦學會了Joomla! 以及常用的javascript framwork: jquery and mootool. 連deisgn 都要自己包辦,所以接觸了photoshop, illustrator, firework. 新的工作方面,要利用RIA -- Flex and AIR 方面的技術。所以緊接下來應該會多一點分享ria 方面的技術 Chowky 所說的未必是對的,但我深信我所說的是未來 IT Trend. 大家亦應抱著懷疑的態度去分析每一件事,未經思考不要輕易相信。

No Comments, Be The First!

Leave a Reply