How do I get the font name from an otf or ttf file?

前端 未结 15 1666
-上瘾入骨i
-上瘾入骨i 2020-11-28 03:44

I have used a custom font in my previous app.

The file name was \"ProximaNova-Regular.otf\" and to load the font I just used...

[UIFont fontWithName:         


        
15条回答
  •  情歌与酒
    2020-11-28 03:49

    You can also use otfinfo --info arial.ttf to get the name from command line. The postscript name is the one you need to pass to the UIFont constructor.

提交回复
热议问题