美文网首页
CTFontManager

CTFontManager

作者: 李潇南 | 来源:发表于2017-09-09 14:52 被阅读54次
    CFArrayRef CTFontManagerCopyAvailablePostScriptNames( void ) CT_AVAILABLE(10_6, 10_0);
    
    CFArrayRef CTFontManagerCopyAvailableFontFamilyNames( void ) CT_AVAILABLE(10_6, 10_0);
    
    CFArrayRef CTFontManagerCopyAvailableFontURLs( void ) CT_AVAILABLE_MAC(10_6);
    
    CFComparisonResult CTFontManagerCompareFontFamilyNames(
        const void *        family1,
        const void *        family2,
        void * __nullable   context ) CT_AVAILABLE_MAC(10_6);
    
    CFArrayRef __nullable CTFontManagerCreateFontDescriptorsFromURL(
        CFURLRef            fileURL ) CT_AVAILABLE(10_6, 7_0);
    
    CTFontDescriptorRef __nullable CTFontManagerCreateFontDescriptorFromData(
        CFDataRef               data ) CT_AVAILABLE(10_7, 7_0);
    
    typedef CF_ENUM(uint32_t, CTFontManagerScope) {
        kCTFontManagerScopeNone         = 0,
        kCTFontManagerScopeProcess      = 1,
        kCTFontManagerScopeUser         = 2,    /* not supported in iOS */
        kCTFontManagerScopeSession      = 3     /* not supported in iOS */
    };
    
    bool CTFontManagerRegisterFontsForURL(
        CFURLRef                fontURL,
        CTFontManagerScope      scope,
        CFErrorRef *            error ) CT_AVAILABLE(10_6, 4_1);
    
    bool CTFontManagerUnregisterFontsForURL(
        CFURLRef                fontURL,
        CTFontManagerScope      scope,
        CFErrorRef *            error ) CT_AVAILABLE(10_6, 4_1);
    
    bool CTFontManagerRegisterGraphicsFont(
        CGFontRef               font,
        CFErrorRef *            error ) CT_AVAILABLE(10_8, 4_1);
    
    bool CTFontManagerUnregisterGraphicsFont(
        CGFontRef               font,
        CFErrorRef *            error ) CT_AVAILABLE(10_8, 4_1);
    
    bool CTFontManagerRegisterFontsForURLs(
        CFArrayRef              fontURLs,
        CTFontManagerScope      scope,
        CFArrayRef __nullable * __nullable errors ) CT_AVAILABLE(10_6, 4_1);
    
    bool CTFontManagerUnregisterFontsForURLs(
        CFArrayRef              fontURLs,
        CTFontManagerScope      scope,
        CFArrayRef __nullable * __nullable errors ) CT_AVAILABLE(10_6, 4_1);
    
    void CTFontManagerEnableFontDescriptors(
        CFArrayRef              descriptors,
        bool                    enable ) CT_AVAILABLE_MAC(10_6);
    
    CTFontManagerScope CTFontManagerGetScopeForURL(
        CFURLRef                fontURL ) CT_AVAILABLE_MAC(10_6);
    
    bool CTFontManagerIsSupportedFont(
        CFURLRef                fontURL ) CT_AVAILABLE_MAC(10_6);
    
    CFRunLoopSourceRef __nullable CTFontManagerCreateFontRequestRunLoopSource(
        CFIndex         sourceOrder,
        CFArrayRef    (^createMatchesCallback)(CFDictionaryRef requestAttributes, pid_t requestingProcess)) CT_AVAILABLE_MAC(10_6);
    
    CT_EXPORT const CFStringRef kCTFontManagerBundleIdentifier CT_AVAILABLE_MAC(10_6);
    
    typedef CF_ENUM(uint32_t, CTFontManagerAutoActivationSetting) {
        kCTFontManagerAutoActivationDefault     = 0,
        kCTFontManagerAutoActivationDisabled    = 1,
        kCTFontManagerAutoActivationEnabled     = 2,
        kCTFontManagerAutoActivationPromptUser  = 3
    };
    
    void CTFontManagerSetAutoActivationSetting(
        CFStringRef __nullable              bundleIdentifier,
        CTFontManagerAutoActivationSetting  setting ) CT_AVAILABLE_MAC(10_6);
    
    CTFontManagerAutoActivationSetting CTFontManagerGetAutoActivationSetting(
        CFStringRef __nullable bundleIdentifier ) CT_AVAILABLE_MAC(10_6);
    
    CT_EXPORT const CFStringRef kCTFontManagerRegisteredFontsChangedNotification CT_AVAILABLE(10_6, 7_0);
    
    

    相关文章

      网友评论

          本文标题:CTFontManager

          本文链接:https://www.haomeiwen.com/subject/swaojxtx.html