CTFontDescriptor

typedef const struct CF_BRIDGED_TYPE(UIFontDescriptor) __CTFontDescriptor * CTFontDescriptorRef;

typedef const struct CF_BRIDGED_TYPE(NSFontDescriptor) __CTFontDescriptor * CTFontDescriptorRef;

CFTypeID CTFontDescriptorGetTypeID( void ) CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontURLAttribute CT_AVAILABLE(10_6, 3_2);

CT_EXPORT const CFStringRef kCTFontNameAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontDisplayNameAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontFamilyNameAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontStyleNameAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontTraitsAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontVariationAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontSizeAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontMatrixAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontCascadeListAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontCharacterSetAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontLanguagesAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontBaselineAdjustAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontMacintoshEncodingsAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontFeaturesAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontFeatureSettingsAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontFixedAdvanceAttribute CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontOrientationAttribute CT_AVAILABLE(10_5, 3_2);

typedef CF_ENUM(uint32_t, CTFontOrientation) {
    kCTFontOrientationDefault    CT_ENUM_AVAILABLE(10_8, 6_0) = 0,
    kCTFontOrientationHorizontal CT_ENUM_AVAILABLE(10_8, 6_0) = 1,
    kCTFontOrientationVertical   CT_ENUM_AVAILABLE(10_8, 6_0) = 2,

    kCTFontDefaultOrientation CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontOrientationDefault,
    kCTFontHorizontalOrientation CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontOrientationHorizontal,
    kCTFontVerticalOrientation CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontOrientationVertical
};

CT_EXPORT const CFStringRef kCTFontFormatAttribute CT_AVAILABLE(10_6, 3_2);

typedef CF_ENUM(uint32_t, CTFontFormat) {
    kCTFontFormatUnrecognized       = 0,
    kCTFontFormatOpenTypePostScript = 1,
    kCTFontFormatOpenTypeTrueType   = 2,
    kCTFontFormatTrueType           = 3,
    kCTFontFormatPostScript         = 4,
    kCTFontFormatBitmap             = 5
};

CT_EXPORT const CFStringRef kCTFontRegistrationScopeAttribute CT_AVAILABLE(10_6, 3_2);

CT_EXPORT const CFStringRef kCTFontPriorityAttribute CT_AVAILABLE(10_6, 3_2);

enum {
    kCTFontPrioritySystem       =  10000,
    kCTFontPriorityNetwork      =  20000,
    kCTFontPriorityComputer     =  30000,
    kCTFontPriorityUser         =  40000,
    kCTFontPriorityDynamic      =  50000,
    kCTFontPriorityProcess      =  60000
};
typedef uint32_t CTFontPriority;

CT_EXPORT const CFStringRef kCTFontEnabledAttribute CT_AVAILABLE(10_6, 3_2);

CT_EXPORT const CFStringRef kCTFontDownloadableAttribute CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDownloadedAttribute CT_AVAILABLE(10_12, 7_0);

CTFontDescriptorRef CTFontDescriptorCreateWithNameAndSize(
    CFStringRef         name,
    CGFloat             size ) CT_AVAILABLE(10_5, 3_2);

CTFontDescriptorRef CTFontDescriptorCreateWithAttributes(
    CFDictionaryRef     attributes ) CT_AVAILABLE(10_5, 3_2);

CTFontDescriptorRef CTFontDescriptorCreateCopyWithAttributes(
    CTFontDescriptorRef     original,
    CFDictionaryRef         attributes ) CT_AVAILABLE(10_5, 3_2);

CTFontDescriptorRef __nullable CTFontDescriptorCreateCopyWithFamily(
    CTFontDescriptorRef     original,
    CFStringRef             family ) CT_AVAILABLE(10_9, 7_0);

CTFontDescriptorRef __nullable CTFontDescriptorCreateCopyWithSymbolicTraits(
    CTFontDescriptorRef     original,
    CTFontSymbolicTraits    symTraitValue,
    CTFontSymbolicTraits    symTraitMask ) CT_AVAILABLE(10_9, 7_0);

CTFontDescriptorRef CTFontDescriptorCreateCopyWithVariation(
    CTFontDescriptorRef     original,
    CFNumberRef             variationIdentifier,
    CGFloat                 variationValue ) CT_AVAILABLE(10_5, 3_2);

CTFontDescriptorRef CTFontDescriptorCreateCopyWithFeature(
    CTFontDescriptorRef     original,
    CFNumberRef             featureTypeIdentifier,
    CFNumberRef             featureSelectorIdentifier ) CT_AVAILABLE(10_5, 3_2);

CFArrayRef __nullable CTFontDescriptorCreateMatchingFontDescriptors(
    CTFontDescriptorRef     descriptor,
    CFSetRef __nullable     mandatoryAttributes ) CT_AVAILABLE(10_5, 3_2);

CTFontDescriptorRef __nullable CTFontDescriptorCreateMatchingFontDescriptor(
    CTFontDescriptorRef     descriptor,
    CFSetRef __nullable     mandatoryAttributes ) CT_AVAILABLE(10_5, 3_2);

typedef CF_ENUM(uint32_t, CTFontDescriptorMatchingState) {
    kCTFontDescriptorMatchingDidBegin,              // called once at the beginning.
    kCTFontDescriptorMatchingDidFinish,             // called once at the end.
    
    kCTFontDescriptorMatchingWillBeginQuerying,     // called once before talking to the server.  Skipped if not necessary.
    kCTFontDescriptorMatchingStalled,               // called when stalled. (e.g. while waiting for server response.)
    
    // Downloading and activating are repeated for each descriptor.
    kCTFontDescriptorMatchingWillBeginDownloading,  // Downloading part may be skipped if all the assets are already downloaded
    kCTFontDescriptorMatchingDownloading,
    kCTFontDescriptorMatchingDidFinishDownloading,
    kCTFontDescriptorMatchingDidMatch,              // called when font descriptor is matched.
    
    kCTFontDescriptorMatchingDidFailWithError       // called when an error occurred.  (may be called multiple times.)
};

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingSourceDescriptor CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingDescriptors CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingResult CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingPercentage CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingCurrentAssetSize CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingTotalDownloadedSize CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingTotalAssetSize CT_AVAILABLE(10_8, 6_0);

CT_EXPORT const CFStringRef kCTFontDescriptorMatchingError CT_AVAILABLE(10_8, 6_0);

typedef bool (^CTFontDescriptorProgressHandler)(CTFontDescriptorMatchingState state, CFDictionaryRef progressParameter);

bool CTFontDescriptorMatchFontDescriptorsWithProgressHandler(
    CFArrayRef                          descriptors,
    CFSetRef __nullable                 mandatoryAttributes,
    CTFontDescriptorProgressHandler     progressBlock) CT_AVAILABLE(10_9, 6_0)

CFDictionaryRef CTFontDescriptorCopyAttributes(
    CTFontDescriptorRef     descriptor ) CT_AVAILABLE(10_5, 3_2);

CFTypeRef __nullable CTFontDescriptorCopyAttribute(
    CTFontDescriptorRef     descriptor,
    CFStringRef             attribute ) CT_AVAILABLE(10_5, 3_2);

CFTypeRef __nullable CTFontDescriptorCopyLocalizedAttribute(
    CTFontDescriptorRef     descriptor,
    CFStringRef             attribute,
    CFStringRef __nullable * __nullable language ) CT_AVAILABLE(10_5, 3_2);








最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市赘娄,隨后出現(xiàn)的幾起案子拾并,更是在濱河造成了極大的恐慌,老刑警劉巖蝙眶,帶你破解...
    沈念sama閱讀 216,372評(píng)論 6 498
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件友浸,死亡現(xiàn)場(chǎng)離奇詭異祭往,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)缆八,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,368評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門疾捍,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)奈辰,“玉大人,你說(shuō)我怎么就攤上這事乱豆〗鼻。” “怎么了?”我有些...
    開(kāi)封第一講書(shū)人閱讀 162,415評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)瑟啃。 經(jīng)常有香客問(wèn)我论泛,道長(zhǎng),這世上最難降的妖魔是什么蛹屿? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 58,157評(píng)論 1 292
  • 正文 為了忘掉前任屁奏,我火速辦了婚禮,結(jié)果婚禮上错负,老公的妹妹穿的比我還像新娘坟瓢。我一直安慰自己,他們只是感情好犹撒,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,171評(píng)論 6 388
  • 文/花漫 我一把揭開(kāi)白布折联。 她就那樣靜靜地躺著,像睡著了一般识颊。 火紅的嫁衣襯著肌膚如雪诚镰。 梳的紋絲不亂的頭發(fā)上,一...
    開(kāi)封第一講書(shū)人閱讀 51,125評(píng)論 1 297
  • 那天祥款,我揣著相機(jī)與錄音怕享,去河邊找鬼。 笑死镰踏,一個(gè)胖子當(dāng)著我的面吹牛函筋,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播奠伪,決...
    沈念sama閱讀 40,028評(píng)論 3 417
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼跌帐,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了绊率?” 一聲冷哼從身側(cè)響起谨敛,我...
    開(kāi)封第一講書(shū)人閱讀 38,887評(píng)論 0 274
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎滤否,沒(méi)想到半個(gè)月后脸狸,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,310評(píng)論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡藐俺,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,533評(píng)論 2 332
  • 正文 我和宋清朗相戀三年炊甲,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片欲芹。...
    茶點(diǎn)故事閱讀 39,690評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡卿啡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出菱父,到底是詐尸還是另有隱情颈娜,我是刑警寧澤剑逃,帶...
    沈念sama閱讀 35,411評(píng)論 5 343
  • 正文 年R本政府宣布,位于F島的核電站官辽,受9級(jí)特大地震影響蛹磺,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜同仆,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,004評(píng)論 3 325
  • 文/蒙蒙 一称开、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧乓梨,春花似錦、人聲如沸清酥。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 31,659評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)焰轻。三九已至臭觉,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間辱志,已是汗流浹背蝠筑。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 32,812評(píng)論 1 268
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留揩懒,地道東北人什乙。 一個(gè)月前我還...
    沈念sama閱讀 47,693評(píng)論 2 368
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像已球,于是被迫代替她去往敵國(guó)和親臣镣。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,577評(píng)論 2 353

推薦閱讀更多精彩內(nèi)容

  • 知春意陶醉智亮,知夏盡云飛忆某,知秋同日月,知冬相依偎阔蛉。 原創(chuàng)作品 (Original Article)
    一詩(shī)一境界閱讀 243評(píng)論 0 1
  • 農(nóng)歷五月十一弃舒,芒種節(jié)氣。芒種也稱忙種状原,是農(nóng)民的播種聋呢、下地最為繁忙的時(shí)機(jī)〉咔《月令七十二候集解》中有云:“五月節(jié)坝冕,謂有...
    _尚淺_閱讀 266評(píng)論 0 0
  • 生活中不期而遇也許是一種緣分,錯(cuò)誤的邂逅碰撞卻是一種無(wú)限的傷感瓦呼,更會(huì)是一份美麗的錯(cuò)誤喂窟,斷斷續(xù)續(xù)的影響自己很長(zhǎng)的一段...
    翡璨Mr張閱讀 300評(píng)論 1 2