TooTallNate / NodObjC

The Node.js ⇆ Objective-C bridge

Home Page:http://tootallnate.github.io/NodObjC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to call CoreTextFunctions

anandvijaymonotype opened this issue · comments

  • (NSString )getPathForFont:(NSString)fontName
    {
    CTFontDescriptorRef fontRef = CTFontDescriptorCreateWithNameAndSize ((CFStringRef)fontName, 14);
    CFURLRef url = (CFURLRef)CTFontDescriptorCopyAttribute(fontRef, kCTFontURLAttribute);
    NSString *fontPath = nil;
    if(url)
    {
    fontPath = [NSString stringWithString:[(NSURL *)CFBridgingRelease(url) path]];
    }
    return fontPath;
    }