What happened to “HelveticaNeue-Italic” on iOS 7.0.3

后端 未结 10 1505
说谎
说谎 2020-12-07 09:19

Just upgraded my iPod touch to iOS 7.0.3 and \"HelveticaNeue-Italic\" seems to have disappeared. When I query on the phone with:

[UIFont fontNamesForFamilyN         


        
10条回答
  •  暖寄归人
    2020-12-07 09:49

    This is a bug in iOS 7.0.3.

    If you are explicitly using HelveticaNeue-Italic, then you can create it using this workaround:

    UIFont* font = (__bridge_transfer UIFont*)CTFontCreateWithName(CFSTR("HelveticaNeue-Italic"), fontSize, NULL);
    

    Note, however, that this workaround will only work on iOS 7; it is not deployable to iOS 6 (because CTFontRef and UIFont were not toll-free bridged on iOS 6). However, on iOS 6 you can just use your regular font lookup code.

提交回复
热议问题