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 

有的字样只能加粗,没有斜体,那么表明这样的字体就不能设置为斜体了?

相关文章
相关标签/搜索