我正在尝试在我的应用程序中嵌入自定义字体。
我已经在我的项目中包含了字体文件
我将密钥添加到 .plist
我将字体添加到目标
的结果:
NSLog(@"Fonts: %@", [UIFont familyNames]);
Fonts: (
Thonburi,
"Snell Roundhand",
"Academy Engraved LET",
Avenir,
"Marker Felt",
"Geeza Pro",
"Arial Rounded MT Bold",
"Trebuchet MS",
Arial,
Marion,
"Gurmukhi MN",
"Malayalam Sangam MN",
"Bradley Hand",
"Kannada Sangam MN",
"Bodoni 72 Oldstyle",
Cochin,
"Sinhala Sangam MN",
"Hiragino Kaku Gothic ProN",
Papyrus,
Verdana,
"Zapf Dingbats",
"Avenir Next Condensed",
Courier,
"Hoefler Text",
Helvetica,
"Euphemia UCAS",
"Hiragino Mincho ProN",
"Bodoni Ornaments",
"Apple Color Emoji",
Optima,
"Gujarati Sangam MN",
"Devanagari Sangam MN",
"Times New Roman",
Kailasa,
"Telugu Sangam MN",
"Heiti SC",
"Apple SD Gothic Neo",
Futura,
"Bodoni 72",
Baskerville,
"Chalkboard SE",
"Heiti TC",
Copperplate,
"Party LET",
"American Typewriter",
Symbol,
"Avenir Next",
Noteworthy,
"Bangla Sangam MN",
Zapfino,
"Tamil Sangam MN",
Chalkduster,
"Arial Hebrew",
Georgia,
"Helvetica Neue",
"Gill Sans",
Palatino,
"Courier New",
"Oriya Sangam MN",
Didot,
"Bodoni 72 Smallcaps"
)
我的字体没有在那里列出,这是我正在使用的代码:
[UIFont fontWithName:@"KozGoPr6N-Regular.ttf" size:self.LabelEmail.font.pointSize];
使用上面的代码字体的大小并不总是改变,只是在某些时候。
IE,当我用 0.20 替换 self.LabelEmail.font.pointSize 时,大小保持完全相同,标签连接为 IB 的 IBOutlet 并且字体在 IB 中设置为 14 点