pub struct CGFont(/* private fields */);
Implementations§
Source§impl CGFont
impl CGFont
pub fn from_data_provider(provider: &CGDataProvider) -> Option<Self>
pub fn from_name(name: &CFString) -> Option<Self>
pub fn new_copy_from_variations( &self, variations: Option<&CFDictionary<CFString, CFNumber>>, ) -> Option<CGFont>
pub fn number_of_glyphs(&self) -> usize
pub fn units_per_em(&self) -> i32
pub fn copy_post_script_name(&self) -> CFString
pub fn copy_full_name(&self) -> CFString
pub fn ascent(&self) -> i32
pub fn descent(&self) -> i32
pub fn leading(&self) -> i32
pub fn cap_height(&self) -> i32
pub fn x_height(&self) -> i32
pub fn font_b_box(&self) -> CGRect
pub fn italic_angle(&self) -> CGFloat
pub fn stem_v(&self) -> CGFloat
pub fn copy_variation_axes( &self, ) -> Option<CFArray<CFDictionary<CFString, CFType>>>
pub fn copy_variations(&self) -> Option<CFDictionary<CFString, CFNumber>>
pub fn glyph_advances(&self, glyphs: &[CGGlyph], advances: &mut [c_int]) -> bool
pub fn glyph_b_boxes(&self, glyphs: &[CGGlyph], bboxes: &mut [CGRect]) -> bool
pub fn glyph_with_glyph_name(&self, name: &CFString) -> CGGlyph
pub fn copy_glyph_name_for_glyph(&self, glyph: CGGlyph) -> CFString
pub fn copy_table_for_tag(&self, tag: u32) -> Option<CFData>
Trait Implementations§
Source§impl TCFType for CGFont
impl TCFType for CGFont
Source§fn as_concrete_TypeRef(&self) -> CGFontRef
fn as_concrete_TypeRef(&self) -> CGFontRef
Returns the object as its concrete
TypeRef
.Source§unsafe fn wrap_under_get_rule(reference: CGFontRef) -> Self
unsafe fn wrap_under_get_rule(reference: CGFontRef) -> 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: CGFontRef) -> Self
unsafe fn wrap_under_create_rule(reference: CGFontRef) -> 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 CGFont
impl Eq for CGFont
Auto Trait Implementations§
impl Freeze for CGFont
impl RefUnwindSafe for CGFont
impl !Send for CGFont
impl !Sync for CGFont
impl Unpin for CGFont
impl UnwindSafe for CGFont
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