I开发者_如何学Go have a CTFontRef, how can i get the font name as a string?
read this http://developer.apple.com/library/mac/#documentation/Carbon/Reference/CTFontRef/Reference/reference.html
There are methods defined for example.
Getting Font Names
CTFontCopyPostScriptName
CTFontCopyFamilyName
CTFontCopyFullName
CTFontCopyDisplayName
CTFontCopyName
CTFontCopyLocalizedName
You'll need to be a bit more specific about what you mean by "font name". The PostScript name? Display name? Family name?
In any case, this is how you'd go about it:
NSString *postScriptName = 
             [(NSString *)CTFontCopyPostScriptName(fontRef) autorelease];
NSLog(@"postScriptName == %@", postScriptName);
CFStringRef and NSString are toll-free bridged (see Toll-Free Bridged Types).
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论