开发者

CGFontCreateWithFontName(CFSTR("Times")) doesn't work, return NULL

开发者 https://www.devze.com 2023-02-02 03:24 出处:网络
I\'m trying to create font with font name/PostScript \"Times\" or \"Times-Roman\" or \"Times-Bold\" but function CGFontCreateWithFontName returns NULL. I also try [UIFont fontWithName:@\"Times\" size:

I'm trying to create font with font name/PostScript "Times" or "Times-Roman" or "Times-Bold" but function CGFontCreateWithFontName returns NULL. I also try [UIFont fontWithName:@"Times" size:18], but it's the same.

In my fonts library "Times" exists! So I got array [UIFont familyNames] and I discovered that there isn't "Times" family in the开发者_C百科 array!

How can I get "Times" font?

thanks


try

[UIFont fontWithName:@"TimesNewRomanPSMT" size:18]

There is a nice application called AllFonts on the appStore that helps you find out the same of every fonts.

0

精彩评论

暂无评论...
验证码 换一张
取 消