4.5 Patch table

Patching a bitmap data means to set patch information into a patch table against a virtual bitmap index table.

4.5.1 Virtual bitmap index table

A virtual bitmap index table consists of the following three tables. No RASTEL font file contain the virtual bitmap index table but the program that accesses the font file will build it on memory.

1. SBCS character index

It stores the character bitmap index of SBCS character codes from 0 to 255. The definition is as follows:

2. First DBCS character width table

This is a character table for 7936 characters with lead bytes of 0x81 through 0x9F in Shift JIS code. The index definition of the array is given below.

The first subscript is the value "lead byte - 0x81". The second subscript is the value "trailer byte - 0x40".

3. Second DBCS character width table

This is a character table for 7424 characters with lead bytes of 0xE0 through 0xFC in Shift JIS code. The index definition of the array is given below.

The first subscript is the value "lead byte - 0xe0". The second subscript is the value "trailer byte - 0x40".

4.5.2 Patch table structure (Necessary)

The definition of a patch table is given below.

Information for one character is as follows:


 typedef struct {
      USHORT OffsetInSegment;

The offset position in the virtual bitmap index table.
      
      BITMAP_INDEX TheIndex;

The content to substitute.

} ONE_PATCH;

typedef struct {
     USHORT NumberOfPatchs;
Number of patches (0 if there is no character to patch)


      ONE_PATCH patchs[];    /* Repeated as many times as the number of patches */

Content of patch

} PATCH_TABLE;