There is old carbon code using FMGetFontFormat to determine if the Font is of “True Type”. Since the API is deprecated, is there a way to find the same using CTFontRef. I used CTFontCopyAttribute, but it is returning CTTypeRef and i am not able to get the value? Any Suggestions?
Share
A
CTTypeRefis a generic type. If you read the docs for thekCTFontFormatAttributeconstant, they state:That means that you need to treat the attribute as a number, which you can then convert to a
shortand check it against the known values forCTFontFormat: