Vertical Writing with Proportional Fonts

background image

Vertical Writing with Proportional Fonts

The Character Text Path Direction command was introduced with the
HP LaserJet 4PJ printer to allow users to vertically rotate Asian fonts
which were dual pitched. That is, the single-byte characters were
half-width and the other characters were full-width.

An algorithm was implemented to determine whether or not to
counter-rotate characters when using the vertical-rotated printing
mode of the Character Text Path Direction command. A character is
rotated if the glyph is full-width; otherwise, the character is not
rotated.

Since the introduction of the LaserJet 4PJ, many vendors have
produced proportional versions of their Asian fonts. Thus, the
algorithm described above is no longer appropriate for determining
character rotation.

A new method to explicitly enumerate which characters should be
counter-rotated in the font is being introduced with HP LaserJet 5 and
5M printers. The new method consists of adding an optional font
segment to Font Format 16. The optional segment, which is called the
Vertical Exception (VE) segment, has the following form:

UBYTE[2] SEGMENT ID

= 'VE'

UBYTE Format

= 0

(other values reserved)

UBYTE NumRanges

= N

UINT16 Range1FirstCode

UINT16 Range1LastCode

UINT16 RangeNFirstCode

UINT16 RangeNLastCode

background image

ENWW

Printer-Specific Differences 2-101

The new algorithm for deciding whether or not to counter-rotate
characters (when using the Character Text Path Direction command’s
vertical-rotated printing mode) is as follows:

if (the current font contains a VE segment)

{

if(the character code* is NOT contained in

a VE range)

rotate

else

don't rotate

}

else

use the old logic

* The original character code, even if a galley character were
substituted at some point.

Examples:

Japanese ShiftJIS

Japanese Unicode

Segment ID

V

E

V

E

Format/NumRanges

0

1

0

2

Range1FirstCode

0x0000

0x0000

half-width latin
characters

Range1LastCode

0x00FF

0x007F

Range2FirstCode

0xFF61

half-width
katakana

Range2LastCode

0xFF9F

background image

2-102 Printer-Specific Differences

ENWW