02.使用TTF字体
在项目的 Info.plist 中添加 Fonts provided by application 在其中填入字体文件名


可以通过下面的方式通过
fontName设置font
Last updated
Was this helpful?
在项目的 Info.plist 中添加 Fonts provided by application 在其中填入字体文件名


可以通过下面的方式通过 fontName 设置 font
Last updated
Was this helpful?
Was this helpful?
let familyNames = UIFont.familyNames
for familyName in familyNames {
print("++++++ " + familyName + " ++++++")
let fontNames = UIFont.fontNames(forFamilyName: familyName)
for fontName in fontNames {
print(fontName)
}
print("=================================")
}
return UIFont(name: "hahahahahaah", size: fontSize)!