#[repr(C)]pub struct CTGlyphInfo { /* private fields */ }CTGlyphInfo only.Expand description
Implementations§
Source§impl CTGlyphInfo
impl CTGlyphInfo
Sourcepub unsafe fn with_glyph_name(
glyph_name: &CFString,
font: &CTFont,
base_string: &CFString,
) -> Option<CFRetained<CTGlyphInfo>>
Available on crate feature CTFont only.
pub unsafe fn with_glyph_name( glyph_name: &CFString, font: &CTFont, base_string: &CFString, ) -> Option<CFRetained<CTGlyphInfo>>
CTFont only.Creates an immutable glyph info object.
This function creates an immutable glyph info object for a glyph name such as “copyright” and a specified font.
Parameter glyphName: The name of the glyph.
Parameter font: The font to be associated with the returned CTGlyphInfo object.
Parameter baseString: The part of the string the returned object is intended
to override.
Returns: This function will return a reference to a CTGlyphInfo object.
Sourcepub unsafe fn with_glyph(
glyph: CGGlyph,
font: &CTFont,
base_string: &CFString,
) -> Option<CFRetained<CTGlyphInfo>>
Available on crate features CTFont and objc2-core-graphics only.
pub unsafe fn with_glyph( glyph: CGGlyph, font: &CTFont, base_string: &CFString, ) -> Option<CFRetained<CTGlyphInfo>>
CTFont and objc2-core-graphics only.Creates an immutable glyph info object.
This function creates an immutable glyph info object for a glyph index and a specified font.
Parameter glyph: The glyph identifier.
Parameter font: The font to be associated with the returned CTGlyphInfo object.
Parameter baseString: The part of the string the returned object is intended
to override.
Returns: This function will return a reference to a CTGlyphInfo object.
Sourcepub unsafe fn with_character_identifier(
cid: CGFontIndex,
collection: CTCharacterCollection,
base_string: &CFString,
) -> Option<CFRetained<CTGlyphInfo>>
Available on crate feature objc2-core-graphics only.
pub unsafe fn with_character_identifier( cid: CGFontIndex, collection: CTCharacterCollection, base_string: &CFString, ) -> Option<CFRetained<CTGlyphInfo>>
objc2-core-graphics only.Creates an immutable glyph info object.
This function creates an immutable glyph info object for a character identifier and a character collection.
Parameter cid: A character identifier.
Parameter collection: A character collection identifier.
Parameter baseString: The part of the string the returned object is intended
to override.
Returns: This function will return a reference to a CTGlyphInfo object.
Sourcepub unsafe fn glyph_name(self: &CTGlyphInfo) -> Option<CFRetained<CFString>>
pub unsafe fn glyph_name(self: &CTGlyphInfo) -> Option<CFRetained<CFString>>
Gets the glyph name for a glyph info, if applicable.
This function will return the glyph name.
Parameter glyphInfo: The glyph info for which you would like the glyph name.
Returns: If the glyph info object was created with a glyph name, it will be returned. Otherwise, this function will return NULL.
Sourcepub unsafe fn glyph(self: &CTGlyphInfo) -> CGGlyph
Available on crate feature objc2-core-graphics only.
pub unsafe fn glyph(self: &CTGlyphInfo) -> CGGlyph
objc2-core-graphics only.Gets the glyph for a glyph info, if applicable.
This function will return the glyph.
Parameter glyphInfo: The glyph info from which you would like the glyph.
Returns: If the glyph info object was created with a font, it will be returned. Otherwise, this function will return 0.
Sourcepub unsafe fn character_identifier(self: &CTGlyphInfo) -> CGFontIndex
Available on crate feature objc2-core-graphics only.
pub unsafe fn character_identifier(self: &CTGlyphInfo) -> CGFontIndex
objc2-core-graphics only.Gets the character identifier for a glyph info.
This function will return the character identifier.
Parameter glyphInfo: The glyph info for which you would like the character identifier.
Returns: If the glyph info object was created with a character identifier, it will be returned. Otherwise, this function will return 0.
Sourcepub unsafe fn character_collection(self: &CTGlyphInfo) -> CTCharacterCollection
pub unsafe fn character_collection(self: &CTGlyphInfo) -> CTCharacterCollection
Gets the character collection for a glyph info.
This function will return the character collection. If the glyph info object was created with a glyph name or a glyph index, its character collection will be kCTIdentityMappingCharacterCollection.
Parameter glyphInfo: The glyph info for which you would like the character collection.
Returns: This function will return the character collection of the given glyph info.
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CTGlyphInfo
impl AsRef<AnyObject> for CTGlyphInfo
Source§impl AsRef<CFType> for CTGlyphInfo
impl AsRef<CFType> for CTGlyphInfo
Source§impl AsRef<CTGlyphInfo> for CTGlyphInfo
impl AsRef<CTGlyphInfo> for CTGlyphInfo
Source§impl Borrow<AnyObject> for CTGlyphInfo
impl Borrow<AnyObject> for CTGlyphInfo
Source§impl Borrow<CFType> for CTGlyphInfo
impl Borrow<CFType> for CTGlyphInfo
Source§impl ConcreteType for CTGlyphInfo
impl ConcreteType for CTGlyphInfo
Source§impl Debug for CTGlyphInfo
impl Debug for CTGlyphInfo
Source§impl Deref for CTGlyphInfo
impl Deref for CTGlyphInfo
Source§impl Hash for CTGlyphInfo
impl Hash for CTGlyphInfo
Source§impl Message for CTGlyphInfo
impl Message for CTGlyphInfo
Source§impl PartialEq for CTGlyphInfo
impl PartialEq for CTGlyphInfo
Source§impl RefEncode for CTGlyphInfo
impl RefEncode for CTGlyphInfo
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Type for CTGlyphInfo
impl Type for CTGlyphInfo
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
core-foundation crate. Read more