UIFontDescriptor *helveticaNeueFamily =
[UIFontDescriptor fontDescriptorWithFontAttributes:
@{ UIFontDescriptorFamilyAttribute: @"Helvetica Neue" }];
NSArray *matches =
[helveticaNeueFamily matchingFontDescriptorsWithMandatoryKeys: nil];
的matchingFontDescriptorsWithMandatoryKeys:如图所示方法返回的字体描述的系统上的所有Helvetica Neue字体的字体,如HelveticaNeue,HelveticaNeue介质,HelveticaNeue-灯,HelveticaNeue薄阵列,等等。
您可以修改preferredFontForTextStyle返回的字体:应用符号特征,如粗体,斜体,展开和浓缩。您可以使用字体描述符来修改特定的特征,如清单9-2所示。
通过apple
或
这个字体,你不能直接申请引用。
,所以你可以自定义您的字体
How to use custom fonts in iPhone SDK?
你要的字体添加到您的项目,如果您使用的是自定义的字体 –
@HimanshuJoshi Helvetica Neue字体薄已经捆绑在iOS中(至少7)。 –
请检查此: - http://stackoverflow.com/questions/19527962/what-happened-to-helveticaneue-italic-on-ios-7-0-3 –