GRASP font
(→Format details) |
|||
Line 24: | Line 24: | ||
|1 || byte[13] || Font name / filename, terminated by a NUL byte | |1 || byte[13] || Font name / filename, terminated by a NUL byte | ||
|- | |- | ||
− | |16 || byte || Number of | + | |16 || byte || Number of characters in the file. The maximum allowed might be 94. |
|- | |- | ||
− | |19 || byte || Glyph | + | |19 || byte || Glyph physical pixel width |
|- | |- | ||
|20 || byte || Glyph pixel height | |20 || byte || Glyph pixel height | ||
|- | |- | ||
− | |21 || byte || Number of bytes per row in a glyph bitmap | + | |21 || byte || Number of bytes per row in a glyph bitmap (?) |
|- | |- | ||
|25 || int16 || File size | |25 || int16 || File size | ||
|- | |- | ||
− | |59 || int16 | + | |59 || int16 || Unknown (''not'' a pointer to the bitmap for the space character, logical as that would be) |
|- | |- | ||
− | |249 || byte[ | + | |61 || int16[94] || Table of glyph bitmap offsets, relative to the beginning of the file |
+ | |- | ||
+ | |249 || byte || Unknown; possibly the width of a space character | ||
+ | |- | ||
+ | |250 || byte[94] || Table of glyph logical pixel widths | ||
|} | |} | ||
− | + | Character codes are approximately ASCII, with the first character in the tables being ASCII 33 ("!"). | |
Each glyph's bitmap, as stored in the file, is the same size. The "widths table" tells how many columns are meaningful. | Each glyph's bitmap, as stored in the file, is the same size. The "widths table" tells how many columns are meaningful. |
Latest revision as of 17:02, 7 January 2017
GRASP font is a bitmap font format associated with the GRASP animation software. Some GRASP GL archive files contain one or more GRASP font files.
See GRASP GL for more information about GRASP, and related formats.
It appears that there is a second GRASP font format, that is significantly different from the one that is documented. We'll call the documented format "original format", and the other format "new format".
Contents |
[edit] Format details
[edit] Original format
Files have a 7-byte header with no identifying signature, followed by the glyph bitmap data. See the Links section for documentation.
[edit] New format
This is a partial decoding of the format, based on reverse engineering and guesswork.
Offset | Type | Description |
---|---|---|
0 | byte | Always 0x10? |
1 | byte[13] | Font name / filename, terminated by a NUL byte |
16 | byte | Number of characters in the file. The maximum allowed might be 94. |
19 | byte | Glyph physical pixel width |
20 | byte | Glyph pixel height |
21 | byte | Number of bytes per row in a glyph bitmap (?) |
25 | int16 | File size |
59 | int16 | Unknown (not a pointer to the bitmap for the space character, logical as that would be) |
61 | int16[94] | Table of glyph bitmap offsets, relative to the beginning of the file |
249 | byte | Unknown; possibly the width of a space character |
250 | byte[94] | Table of glyph logical pixel widths |
Character codes are approximately ASCII, with the first character in the tables being ASCII 33 ("!").
Each glyph's bitmap, as stored in the file, is the same size. The "widths table" tells how many columns are meaningful.
[edit] Sample files
[edit] Original format
- GRASP11C.ZIP → *.SET
- cgademo.gl → chapter.set
- grafx.gl → square.set
[edit] New format
- duck.gl → rome25.set
- v7vga.gl → book.set
- AMULT.GL → gaston.set, helvet20.set, mysmall.set
- ACLOCK.GL → lcd.set
[edit] Links
- GRASP File Format Summary, from the Encyclopedia of Graphics File Formats ("Font File" section)
- glformat.txt ("Font Files" section)