2

I've a CTFontRef variable.

CTFontRef aFontRef;

Getting Size of Font was easy :

CGFloat aFontSize = CTFontGetSize(aFontRef);

Please help me in 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

Roshit
  • 1,589
  • 1
  • 15
  • 37

1 Answers1

3

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.

NSGod
  • 22,699
  • 3
  • 58
  • 66
  • Ouch...!!!! How could I miss that one method on top.. MY BAD... Thanks a lot :) – Roshit Sep 18 '11 at 18:45
  • Y am i not able to accept this as my solution.. strange.. say i Need to wait for 5 mins.. :( worth the wait though... thanx a ton for the answer... – Roshit Sep 18 '11 at 18:47