Important: The information in this document is obsolete and should not be used for new development.
FontSpec
If you specify therecordFontInfo
constant in theverb
parameter to theGetPictInfo
function (described on page 7-46) or theNewPictInfo
function (described on page 7-52), your application receives aPictInfo
record (described beginning on page 7-31) that includes in itsfontHandle
field a handle to an array ofFontSpec
records. TheuniqueFonts
field of thePictInfo
record indicates the number ofFontSpec
records in this array. (For bitmap fonts, a font is a complete set of glyphs in one size, typeface, and style--for example, 12-point Geneva italic. For outline fonts, a font is a complete set of glyphs in one typeface and style--for example, Geneva italic.)The
FontSpec
record is defined as follows:
TYPE FontSpec = {font specification record} RECORD pictFontID: Integer; {font ID as stored in the picture} sysFontID: Integer; {font family ID} size: ARRAY[0..3] OF LongInt; {each bit set from 1 to 127 indicates a } { point size at that value; if bit 0 is } { set, then a size larger than 127 } { points is found} style: Integer; {styles used for this font family} nameOffset: LongInt; {offset to font name stored in the } { data structure indicated by the } { fontNamesHandle field of the PictInfo } { record} END;
Field Description
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--which consists of a complete set of fonts for one typeface including all available styles and sizes of the glyphs in that typeface--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:TYPE StyleItem = (bold, italic, underline, outline, shadow, condense, extend); Style = SET OF StyleItem;When you are finished using the information returned in a
nameOffset
- The offset into the list of font names (indicated by the
fontNamesHandle
field of thePictInfo
record) at which the name for this font family is stored. A font name, such as Geneva, is given to a font family to distinguish it from other font families.FontSpec
record, you should use theDisposeHandle
procedure (described in Inside Macintosh: Memory) to dispose of the memory allocated to it.See the chapter "Font Manager" in Inside Macintosh: Text for more information about fonts.