简体   繁体   中英

Does iOS SDK support SVG as custom font?

I have a custom font in SVG-file. I've added it to the application's bundle same as i did it with OTF font. Now I'm trying to use it in code below:

UIFont * customFont = [UIFont fontWithName:@"myFont" size:16.0f];

And I am getting error:

Apr 7 14:58:46 Alexander ExampleProject[26403] : FT_Open_Face failed: error 2.

I'm thinking iOS SDK just not supporting SVG-font yet because the same way works with OTF-font, but does not with SVG. Am i right?

The iOS SDK does not support SVG as a font.

But you could just convert the font, for example with http://www.freefontconverter.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM