Carbon


FontSpec

Header: PictUtils.h

Contains information about the fonts in a picture.

struct FontSpec {
    SInt16 pictFontID; 
    SInt16 sysFontID; 
    SInt32 size[4]; 
    SInt16 style; 
    SInt32 nameOffset;
};
typedef FontSpec FontSpecPtr;

Field descriptions

pictFontID

The ID number of the font as it is stored in the picture.

sysFontID

The number that identifies the resource file (of type 'FOND') that specifies the font family. Every font family, has a unique font family ID, in a range of values that determines the script system to which the font family belongs.

size

The point sizes of the fonts in the picture. The field contains 128 bits, in which a bit is set for each point size encountered, from 1 to 127 points. Bit 0 is set if a size larger than 127 is found.

style

The styles for this font family at any of its sizes. The values in this field can also be represented with the Style data type.

nameOffset

The offset into the list of font names (indicated by the fontNamesHandle field of the PictInfo structure) at which the name for this font family is stored. A font name is given to a font family to distinguish it from other font families.

If you specify the recordFontInfo constant in the verb parameter to the GetPictInfo function or the NewPictInfo function, your application receives a PictInfo structure that includes in its fontHandle field a handle to an array of FontSpec structures. The uniqueFonts field of the PictInfo structure indicates the number of FontSpec structures in this array. (For bitmap fonts, a font is a complete set of glyphs in one size, typeface, and style. For outline fonts, a font is a complete set of glyphs in one typeface and style.)

When you are finished using the information returned in a FontSpec structure, you should use the Memory Manager function DisposeHandle to dispose of the memory allocated to it.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)