Description of Font Header Segments
Each font header data segment contains three parts:
• Segment Identifier
• Data Segment Size
• Data Segment
Segment
1
LJ 4PJ
LJ 4V/
4MV
LJ 4LC LJ 4LJ
Pro
DJ 1600 LJ 5P
Galley Character – GC
✓
✓
✓
✓
✓
✓
Vertical Substitution – VT
✓
✓
✓
✓
✓
✓
Typeface string – TF
✓
✓
✓
✓
✓
ns
Vertical Rotation – VR
✓
✓
✓
✓
✓
✓
Character Enhancement –
CE
✓
✓
✓
✓
✓
✓
Bitmap Resolution – BR*
ns
✓
✓
✓
ns
✓
TrueType fonts
✓
✓
✓
✓
✓
✓
Bitmap fonts*
ns
✓
✓
✓
ns
✓
ns – not supported
*
Format 16 bitmap font support is described beginning on page 2-63.
1
These segments are supported for the HP LaserJet 5Si and all later LaserJet printers.
ENWW
Printer-Specific Differences 2-37
Segment Identifier Values
The Segment Identifier Values for the Galley Character, Vertical
Substitution Character, Typeface String, Vertical Rotation, and
Character Enhancement Segments are as shown in the following
table.
Data Segment Size
The Data Segment Size indicates the number of bytes in the
immediately following Data Segment. The size of this field is 4 bytes
for Font Format 16 fonts, and 2 bytes for Font Format 15 fonts. The
rest of the data segments are identical for both font formats.
Galley Character Segment
If an application requests a character that does not exist within the
current font, the printer checks the Galley Character Segment for a
substitute character to print instead. The Galley Character Segment
specifies the character codes of the substitute characters to be
printed. A different galley character can be specified for different
regions of the symbol set. For example, this segment can be set up
so that an asterisk prints when a non-existent character is selected in
the region 0x81 - 0x9F, and a question mark for characters in the
region 0xE0-0xFC.
Value
Mnemonic*
Data Segment
18243
GC
Galley Character Segment
22100
VT
Vertical Substitute Segment
21574
TF
Typeface String Segment
22098
VR
Vertical Rotation Segment
17221
CE
Character Enhancement Segment
* The mnemonic is obtained when the two bytes of this big-endian word are treated as
ASCII characters.
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
GC (18243)
1
2
4
Data Segment Size (6*n+6) *
3
5
6
Format = 0
7
8
Default Galley Character
9
2-38 Printer-Specific Differences
ENWW
• Default Galley Character (UI). Character code of the
character to be printed when a specified character is not within
any of the defined regions.
• Number of Regions (UI). Number of regions for which galley
characters are defined. Regions are defined for a table in
which the first character code byte specifies the row and the
second byte specifies the column.
• Region #x Upper Left Character Code (UI). Character code
defining upper left corner of Region #x.
• Region #x Lower Right Character Code (UI). Character
code defining lower right corner of Region #x.
• Region #x Galley Character (UI). Character code of the
character to be printed when a character within Region #x is
missing from the selected font.
If the value of the galley character field is 0xFFFF, then if the font
contains a missing character glyph, that glyph is printed. The missing
character glyph can be downloaded using the PCL Download
Character command with a character code = 0xFFFF and a glyph
ID = 0.
If both the character specified by the original character code and by
the galley character code are missing, the CAP is advanced in
accordance with previous PCL rules for missing characters, that is, it
is advanced according to the current setting of HMI (Horizontal
Motion Index).
10
Number of Regions (n)
11
12
Region #1 Upper Left Character Code
13
14
Region #1 Lower Right Character Code
15
16
Region #1 Galley Character
17
. . .
. . .
6*n+6
Region #n Upper Left Character Code
6*n+7
6*n+8
Region #n Lower Right Character Code
6*n+9
6*n+10
Region #n Galley Character
6*n+11
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
Byte
15 (MSB) 8
7 (LSB) 0
Byte
ENWW
Printer-Specific Differences 2-39
The Galley Character Segment will be invalid if the format number is
not supported or if the segment size declared in the Segment Size
field is larger or smaller than required for the number of regions (N). If
the segment is invalid, the font download will be ignored.
Galley Character Segments can be downloaded with any Font Format
15 or 16 font, regardless of font type.
The Galley Character Segment can be used to implement a
requirement of the Microsoft Windows Version 3.1, Japanese Version,
Microsoft Standard Character Set Specification (March 11, 1993),
which states “when there is an output request for a character of a
specified typeface, even if the glyph corresponding to the specified
character code does not exist, some glyph data will be output. For
double-byte characters, the glyph of the default character defined for
the given TrueType font is used. For single-byte characters, the glyph
at 0xA5 (small dot, U+FF65) is used.”
The following table shows a Galley Character Segment which follows
the Japanese Windows specification.
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
GC (18243)
1
2
4
Data Segment Size (12) *
3
5
6
Format = 0
7
8
Default Galley Character = 0xFFFF
9
10
Number of Regions (n) = 1
11
12
Region #1 Upper Left
Character Code = 0x0000
13
14
Region #1 Lower Right
Character Code = 0x00FF
15
16
Region #1 Galley Character = 0x00A5
17
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
2-40 Printer-Specific Differences
ENWW
In this example segment, there is one galley character region. This
region is applied to all one-byte characters (character codes
0x0000-0x00FF); any missing character in this region is replaced with
the character at character code location 0x00A5. Any missing
characters falling into this region (e.g. character codes 0x0100 -
0xFFFF) are replaced with the default galley character. Since in this
example the Default Galley Character field = 0xFFFF, the missing
character glyph is printed if it is present in the font.
Vertical Substitution Segment
The Vertical Substitution Segment contains pairs of glyph IDs. Each
pair specifies the horizontal and vertical glyph ID for a character. The
segment can be built directly from a TrueType mort table which
contains a vertical substitution array. The segment definition is shown
in the table below.
The Horizontal Glyph ID field is used by TrueType as an ID number for
the horizontal glyph data associated with a given character. The
Vertical Glyph ID field contains the ID number for the vertical glyph
data associated with the same character.
The vertical glyphs can be downloaded using the PCL Character
Definition Command using a character code = 0xFFFF.
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
VT (22100)
1
2
4
Data Segment Size (4*n+4) *
3
5
6
Horizontal Glyph ID #1
7
8
Vertical Glyph ID #1
9
. . .
. . .
4*n+2
Horizontal Glyph ID #n
4*n+3
4*n+4
Vertical Glyph ID #n
4*n+5
4*n+6
End of table mark #1 = 0xFFFF
4*n+7
4*n+8
End of table mark #2 = 0xFFFF
4*n+9
ENWW
Printer-Specific Differences 2-41
A TrueType mort table typically contains a header of 76 bytes,
followed by the vertical substitution array which follows the segment
format described here. However, the mort table header is designed to
be variable-length, and the location of the vertical substitution data
may be located elsewhere in mort tables in future fonts.
If the Font Type is not Type 3 (16-bit fonts), this data segment is
ignored.
If the value pairs are not sorted by horizontal glyph ID, the data
segment is invalid. If the End of Table mark #1 is not 0xFFFF, the data
segment is invalid. The location of the end of the table is determined
using the Data Segment Size field. If the segment is invalid, the font
download is ignored.
Typeface String Segment
The purpose of this segment is to provide a substitute string to print
for a permanent downloaded font when doing a PCL Typeface List
printout. It has the following structure:
Embedded Font Name Flag (UB)—A zero value in this field is used to
indicate that the ASCII name of the font (from the Font Name field)
should be printed in addition to the substitute string. A non-zero value
is used to indicate that only the substitute string should be printed.
• Substitute String Length (UB)—the number of UI characters in
the Substitute String Character List.
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
TF (21574)
1
2
4
Data Segment Size (2*n+2) *
3
5
6
Embedded Font
Name Flag
Substitute String
Length (n)
7
8
Substitute String Character List
9
. . .
. . .
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
2-42 Printer-Specific Differences
ENWW
• Substitute String Character List (array of UI)—the characters
which make up the substitute string. Each character is
represented as a UI value. If the font is a bound font, then the
values are accessed by their character codes values; if the font
is unbound, then the Unicode index numbers (see
Appendix D) are used.
The Typeface String Segment will be invalid if the Data Segment Size
declared in the Data Segment Size field is larger or smaller than
required for substitute string length, or if the Data Segment Size is an
odd number of bytes. If the segment is invalid, the font download will
be ignored.
Typeface String Segments can be downloaded with any Font
Format 15 or Font Format 16 font, regardless of font type.
The following tables are examples of Typeface String Segments for
two downloaded fonts. The first is for MS Mincho, and has the
embedded font name flag set to true. The second is for MS Gothic,
and has the embedded font name flag set to false.
MS Mincho
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
TF (21574)
1
2
4
Data Segment Size
(10) *
3
5
6
Embedded Font
Name Flag = 1
Substitute String
Length = 4
7
8
10
12
14
Substitute String Character List =
0x826c (Note: these are full-width
0x8272 Shift-JIS character codes
0x96be for “MS” and Kanji “Mincho”)
0x92a9
9
11
13
15
ENWW
Printer-Specific Differences 2-43
MS Gothic
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
TF (21574)
1
2
4
Data Segment Size
(14) *
3
5
6
Embedded Font
Name Flag = 0
Substitute String
Length = 6
7
8
10
12
14
16
18
Substitute String Character List =
0x826c (Note: these are full-width
0x8272 Shift-JIS character codes
0x8353 for “MS” and Katakana for
0x8356 “Gothic”)
0x8362
0x834e
9
11
13
15
17
19
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
2-44 Printer-Specific Differences
ENWW
The following illustration shows how the PCL Typeface List would
look.
Vertical Rotation Segment
The Vertical Rotation Segment is used to define the lower boundary
of the rotation box used when the character text path direction is set
to vertical rotation. This is an optional segment which may be
downloaded with Font Format 16 TrueType fonts.
The following illustration shows an example of character rotation. The
boxes around each character represent the vertical rotation box. The
distance between the baseline and the bottom of the character box is
represented by the Descender value in the Vertical Rotation
Segment.
ENWW
Printer-Specific Differences 2-45
The structure of the Vertical Rotation Segment is:
• Format (UINT16)—Set this value to 0.
• Descender Value (SINT16)—Set this value to equal the
“sTypoDescender” value from the “OS/2” table of the TrueType
font.
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
VR (22098)
1
2
4
Data Segment Size (4) *
3
5
6
Format (0)
7
8
Descender value
9
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
2-46 Printer-Specific Differences
ENWW
• If the Vertical Rotation Segment is not downloaded with the
font definition, a default value is used for the Descender value.
The default value is set to the following:
Descender value = -36/256 * ScaleFactor
Where: ScaleFactor is Bytes 64 and 65 from the Font Format
16 Font Header.
Character Enhancement Segment
This segment indicates whether the pseudo-bold or pseudo-italic
enhancements can be performed on a downloaded font.
The structure of the Character Enhancement Segment is:
• Style (UINT32)—This field specifies the style types that the
printer is allowed to perform on the font characters.
Byte
15 (MSB) 8
7 (LSB) 0
Byte
0
CE (17221)
1
2
Data Segment Size (8)
3
4
5
6
Style
7
8
9
10
Stroke Weight
11
12
Reserved
13
* This segment is for Font Format 16. The Data Segment Size field for Font Format 16
fonts is 4 bytes; the segment for Font Format 15 fonts is identical except the Data
Segment Size field is 2 bytes instead.
31
4
3
0
Reserved
Posture
Bit Positions (#) = Posture
1
= Italics
0, 2, 3
= Reserved
ENWW
Printer-Specific Differences 2-47
• Stroke Weight (UINT16)—This field specifies the stroke
weights which the printer is allowed to provide using the
pseudo-bold enhancement algorithm.
Note
Only stroke weights greater than the stroke weight of the font can be
provided using the pseudo-bold enhancement algorithm.
15 0
Stroke weight
Bit Position (#) = Stroke Weight
0 = Reserved
8 = “Book” or “Text” Weight
1 = Ultra Thin
9 = Semi-Bold
2 = Extra Thin
10 = Demi-Bold
3 = Thin
11 = Bold
4 = Extra Light
12 = Extra Bold
5 = Light
13 = Black
6 = Demi Light
14 = Extra Black
7 = Semi Light
15 = Ultra Black
2-48 Printer-Specific Differences
ENWW