Important: The information in this document is obsolete and should not be used for new development.
DrawChar
TheDrawChar
procedure draws the glyph for the specified character at the current pen location in the current graphics port.
PROCEDURE DrawChar (ch: CHAR);
ch
- The character code whose glyph is to be drawn.
DESCRIPTION
TheDrawChar
procedure draws a single character's glyph and then advances the pen by the width of the glyph. If the glyph isn't in the font, the font's missing symbol is drawn. For more information, see "Individual Glyphs" on page 3-28.
- Note
- If you're drawing more than one character, it's faster to make
oneDrawString
orDrawText
call rather than a series ofDrawChar
calls.SPECIAL CONSIDERATIONS
Because it takes a single-byte value as thech
parameter,DrawChar
works only for 1-byte script systems. If you want to draw the glyph of a single character in a 2-byte script, call eitherDrawText
,DrawString
, orDrawJustified
.However, a series of calls to
DrawChar
in a 1-byte complex script system can give incorrect results because a text string is not always a simple concatenation of a series
of characters. In a contextual script, two different glyphs may be used to represent a single character in its contextual form and alone. To draw a sequence of text in a 1-byte complex script system, useDrawText
,DrawString
, orDrawJustified
instead.However, for 1-byte complex scripts, you can use
DrawChar
for special purposes, such as to include the isolated glyph of a character in a book's index, for example, to show a single glyph as it exists apart from contextual transformations.