Unicode and Fonts
100-88002 Rev B Page 211
Font Size and Spacing command interactions
There are interactions between some of the following commands and some of the
legacy font selection commands. These interactions need to be considered when
developing a application for this printer.
This printer uses a font rendering engine that relies on the font to provide character
size and spacing information. Unfortunately, legacy applications assume all
characters are the same and that the character size and spacing is fixed. To force the
characters rendered by the font rendering engine to conform to legacy modes of
operation, some post generation processing is performed to reposition the characters
into a fixed size cell.
The set minimum character height and width ([ESC] + P and [ESC] + p), the set
character spacing ([ESC] + I, [ESC] + i, [ESC] + J and [ESC] + j), the set minimum line
spacing ([ESC] + V and [ESC] + v), and the legacy font select and spacing
commands all interact.
The set minimum character height and width ([ESC] + P and [ESC] + p) commands
set character size but in two different ways. In most systems a character point size
refers only to the line spacing and indirectly to the character height. That is also true.
The vertical character height referenced in these commands refer to the character
height including the white space between lines. The horizontal character width is
defined by the font. Normally only the character height would be specified and the
width would be defined by the font and that’s how these commands work if the Width
is defined as zero. If the width is defined as zero this is used as a flag to the printer to
generate characters as defined by the font and use the character width returned by
the font. In effect the vertical point size passed to the font rendering engine is the
same as the horizontal value. The added effect of the width being passed as zero is
that any enforced horizontal spacing is disables. IE the effect of the [ESC] + I, [ESC]
+ i, [ESC] + J and [ESC] + j commands are disabled. If the width is not zero, the
[ESC] + I, [ESC] + i, [ESC] + J and [ESC] + j remain in effect and only the resulting
character size is changed, the horizontal spacing is not changed.
The legacy [ESC] ! <n> select the print mode effectively issues a set minimum
character height and width command followed by a set character spacing command
without effecting the pseudo fixed spacing flag.
The pseudo fixed spacing flag is a further complication required for dealing with fonts
that are not truly fixed pitch. In some cases a fixed pitch font will have more that one
character size depending on what the character is used for. This generally only
affects Asian fonts where the ideograms are generally twice as wide as Latin
characters. In fixed spacing mode, the printer will put the rendered character at
whatever spacing is requested even if they don’t fit. If the character is too big, it will
overlap the previous and next character. To allow a fixed pitch operation that deals
with small and large fixed pitch character, the printer has a pseudo-fixed pitch flag
that will increase the spacing in multiples of the requested spacing until it fits.
The following table lists the commands and how they interact.