开发者

FontName from CTFontRef

开发者 https://www.devze.com 2023-04-05 12:34 出处:网络
I\'ve a CTFontRef variable. CTFontRef aFontRef; Getting Size of Font was easy : CGFloat aFontSize = CTFontGetSize(aFontRef);

I've a CTFontRef variable.

CTFontRef aFontRef;

Getting Size of Font was easy :

CGFloat aFontSize = CTFontGetSize(aFontRef);

Please help me in开发者_如何学JAVA retrieving the FontName. I'm expecting the FontName to be something like MarkerFelt-Wide.

But, when I use methods like

CTFontCopyFullName(aFontRef)

I get Marker Felt Wide

Cheers Roshit


Looks like you want the PostScript name, which you can obtain through CTFontCopyPostScriptName().

The PostScript name is an internal name, and is generally the preferred way to refer to a font by name.

0

精彩评论

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

关注公众号