@@ -91,7 +91,7 @@ pub fn new_from_CGFont(cgfont: &CGFont, pt_size: f64) -> CTFont {
91
91
pt_size as CGFloat ,
92
92
ptr:: null ( ) ,
93
93
ptr:: null ( ) ) ;
94
- TCFType :: wrap_under_create_rule ( font_ref)
94
+ CTFont :: wrap_under_create_rule ( font_ref)
95
95
}
96
96
}
97
97
@@ -100,7 +100,7 @@ pub fn new_from_descriptor(desc: &CTFontDescriptor, pt_size: f64) -> CTFont {
100
100
let font_ref = CTFontCreateWithFontDescriptor ( desc. as_concrete_TypeRef ( ) ,
101
101
pt_size as CGFloat ,
102
102
ptr:: null ( ) ) ;
103
- TCFType :: wrap_under_create_rule ( font_ref)
103
+ CTFont :: wrap_under_create_rule ( font_ref)
104
104
}
105
105
}
106
106
@@ -113,7 +113,7 @@ pub fn new_from_name(name: &str, pt_size: f64) -> Result<CTFont, ()> {
113
113
if font_ref. is_null ( ) {
114
114
Err ( ( ) )
115
115
} else {
116
- Ok ( TCFType :: wrap_under_create_rule ( font_ref) )
116
+ Ok ( CTFont :: wrap_under_create_rule ( font_ref) )
117
117
}
118
118
}
119
119
}
@@ -142,7 +142,7 @@ impl CTFont {
142
142
size as CGFloat ,
143
143
ptr:: null ( ) ,
144
144
ptr:: null ( ) ) ;
145
- TCFType :: wrap_under_create_rule ( font_ref)
145
+ CTFont :: wrap_under_create_rule ( font_ref)
146
146
}
147
147
}
148
148
@@ -177,7 +177,7 @@ impl CTFont {
177
177
178
178
pub fn all_traits ( & self ) -> CTFontTraits {
179
179
unsafe {
180
- TCFType :: wrap_under_create_rule ( CTFontCopyTraits ( self . 0 ) )
180
+ CTFontTraits :: wrap_under_create_rule ( CTFontCopyTraits ( self . 0 ) )
181
181
}
182
182
}
183
183
@@ -262,7 +262,7 @@ impl CTFont {
262
262
if result. is_null ( ) {
263
263
None
264
264
} else {
265
- Some ( TCFType :: wrap_under_create_rule ( result) )
265
+ Some ( CFData :: wrap_under_create_rule ( result) )
266
266
}
267
267
}
268
268
}
@@ -296,7 +296,7 @@ impl CTFont {
296
296
if result. is_null ( ) {
297
297
None
298
298
} else {
299
- Some ( TCFType :: wrap_under_create_rule ( result as CFURLRef ) )
299
+ Some ( CFURL :: wrap_under_create_rule ( result as CFURLRef ) )
300
300
}
301
301
}
302
302
}
@@ -321,8 +321,7 @@ fn get_string_by_name_key(font: &CTFont, name_key: CFStringRef) -> Option<String
321
321
if result. is_null ( ) {
322
322
None
323
323
} else {
324
- let string: CFString = TCFType :: wrap_under_create_rule ( result) ;
325
- Some ( string. to_string ( ) )
324
+ Some ( CFString :: wrap_under_create_rule ( result) . to_string ( ) )
326
325
}
327
326
}
328
327
}
@@ -362,7 +361,7 @@ pub fn cascade_list_for_languages(font: &CTFont, language_pref_list: &CFArray<CF
362
361
let font_collection_ref =
363
362
CTFontCopyDefaultCascadeListForLanguages ( font. as_concrete_TypeRef ( ) ,
364
363
language_pref_list. as_concrete_TypeRef ( ) ) ;
365
- TCFType :: wrap_under_create_rule ( font_collection_ref)
364
+ CFArray :: wrap_under_create_rule ( font_collection_ref)
366
365
}
367
366
}
368
367
@@ -419,7 +418,7 @@ extern {
419
418
matrix : * const CGAffineTransform ) -> CTFontRef ;
420
419
//fn CTFontCreateWithFontDescriptorAndOptions
421
420
//fn CTFontCreateUIFontForLanguage
422
- fn CTFontCreateCopyWithAttributes ( font : CTFontRef , size : CGFloat , matrix : * const CGAffineTransform ,
421
+ fn CTFontCreateCopyWithAttributes ( font : CTFontRef , size : CGFloat , matrix : * const CGAffineTransform ,
423
422
attributes : CTFontDescriptorRef ) -> CTFontRef ;
424
423
//fn CTFontCreateCopyWithSymbolicTraits
425
424
//fn CTFontCreateCopyWithFamily
@@ -439,7 +438,7 @@ extern {
439
438
//fn CTFontCopyFullName(font: CTFontRef) -> CFStringRef;
440
439
//fn CTFontCopyDisplayName(font: CTFontRef) -> CFStringRef;
441
440
fn CTFontCopyName ( font : CTFontRef , nameKey : CFStringRef ) -> CFStringRef ;
442
- //fn CTFontCopyLocalizedName(font: CTFontRef, nameKey: CFStringRef,
441
+ //fn CTFontCopyLocalizedName(font: CTFontRef, nameKey: CFStringRef,
443
442
// language: *CFStringRef) -> CFStringRef;
444
443
#[ cfg( feature = "mountainlion" ) ]
445
444
fn CTFontCopyDefaultCascadeListForLanguages ( font : CTFontRef , languagePrefList : CFArrayRef ) -> CFArrayRef ;
@@ -496,8 +495,8 @@ extern {
496
495
/* Converting Fonts */
497
496
fn CTFontCopyGraphicsFont ( font : CTFontRef , attributes : * mut CTFontDescriptorRef )
498
497
-> CGFontRef ;
499
- fn CTFontCreateWithGraphicsFont ( graphicsFont : CGFontRef , size : CGFloat ,
500
- matrix : * const CGAffineTransform ,
498
+ fn CTFontCreateWithGraphicsFont ( graphicsFont : CGFontRef , size : CGFloat ,
499
+ matrix : * const CGAffineTransform ,
501
500
attributes : CTFontDescriptorRef ) -> CTFontRef ;
502
501
//fn CTFontGetPlatformFont
503
502
//fn CTFontCreateWithPlatformFont
0 commit comments