pub struct CTFont(/* private fields */);
Implementations§
source§impl CTFont
impl CTFont
pub fn symbolic_traits(&self) -> CTFontSymbolicTraits
source§impl CTFont
impl CTFont
pub fn copy_to_CGFont(&self) -> CGFont
pub fn copy_descriptor(&self) -> CTFontDescriptor
pub fn clone_with_font_size(&self, size: f64) -> CTFont
pub fn clone_with_symbolic_traits( &self, trait_value: CTFontSymbolicTraits, trait_mask: CTFontSymbolicTraits ) -> Option<CTFont>
pub fn get_string_by_name_key( &self, name_key: CTFontNameSpecifier ) -> Option<String>
pub fn family_name(&self) -> String
pub fn face_name(&self) -> String
pub fn unique_name(&self) -> String
pub fn postscript_name(&self) -> String
pub fn display_name(&self) -> String
pub fn style_name(&self) -> String
pub fn all_traits(&self) -> CTFontTraits
pub fn ascent(&self) -> CGFloat
pub fn descent(&self) -> CGFloat
pub fn underline_thickness(&self) -> CGFloat
pub fn underline_position(&self) -> CGFloat
pub fn slant_angle(&self) -> CGFloat
pub fn cap_height(&self) -> CGFloat
pub fn bounding_box(&self) -> CGRect
pub fn leading(&self) -> CGFloat
pub fn units_per_em(&self) -> c_uint
pub fn x_height(&self) -> CGFloat
pub fn pt_size(&self) -> CGFloat
pub fn get_glyph_with_name(&self, glyph_name: &str) -> CGGlyph
pub unsafe fn get_glyphs_for_characters( &self, characters: *const UniChar, glyphs: *mut CGGlyph, count: CFIndex ) -> bool
pub unsafe fn get_advances_for_glyphs( &self, orientation: CTFontOrientation, glyphs: *const CGGlyph, advances: *mut CGSize, count: CFIndex ) -> f64
pub unsafe fn get_vertical_translations_for_glyphs( &self, orientation: CTFontOrientation, glyphs: *const CGGlyph, translations: *mut CGSize, count: CFIndex )
pub fn get_font_table(&self, tag: u32) -> Option<CFData>
pub fn get_available_font_tables(&self) -> Option<CFArray<CTFontTableTag>>
pub fn get_bounding_rects_for_glyphs( &self, orientation: CTFontOrientation, glyphs: &[CGGlyph] ) -> CGRect
pub fn draw_glyphs( &self, glyphs: &[CGGlyph], positions: &[CGPoint], context: CGContext )
pub fn url(&self) -> Option<CFURL>
pub fn get_variation_axes( &self ) -> Option<CFArray<CFDictionary<CFString, CFType>>>
pub fn create_path_for_glyph( &self, glyph: CGGlyph, matrix: &CGAffineTransform ) -> Result<CGPath, ()>
pub fn glyph_count(&self) -> CFIndex
Trait Implementations§
source§impl PartialEq<CTFont> for CTFont
impl PartialEq<CTFont> for CTFont
source§impl TCFType for CTFont
impl TCFType for CTFont
source§fn as_concrete_TypeRef(&self) -> CTFontRef
fn as_concrete_TypeRef(&self) -> CTFontRef
Returns the object as its concrete TypeRef.
source§unsafe fn wrap_under_get_rule(reference: CTFontRef) -> Self
unsafe fn wrap_under_get_rule(reference: CTFontRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.source§fn as_CFTypeRef(&self) -> CFTypeRef
fn as_CFTypeRef(&self) -> CFTypeRef
Returns the object as a raw
CFTypeRef
. The reference count is not adjusted.source§unsafe fn wrap_under_create_rule(reference: CTFontRef) -> Self
unsafe fn wrap_under_create_rule(reference: CTFontRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
Returns the object as a wrapped
CFType
. The reference count is incremented by one.source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere Self: Sized,
Returns the object as a wrapped
CFType
. Consumes self and avoids changing the reference
count.source§fn retain_count(&self) -> isize
fn retain_count(&self) -> isize
Returns the reference count of the object. It is unwise to do anything other than test
whether the return value of this method is greater than zero.
source§fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
fn instance_of<OtherCFType>(&self) -> boolwhere OtherCFType: TCFType,
Returns true if this value is an instance of another type.
impl ConcreteCFType for CTFont
impl Eq for CTFont
impl Send for CTFont
impl Sync for CTFont
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more