Getting .ttf for system font in iOS
Can I access .ttf file of iOS' system font, like Helvetica? I'm creating a game and I have OpenGL text rendering (using stb_tru开发者_如何学JAVAetype), I don't want to bundle 20 MB font file to support all possible Unicode chars.
I don't believe this is possible (...to access the TTF files itself). You can access the UIKit representation through UIFont
, but not the raw TTF.
This is because applications on iOS are sandboxed - you have no access to files outside your application's directory by design (unless you're jailbroken). The system simply will deny your request, even if you knew the path.
I think that is not possible as iOS application are sandboxed and you cannot access files outside your application. I'm afraid you will have to add the file to the bundle directly.
精彩评论