User Guide
Editing Fonts
81
Double-byte
If your font contains many characters from one of the Far-East languages
you may need to use double-byte codepages. If you select one of these
codepages, you will see an additional control to the right of the codepage
selection list:
This control allows you to select a “page” of the codepage. Theoretically, we
may have 256 pages of 256 codes each, which gives us 65,636 codes. In
practice none of the known codepages has that many codes and usually less
than half of that number.
How to Make a Codepage Definition File
Codepage definition files (extension CPG) are text files that have the following structure:
%%FONTLAB CODEPAGE: 0xFFFF; MS Windows 1251 Cyrillic
%%UN2/UN2
0x00 0x0000
0x01 0x0001
0x02 0x0002
0x03 0x0003
The first line of this file is an identification line that is used to set the codepage name and tell
FontLab that this file is a properly composed codepage definition file. This line must be started by
the text:
%%FONTLAB CODEPAGE: 0xFFFF;
The name of the codepage follows.
All other strings starting with ‘%’ are comments and are not interpreted by FontLab.
The following strings are formed as pairs of two integer numbers in decimal or hex (starting with
“0x”) form. The first number is the code of the character and should be in the 0-255 range. The
second number is the Unicode index of the character and should be in the 0-65535 (0-FFFFh) range.
The special Unicode index 0xFFFF is used to define codes that are not mapped to any character.