Character Set Definition file
The Character Set Definition file specifies the character set attributes and font global identifier of the font. It is split into 2 sections, one for character sets [CHARSET] and one for font global identifiers [FGID].
Figure 14. The [CHARSET] section. Example of the character set
[CHARSET] section in the Character Set Definition
[CHARSET]
;charset = fgid, height, width, strikeover, underline
C?H200A0=2304,110,73,0,0
C?H200D0=2304,140,93,0,0
C?N200B0=2308,120,80,0,0
C?4200B0=416,120,144,0,0
C?D0GT15=230,80,96,0,0
C?A155A0=33207,110,73,0,0
C?A175A0=33227,110,73,0,0
C?T055D0=4407,140,93,0,0
C?T17500=4555,100,67,0,0
C?T17560=4555,60,40,0,0
DEFAULT =2308,80,0
The first section identified by the section header [CHARSET]
lists each AFP font character set and its corresponding attributes:
- Font global identifier (fgid)
- Font height
- Font width
- Strikeover
- Underline
Attribute | Possible Values | Shipped Default | Description |
---|---|---|---|
Fgid | IBM-defined FGID or your own defined FGID within this range: 3840 - 4095 or 65260 - 65534 | 2308 | A unique value that identifies the type family, typeface, and sometimes the point size of the character set. |
Height | 1 - 990 | 80 | The vertical size of the character set (minimal baseline-to-baseline value) expressed in tenths of a point. For example, a 9-point font would have a height of 90. |
Width | 0 - 99 (currently ignored) | 0 | The average horizontal size of the characters in 1440th of an inch. Currently, 0 is always used because Windows® determines an appropriate font width based on the font height. |
Strikeover | 1 (means yes), 0 (means no) | 0 | A font whose characters all have a line, parallel to the character baseline, placed over the middle of the character. |
Underline | 1 (means yes), 0 (means no) | 0 | A font whose characters all have a line, parallel to the character baseline, placed under the character. |
The second section, which is identified by the section
header [FGID], lists each font global identifier and its corresponding
attributes:
- Font type families
- Style
- Weight
- Italic
Figure 15. The [FGID] section. Example of the font global identifier
[FGID] section in the Character Set Definition file (CSDEF.FNT).
[FGID]
;fgid = familyname, style, weight, italic
230=Gothic,MODERN,MED,0
416=Courier,MODERN,MED,0
2304=Helvetica,SWISS,MED,0
2308=TimesNewRoman,ROMAN,MED,0
4407=SonoranSerif,ROMAN,MED,0
4555=SonoranSerif,ROMAN,BOLD,1
33207=SonoranSansSerif,SWISS,MED,1
33227=SonoranSansSerif,SWISS,BOLD,1
Attribute | Description | Possible Values | Shipped Default |
---|---|---|---|
Familyname | An outline font name or an AFP type family name. | Any Adobe Type 1 font name or AFP type family name. | TimesNewRoman |
Style | The same as a Windows "family". It is approximate to type family plus typeface style in AFP fonts. | SWISS, ROMAN, SCRIPT, MODERN, DISPLAY | ROMAN |
Weight | The degree of boldness of a typeface caused by different thickness of the strokes that form a graphic character. | LIGHT, MED, BOLD | MED |
Italic | A font whose characters slant to the right. | 1 (means yes), 0 (means no) | 0 |
Note:
- "Familyname" is the same as "type family" in AFP fonts and "typeface name" in Windows.
- "Style" is the same as Windows "family" and is roughly equivalent to "typeface style" and "type family" in AFP fonts.
- SWISS is a proportionally spaced font, without serifs.
- ROMAN is a proportionally spaced font, with serifs.
- SCRIPT is a fixed-pitch font that is designed to look like handwriting.
- MODERN is a fixed-pitch font, with or without serifs.
- DISPLAY is a decorative font.
Character Set Definition file rules
- Parameters must be separated by a comma. Table 10 and Table 11 list the possible values, and shipped default values for each parameter.
- In the [CHARSET] section of the file, only fgid and height (point size) are required.
- In the [FGID] section of the file, only the type familyname and style are required.
- A question mark (?) can be used as the wildcard character only for the second character in the character set name. This allows all the character rotations of the coded fonts to be handled with one entry while searching.
Note: A sequential search is performed for the character set,
and the first match is used (including the wildcard character).
- The [CHARSET] section must come before the [FGID] section.
- You can set a default character set. The default character set that is defined in the file must be the last entry in the [CHARSET] section.
- If you add your own AFP font character set to the [CHARSET] section, you must assign it a font global identifier. Font global identifiers that you create must be in the ranges of 3840 - 4095 or 65260 - 65534. If the new character set has the same familyname, style, weight, and italic attributes as an existing character set, you can use the same font global identifier; otherwise, you must add a unique font global identifier to the [FGID] section.