Font Header Format

background image

Font Header Format

Font Header Format 16 was introduced because some font data
segments in large fonts could be larger than 65535 bytes, and this
was not supported by Font Header Format 15. The structures of
Format 15 and Format 16 are identical with the exception of the
Segment Size field in the Segmented Font Data format. Table 2-10
below shows the Format 15 and Format 16 Font Header format.
Table 2-11 shows the Format 15 Segmented Font Data format.
Table 2-12 shows the Format 16 Segmented Font Data format. Note
that Format 15 does not support bitmap fonts.

background image

ENWW

Printer-Specific Differences 2-63

Table 2-6. Format 15 and Format 16 Font Header

Byte

15 (MSB)

8

7

(LSB) 0

0

Font Descriptor Size (minimum 72)

2

Header Format (15 or 16)

Font Type

4

Style MSB

Reserved

6

Baseline Position

8

Cell Width

10

Cell Height

12

Orientation

Spacing

14

Symbol Set

16

Pitch (default HMI)

18

Height

20

x-Height

22

Width Type

Style LSB

24

Stroke Weight

Typeface LSB

26

Typeface MSB

Serif Style

28

Quality

Placement

30

Underline Position (Distance)

Underline Thickness

32

Text Height

34

Text Width

36

First Code

38

Last Code/Number of Characters

40

Pitch Extended

Height Extended

42

Cap Height

44 - 47 Font Number

48 - 63 Font Name

64

Scale Factor

66

Master Underline Position

68

Master Underline Thickness

70

Font Scaling Technology

Variety

72

. . .

[additional data may be inserted here]

Desc.

Size

. . .

Segmented Font Data

. . .

# - 2

Reserved (0)

Checksum

background image

2-64 Printer-Specific Differences

ENWW

Table 2-7. Format 15 Segmented Font Data

Table 2-8. Format 16 Segmented Font Data

Byte

15 (MSB)

8

7

(LSB) 0

x + 0

First segment, Segment Identifier

x + 2

First segment, Segment Size

x + 4

. . .

First segment, Data Segment
. . .

x + 4
+ 1st

seg size

Second segment: Segment identifier,
Size, Data Segment
. . .

. . .

. . .

# - 6

Null Segment Identifier (FFFF - hex)

# - 4

Null Segment Size (0)

# - 2

Reserved (0)

Checksum

x = Font Descriptor Size
# = Font header length (as defined in the Font Header command).

Byte

15 (MSB)

8

7

(LSB) 0

x + 0

First segment, Segment Identifier

x + 2
x + 4

First segment, Segment Size

x+ 6

. . .

First segment, Data Segment
. . .

x + 6
+ 1st

seg

size

Second segment: Segment identifier,
Size, Data Segment
. . .

. . .

. . .

# - 8

Null Segment Identifier (FFFF - hex)

# - 6
# - 4

Null Segment Size (0)

# - 2

Reserved (0)

Checksum

x = Font Descriptor Size
# = Font header length (as defined in Font Header command).

background image

ENWW

Printer-Specific Differences 2-65

The Segment Size field, which is part of each segment within the
Segmented Font Data, was changed from an unsigned integer in
Format 15 to an unsigned long integer in Format 16. This allows
segments to be up to 2

32

– 1 bytes long.

Font Header Format 15 is described in more detail in the PCL 5
Printer Language Technical Reference Manual
in the “Soft Font
Creation” chapter.

Format 16 supports new segments and new values for the Font Type
and Font Scaling Technology fields. New segments which are specific
to large TrueType fonts are described in this chapter in the section
titled “HP LaserJet 4PJ printer.” (This information will included be in
future versions of the PCL 5 Printer Language Technical Reference
Manual
.) The new segments and values which are specific to bitmap
fonts are described below.

Header Format

The Header Format byte identifies the font header format. For large
fonts, this field should be set to 16. Note that Format 15 does not
support bitmap fonts.

Scale Factor

For bitmap fonts, set this field to 0.

Master Underline Position

For bitmap fonts, set this field to 0.

Master Underline Thickness

For bitmap fonts, set this field to 0.

Font Scaling Technology

For bitmap fonts, set this field to 254.

background image

2-66 Printer-Specific Differences

ENWW

Variety

For bitmap fonts, set this field to 0.

The remaining fields should be set the same as in the Format 0 Font
Header for PCL Bitmapped Fonts, with the following exceptions:

Font Type

Font type describes the font's relation to symbol sets. For Format 16
bitmap fonts, set this field to 3. A value of 3 is used to identify a large
(16-bit) font. All character codes 0 to 65534 are printable, except 0, 7
to 15, and 27 [decimal]. Access to those codes which are unprintable,
yet have a character defined, requires the use of the Transparent
Print Data command. In older font header formats, PCL 5 LaserJet
printers use this field to determine the first and last codes of the
symbol set.

First Code

For Format 16 bitmap fonts, set this field to the first printable
character in the font. In older bitmap font formats, PCL 5 LaserJet
printers ignore this field.

Last Code

For Format 16 bitmap fonts, set this field to the last printable
character in the font. In older bitmap font formats, PCL 5 LaserJet
printers ignore this field.

One new data segment is defined for Format 16 bitmap fonts:

Bitmap Resolution Data Segment

The bitmap resolution data segment is used to define the x-resolution
and y-resolution for the bitmap. This segment is required for Format
16 bitmap fonts.

The structure for the bitmap segment is shown in Table 2-13.

background image

ENWW

Printer-Specific Differences 2-67

Table 2-9. Bitmap Resolution Data Segment

The decimal equivalent for the ‘BR’ mnemonic is 16978.

X Resolution (unsigned long integer)

This fields specifies the resolution of the font in the X dimension in
dots per inch.

Y Resolution (unsigned long integer)

This fields specifies the resolution of the font in the Y dimension in
dots per inch.

If the specified combination is not supported by the printer, the font
will be invalidated. In the HP LaserJet 4V, supported combinations
are (X Resolution=300,Y Resolution=300) and (X Resolution=600,Y
Resolution=600).