CTGlyphInfo Reference
| Derived from | CFType |
| Framework | ApplicationServices/CoreText |
| Declared in | CTGlyphInfo.h |
Overview
The CTGlyphInfo opaque type enables you to override a font's specified mapping from Unicode to the glyph ID.
Functions by Task
Getting the GlyphInfo Type
Creating GlyphInfo Objects
Getting GlyphInfo Data
Functions
CTGlyphInfoCreateWithCharacterIdentifier
Creates an immutable glyph info object with a character identifier.
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.
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hCTGlyphInfoCreateWithGlyph
Creates an immutable glyph info object with a glyph index.
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.
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hCTGlyphInfoCreateWithGlyphName
Creates an immutable glyph info object with a glyph name.
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.
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hCTGlyphInfoGetCharacterCollection
Gets the character collection for a glyph info object.
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.
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hCTGlyphInfoGetCharacterIdentifier
Gets the character identifier for a glyph info object.
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.
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hCTGlyphInfoGetGlyphName
Gets the glyph name for a glyph info object if that object exists.
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.
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hCTGlyphInfoGetTypeID
Returns the Core Foundation type identifier of the glyph info object
CFTypeID CTGlyphInfoGetTypeID( void );
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hData Types
CTGlyphInfoRef
A reference to a glyph info object.
typedef const struct __CTGlyphInfo *CTGlyphInfoRef;
Availability
- Available in iOS 3.2 and later.
Declared In
CTGlyphInfo.hConstants
CTCharacterCollection
These constants specify character collections.
enum{ kCTIdentityMappingCharacterCollection = 0,
kCTAdobeCNS1CharacterCollection = 1,
kCTAdobeGB1CharacterCollection = 2,
kCTAdobeJapan1CharacterCollection = 3,
kCTAdobeJapan2CharacterCollection = 4,
kCTAdobeKorea1CharacterCollection = 5};
typedef uint16_t CTCharacterCollection;
Constants
kCTIdentityMappingCharacterCollectionThe character identifier is equal to the
CGGlyphglyph index.Available in iOS 3.2 and later.
Declared in
CTGlyphInfo.h.kCTAdobeCNS1CharacterCollectionThe Adobe-CNS1 mapping.
Available in iOS 3.2 and later.
Declared in
CTGlyphInfo.h.kCTAdobeGB1CharacterCollectionThe Adobe-GB1 mapping.
Available in iOS 3.2 and later.
Declared in
CTGlyphInfo.h.kCTAdobeJapan1CharacterCollectionThe Adobe-Japan1 mapping.
Available in iOS 3.2 and later.
Declared in
CTGlyphInfo.h.kCTAdobeJapan2CharacterCollectionThe Adobe-Japan2 mapping.
Available in iOS 3.2 and later.
Declared in
CTGlyphInfo.h.kCTAdobeKorea1CharacterCollectionThe Adobe-Korea1 mapping.
Available in iOS 3.2 and later.
Declared in
CTGlyphInfo.h.
Declared In
CTGlyphInfo.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-03-05)