iOS Developer Library

Developer

ApplicationServices Framework Reference CTGlyphInfo Reference

Options
Deployment Target:

On This Page
Language:

CTGlyphInfo Reference

Inherits From


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import CoreText

Objective-C

@import CoreText;

The CTGlyphInfo opaque type enables you to override a font's specified mapping from Unicode to the glyph ID.

Functions

  • Returns the Core Foundation type identifier of the glyph info object

    Declaration

    Swift

    func CTGlyphInfoGetTypeID() -> CFTypeID

    Objective-C

    CFTypeID CTGlyphInfoGetTypeID ( void );

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later

  • Creates an immutable glyph info object with a glyph name.

    Declaration

    Swift

    func CTGlyphInfoCreateWithGlyphName(_ glyphName: CFString!, _ font: CTFont!, _ baseString: CFString!) -> CTGlyphInfo!

    Objective-C

    CTGlyphInfoRef CTGlyphInfoCreateWithGlyphName ( CFStringRef glyphName, CTFontRef font, CFStringRef baseString );

    Parameters

    glyphName

    The name of the glyph.

    font

    The font to be associated with the returned CTGlyphInfo object.

    baseString

    The part of the string the returned object is intended to override.

    Return Value

    A valid reference to an immutable CTGlyphInfo object if glyph info creation was successful; otherwise, NULL.

    Discussion

    This function creates an immutable glyph info object for a glyph name such as copyright using a specified font.

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later

  • Creates an immutable glyph info object with a glyph index.

    Declaration

    Swift

    func CTGlyphInfoCreateWithGlyph(_ glyph: CGGlyph, _ font: CTFont!, _ baseString: CFString!) -> CTGlyphInfo!

    Objective-C

    CTGlyphInfoRef CTGlyphInfoCreateWithGlyph ( CGGlyph glyph, CTFontRef font, CFStringRef baseString );

    Parameters

    glyph

    The index of the glyph.

    font

    The font to be associated with the returned CTGlyphInfo object.

    baseString

    The part of the string the returned object is intended to override.

    Return Value

    A valid reference to an immutable CTGlyphInfo object, If glyph info creation was successful; otherwise, NULL.

    Discussion

    This function creates an immutable glyph info object for a glyph index using a specified font.

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later

  • Creates an immutable glyph info object with a character identifier.

    Declaration

    Swift

    func CTGlyphInfoCreateWithCharacterIdentifier(_ cid: CGFontIndex, _ collection: CTCharacterCollection, _ baseString: CFString!) -> CTGlyphInfo!

    Objective-C

    CTGlyphInfoRef CTGlyphInfoCreateWithCharacterIdentifier ( CGFontIndex cid, CTCharacterCollection collection, CFStringRef baseString );

    Parameters

    cid

    A character identifier.

    collection

    A character collection identifier.

    baseString

    The part of the string the returned object is intended to override.

    Return Value

    A valid reference to an immutable CTGlyphInfo object if glyph info creation was successful; otherwise, NULL.

    Discussion

    This function creates an immutable glyph info object for a character identifier and a character collection.

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later

  • Gets the glyph name for a glyph info object if that object exists.

    Declaration

    Swift

    func CTGlyphInfoGetGlyphName(_ glyphInfo: CTGlyphInfo!) -> CFString!

    Objective-C

    CFStringRef CTGlyphInfoGetGlyphName ( CTGlyphInfoRef glyphInfo );

    Parameters

    glyphInfo

    The glyph info from which to get the glyph name. May not be NULL.

    Return Value

    A glyph name if the glyph info object was created; otherwise, NULL.

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later

  • Gets the character identifier for a glyph info object.

    Declaration

    Swift

    func CTGlyphInfoGetCharacterIdentifier(_ glyphInfo: CTGlyphInfo!) -> CGFontIndex

    Objective-C

    CGFontIndex CTGlyphInfoGetCharacterIdentifier ( CTGlyphInfoRef glyphInfo );

    Parameters

    glyphInfo

    The glyph info from which to get the character identifier. May not be NULL.

    Return Value

    The character identifier of the given glyph info object.

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later

  • Gets the character collection for a glyph info object.

    Declaration

    Swift

    func CTGlyphInfoGetCharacterCollection(_ glyphInfo: CTGlyphInfo!) -> CTCharacterCollection

    Objective-C

    CTCharacterCollection CTGlyphInfoGetCharacterCollection ( CTGlyphInfoRef glyphInfo );

    Parameters

    glyphInfo

    The glyph info from which to get the character collection. May not be NULL.

    Return Value

    The character collection of the given glyph info object.

    Discussion

    If the glyph info object was created with a glyph name or a glyph index, its character collection is kCTIdentityMappingCharacterCollection.

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later

Data Types

  • A reference to a glyph info object.

    Declaration

    Swift

    typealias CTGlyphInfoRef = CTGlyphInfo

    Objective-C

    typedef const struct __CTGlyphInfo *CTGlyphInfoRef;

    Availability

    Available in iOS 3.2 and later

Constants

  • These constants specify character collections.

    Declaration

    Swift

    enum CTCharacterCollection : UInt16 { case CharacterCollectionIdentityMapping case CharacterCollectionAdobeCNS1 case CharacterCollectionAdobeGB1 case CharacterCollectionAdobeJapan1 case CharacterCollectionAdobeJapan2 case CharacterCollectionAdobeKorea1 }

    Objective-C

    enum{ kCTIdentityMappingCharacterCollection = 0, kCTAdobeCNS1CharacterCollection = 1, kCTAdobeGB1CharacterCollection = 2, kCTAdobeJapan1CharacterCollection = 3, kCTAdobeJapan2CharacterCollection = 4, kCTAdobeKorea1CharacterCollection = 5}; typedef uint16_t CTCharacterCollection;

    Constants

    • kCTIdentityMappingCharacterCollection

      kCTIdentityMappingCharacterCollection

      The character identifier is equal to the CGGlyph glyph index.

      Available in iOS 3.2 and later

    • kCTAdobeCNS1CharacterCollection

      kCTAdobeCNS1CharacterCollection

      The Adobe-CNS1 mapping.

      Available in iOS 3.2 and later

    • kCTAdobeGB1CharacterCollection

      kCTAdobeGB1CharacterCollection

      The Adobe-GB1 mapping.

      Available in iOS 3.2 and later

    • kCTAdobeJapan1CharacterCollection

      kCTAdobeJapan1CharacterCollection

      The Adobe-Japan1 mapping.

      Available in iOS 3.2 and later

    • kCTAdobeJapan2CharacterCollection

      kCTAdobeJapan2CharacterCollection

      The Adobe-Japan2 mapping.

      Available in iOS 3.2 and later

    • kCTAdobeKorea1CharacterCollection

      kCTAdobeKorea1CharacterCollection

      The Adobe-Korea1 mapping.

      Available in iOS 3.2 and later

    Import Statement

    Objective-C

    @import CoreText;

    Swift

    import CoreText

    Availability

    Available in iOS 3.2 and later