TGGlyphRun( const TFont& font, unsigned long numberOfGlyphs, const GlyphCode glyphs[], const GCoordinate xOffsets[], const GCoordinate yOffsets[] = NIL, const TGPoint& origin = TGPoint::kOrigin, TGGlyphRun::EAttachment attachment = TGGlyphRun::kHorizontal )
The locale is information such as formatting, country identifier, collating rules for a native language, and styling information that is specific to a particular region.
The y offset represents perpendicular offsets for superscripting or subscripting individual glyphs as shown in Figure 33
A glyph run can be attached to the origin horizontally or vertically (TGlyphRun::kHorizontal or TGGlyphRun::kVertical). When text is attached horizontally, the baseline corresponds to the x-axis.
The value kHorizontal is the default attachment. If you want vertical text like that shown in Figure 34
Glyph codes
The glyph code is an array of numbers (or codes) that are indices into the font to select the appropriate glyphs for that font. Along with the array of glyph codes, the TGlyphRun constructor takes an unsigned long numberOfGlyphs parameter that represents the number of glyphs in the text string. Origin
The origin represents the point in x-y coordinates where the glyph run starts. Offset
The individual glyphs are positioned by an x and y array of GCoordinate values that represent the locations of each glyph offset from the point of origin. Attachment
The x offset represents the baseline axis. As shown in Figure 32, each glyph is positioned at its offset location so that the glyph sits correctly on the baseline regardless of how far above or below the line it goes.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.