CTFontManager

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);

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 没有月亮的晚上 我们一起谈谈爱情 它像个孩子 任性而又顽皮 捉弄着相信它的人儿 我用大把的时间和精力 取悦它 它有...
    滕吠吠阅读 3,047评论 0 3
  • 《罗曼蒂克消亡史》是阅读计划中突然加出来的一本,程耳声称书比电影好看,他在电影拍摄的空隙完成了这本书的创作,估计一...
    Cherie雨丝阅读 3,114评论 0 0
  • 如果你某一天突然厌烦了周遭,那就拿起相机或手机去采摘吧,骑上自行车来到城市的某一处风景,用食指按下快门,用心去体会...
    花落谁心阅读 1,638评论 2 3