Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Text
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
A printer driver provides supporting functions and values for text output,
such as maximum text width and height, character widths, and character
clipping.
 
Maximum Text Width and Height
 
The maximum width and length of text that can be printed on a page is
determined by choosing either the Portrait or Landscape orientation. In
Portrait orientation, the page is taller than wide, when viewing the text
upright. In Landscape orientation, the page is wider than tall, when viewing
the text upright.
 
Character Widths
 
Use the GetCharWidth function to determine character widths for
variable-width fonts. It is important that the values returned by this
function match and that the actual widths of the characters displayed. Any
differences will produce misalignments, and any text formatting or
justification will not work as intended.
 
Clipping Character Strings
 
Character strings should be clipped pixel-by-pixel like all other graphics,
whenever possible. Some types of printers, however, do not allow
pixel-precision clipping of device-based fonts. When this is the case, the
driver should clip character strings on a per-character basis.
 
A driver should clip a character if any part of the character is outside the
left or right edge of the clipping rectangle. If any part of the character
is outside the top or bottom edge of the clipping rectangle, the driver
should print the character.
 
 
                                      ♦