CTGlyphInfo Reference

Derived from
CFType
Framework
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 OS X v10.5 and later.
Declared In
CTGlyphInfo.h

CTGlyphInfoCreateWithGlyph

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 OS X v10.5 and later.
Declared In
CTGlyphInfo.h

CTGlyphInfoCreateWithGlyphName

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 OS X v10.5 and later.
Declared In
CTGlyphInfo.h

CTGlyphInfoGetCharacterCollection

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 OS X v10.5 and later.
Declared In
CTGlyphInfo.h

CTGlyphInfoGetCharacterIdentifier

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 OS X v10.5 and later.
Declared In
CTGlyphInfo.h

CTGlyphInfoGetGlyphName

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 OS X v10.5 and later.
Declared In
CTGlyphInfo.h

CTGlyphInfoGetTypeID

Returns the Core Foundation type identifier of the glyph info object

CFTypeID CTGlyphInfoGetTypeID( void );
Availability
  • Available in OS X v10.5 and later.
Declared In
CTGlyphInfo.h

Data Types

CTGlyphInfoRef

A reference to a glyph info object.

typedef const struct __CTGlyphInfo *CTGlyphInfoRef;
Availability
  • Available in OS X v10.5 and later.
Declared In
CTGlyphInfo.h

Constants

CTCharacterCollection

These constants specify character collections.

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

The character identifier is equal to the CGGlyph glyph index.

Available in OS X v10.5 and later.

Declared in CTGlyphInfo.h.

kCTAdobeCNS1CharacterCollection

The Adobe-CNS1 mapping.

Available in OS X v10.5 and later.

Declared in CTGlyphInfo.h.

kCTAdobeGB1CharacterCollection

The Adobe-GB1 mapping.

Available in OS X v10.5 and later.

Declared in CTGlyphInfo.h.

kCTAdobeJapan1CharacterCollection

The Adobe-Japan1 mapping.

Available in OS X v10.5 and later.

Declared in CTGlyphInfo.h.

kCTAdobeJapan2CharacterCollection

The Adobe-Japan2 mapping.

Available in OS X v10.5 and later.

Declared in CTGlyphInfo.h.

kCTAdobeKorea1CharacterCollection

The Adobe-Korea1 mapping.

Available in OS X v10.5 and later.

Declared in CTGlyphInfo.h.

Declared In
CTGlyphInfo.h