FontFamily 和Font 的區別

在IOS中 UIfont 用來設置字體 字體

不指定,指定斜體,指定粗體: spa

UIFont *font = [UIFont systemFontOfSize:20]; code

UIFont *font = [UIFont italicSystemFontOfSize:20]; ci

UIFont *font = [UIFont boldSystemFontOfSize:20]; it

這裏默認是使用系統的字樣font-famliy

要使用其餘的字樣 im

UIFont *font = [UIFont fontWithName:@"" size:]; co

字樣來源:NSArray *fontArray = [UIFont familyNames]; 獲得的是一個NSStringArrary, background

Font Family: Arial
Font: ArialMT
Font: Arial-BoldMT 粗體
Font: Arial-BoldItalicMT粗斜體
Font: Arial-ItalicMT斜體 系統

這樣就構成了字樣+字形?

Font Family: Arial Rounded MT Bold
Font: ArialRoundedMTBold

Font Family: Arial Unicode MS
Font: ArialUnicodeMS

Font Family: Helvetica Neue
Font: HelveticaNeue
Font: HelveticaNeue-Bold 

有的字樣只能加粗,沒有斜體,那麼表明這樣的字體就不能設置爲斜體了?

相關文章
相關標籤/搜索