GEM Font
Jump to navigation
Jump to search
GEM Font
Format type | Font |
---|---|
Max glyph count | 256 |
Minimum glyph size (pixels) | 0×0 |
Maximum glyph size (pixels) | ? |
Access mode | Indexed |
Metadata? | None |
Bitmap glyphs? | Yes |
Vector glyphs? | No |
Compressed glyphs? | No |
Hidden data? | Yes |
Games |
GEM Font is a bitmap font format used in GEM, the Atari ST operating environment. It typically has a *.gft or *.fnt file extension when used in DOS projects. It was incorporated in the Genus Microprogramming graphics library which was used for various DOS games. The DOS version of NeoPaint uses the format for drawing text into bitmaps.
GEM Font Header
SoftType font format description taken from official Genus GX Development Series TXLIB.H header file.
Data Type | Name | Description |
---|---|---|
INT16LE | fid | Font ID. |
INT16LE | psize | Point size. |
char[32] | fntname | Font name. |
INT16LE | minch | Minimum character in [0..255] range. |
INT16LE | maxch | Maximum character in [0..255] range. |
INT16LE | topline | Top line distance. |
INT16LE | ascent | Ascent distance. |
INT16LE | halfline | Half line distance. |
INT16LE | descent | Descent distance. |
INT16LE | botline | Bottom line distance. |
INT16LE | maxwidth | Maximum character width. |
INT16LE | cellsize | Maximum cell size. |
INT16LE | leftofs | Left offset. |
INT16LE | rightofs | Right offset. |
INT16LE | thicken | Thicken pixels, for bolding. |
INT16LE | ulwidth | Underline width. |
INT16LE | lightmask | Lightening and... |
INT16LE | skewmask | ...Skew masks. |
INT16LE | flags | Font flags. |
INT32LE | hotptr | Horiz Offset Table pointer. |
INT32LE | cotptr | Char Offset Table pointer. |
INT32LE | bufptr | Data Buffer pointer. |
INT16LE | fwidth | Sum of all character widths. |
INT16LE | fheight | Number of character rows. |
To check if specified file is a correct file the following code can be used:
/* from official TXLIB.H header file */
/* GEM Font Header */
#pragma pack(push, 1)
typedef struct gemheader {
int16_t fid; /* Font ID */
int16_t psize; /* Point size */
char fntname[32]; /* Font name */
int16_t minch; /* Minimum character */
int16_t maxch; /* Maximum character */
int16_t topline; /* Top line distance */
int16_t ascent; /* Ascent distance */
int16_t halfline; /* Half line distance */
int16_t descent; /* Descent distance */
int16_t botline; /* Bottom line distance */
int16_t maxwidth; /* Maximum character width */
int16_t cellsize; /* Maximum cell size */
int16_t leftofs; /* Left offset */
int16_t rightofs; /* Right offset */
int16_t thicken; /* Thicken pixels, for bolding */
int16_t ulwidth; /* Underline width */
int16_t lightmask; /* Lightening and */
int16_t skewmask; /* Skew masks */
int16_t flags; /* Font flags */
int32_t hotptr; /* Horiz Offset Table pointer */
int32_t cotptr; /* Char Offset Table pointer */
int32_t bufptr; /* Data Buffer pointer */
int16_t fwidth; /* Sum of all character widths */
int16_t fheight; /* Number of character rows */
} GEMHEADER; /* sizeof(GEMHEADER) == 84 bytes */
#pragma pack(pop)
int txVerifyBuffer(GEMHEADER *gh) {
if (
(gh == NULL) ||
/* from disassembled TX_??.LIB library code */
(gh->fheight == 0) ||
(gh->fheight < gh->ascent) || (gh->ascent < 0) ||
(gh->ascent < gh->descent) || (gh->descent < 0) ||
((gh->ascent + gh->descent) > gh->fheight) ||
(gh->cellsize == 0) ||
(gh->maxch < gh->minch) ||
(gh->maxch >= 256)
) {
return(0);
}
return(1);
}
Credits
This format was researched by TheAlmightyGuru and CTPAX-X Team. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)
Links
Categories:
- All file formats
- All font formats
- Bitmap fonts
- Uncompressed fonts
- Sparse fonts
- Indexed fonts
- 3Fold
- The Amazon Trail
- The Ancient Art of War in the Skies
- Barney Bear Goes to the Farm
- Battles in Time
- Bible Concentration
- Bible Paint and Learn
- Bobby Fischer Teaches Chess
- Bridge Master
- Burning Steel: Entscheidung im Nordatlantik
- Christmas Matchup
- The Dark Half
- Davidic Matchup
- Every Good and Perfect Gift
- The Fall of Jericho!
- Fiery Darts
- Fireteam 2200
- Forerunners
- Fruit of the Spirit
- GameBuilder Professional
- Googol Math Games
- Googol Review
- The Grandest Fleet
- The Grandest Fleet 2
- Grandmaster Chess
- Great Naval Battles: North Atlantic 1939-1943
- Hopy-ONE
- In Christ!
- Jesus Matchup
- Jin City: The Adventures of Deming
- Journey to the Promised Land
- Kingdom Keys
- King's Glory Elite
- La Mitad Oscura
- Maker's Matchup
- Men of Renown
- Mental Math Games
- Moses Matchup
- My Cup
- The Oregon Trail
- NeoPaint
- Number Munchers
- Panoplia: The Full Armor of God
- Pro League Baseball
- Realm of the Paladin
- Rhema
- Sanctified Scrolls
- The Secret Island of Dr. Quandry
- Space Miner
- Sparky's Math Adventure
- Spellbound!
- Strip Poker Professional
- Super Munchers: The Challenge Continues
- Sword of the Spirit
- World Combat
- Taglit: Nahesh Ota!
- Wayne's World
- Where's Noah?
- Word Munchers
- Yogi Bear's Math Adventure