<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=GDOS_Font_file_format</id>
	<title>GDOS Font file format - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.temlib.org/AtariForumWiki/index.php?action=history&amp;feed=atom&amp;title=GDOS_Font_file_format"/>
	<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=GDOS_Font_file_format&amp;action=history"/>
	<updated>2026-05-13T18:55:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://www.temlib.org/AtariForumWiki/index.php?title=GDOS_Font_file_format&amp;diff=13446&amp;oldid=prev</id>
		<title>&gt;Lp: New page</title>
		<link rel="alternate" type="text/html" href="https://www.temlib.org/AtariForumWiki/index.php?title=GDOS_Font_file_format&amp;diff=13446&amp;oldid=prev"/>
		<updated>2017-01-20T08:12:06Z</updated>

		<summary type="html">&lt;p&gt;New page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Filenames ending with the extension '.FNT' represent bitmap font files. These files may&lt;br /&gt;
be utilized by loading them through any version of GDOS. FNT files are composed of a file&lt;br /&gt;
header, font data, a character offset table, and (optionally) a horizontal offset table.&lt;br /&gt;
&lt;br /&gt;
The FNT Header:&lt;br /&gt;
&lt;br /&gt;
Font files begin with a header 88 BYTEs long. WORD and LONG format entries in the header&lt;br /&gt;
must be byte-swapped as they appear in Intel ('Little Endian') format (see FONT_HDR &lt;br /&gt;
structure).&lt;br /&gt;
&lt;br /&gt;
The font header is formatted as follows:&lt;br /&gt;
&lt;br /&gt;
BYTE(s)    Contents                                       Related VDI Call&lt;br /&gt;
 0 -  1    Face ID (must be unique).                      vqt_name()&lt;br /&gt;
 2 -  3    Face size (in points).                         vst_point()&lt;br /&gt;
 4 - 35    Face name.                                     vqt_name()&lt;br /&gt;
36 - 37    Lowest character index in face (usually 32     vqt_fontinfo()&lt;br /&gt;
           for disk-loaded fonts).&lt;br /&gt;
38 - 39    Highest character index in face.               vqt_fontinfo()&lt;br /&gt;
40 - 41    Top line distance expressed as a positive      vqt_fontinfo()&lt;br /&gt;
           offset from baseline.&lt;br /&gt;
42 - 43    Ascent line distance expressed as a positive   vqt_fontinfo()&lt;br /&gt;
           offset from baseline.&lt;br /&gt;
44 - 45    Half line distance expressed as a positive     vqt_fontinfo()&lt;br /&gt;
           offset from baseline.&lt;br /&gt;
46 - 47    Descent line distance expressed as a positive  vqt_fontinfo()&lt;br /&gt;
           offset from baseline.&lt;br /&gt;
48 - 49    Bottom line distance expressed as a positive   vqt_fontinfo()&lt;br /&gt;
           offset from baseline.&lt;br /&gt;
50 - 51    Width of the widest character.                 N/A&lt;br /&gt;
52 - 53    Width of the widest character cell.            vqt_fontinfo()&lt;br /&gt;
54 - 55    Left offset.                                   vqt_fontinfo()&lt;br /&gt;
56 - 57    Right offset.                                  vqt_fontinfo()&lt;br /&gt;
58 - 59    Thickening size (in pixels).                   vqt_fontinfo()&lt;br /&gt;
60 - 61    Underline size (in pixels).                    vqt_fontinfo()&lt;br /&gt;
62 - 63    Lightening mask (used to eliminate pixels,     N/A&lt;br /&gt;
           usually 0x5555).&lt;br /&gt;
64 - 65    Skewing mask (rotated to determine when to     N/A&lt;br /&gt;
           perform additional rotation on a character&lt;br /&gt;
           when skewing, usually 0x5555).&lt;br /&gt;
66 - 67    Font flags as follows:                         N/A&lt;br /&gt;
             Bit  Meaning (if Set) &lt;br /&gt;
              0   Contains System Font&lt;br /&gt;
              1   Horizontal Offset Tables&lt;br /&gt;
                  should be used.&lt;br /&gt;
              2   Font data need not be byte-swapped. &lt;br /&gt;
              3   Font is mono-spaced.&lt;br /&gt;
68 - 71    Offset from start of file to horizontal        vqt_width()&lt;br /&gt;
           offset table.&lt;br /&gt;
72 - 75    Offset from start of file to character offset  vqt_width()&lt;br /&gt;
           table.&lt;br /&gt;
76 - 79    Offset from start of file to font data.        N/A&lt;br /&gt;
80 - 81    Form width (in bytes).                         N/A&lt;br /&gt;
82 - 83    Form height (in scanlines).                    N/A&lt;br /&gt;
84 - 87    Pointer to the next font (set by GDOS after    N/A&lt;br /&gt;
           loading).&lt;br /&gt;
&lt;br /&gt;
Font Data:&lt;br /&gt;
&lt;br /&gt;
The binary font data is arranged on a single raster form. The raster's height is the same&lt;br /&gt;
as the font's height. The raster's width is the sum of the character width's padded to&lt;br /&gt;
end on a WORD boundary.&lt;br /&gt;
&lt;br /&gt;
There is no padding between characters. Each character may overlap BYTE boundaries. Only&lt;br /&gt;
the last character in a font is padded to make the width of the form end on an even WORD&lt;br /&gt;
boundary.&lt;br /&gt;
&lt;br /&gt;
If bit #2 of the font flags header item is cleared, each WORD in the font data must be&lt;br /&gt;
byte-swapped.&lt;br /&gt;
&lt;br /&gt;
Character Offset Table:&lt;br /&gt;
&lt;br /&gt;
The Character Offset Table is an array of WORDs which specifies the distance (in pixels) &lt;br /&gt;
from the previous character to the next. The first entry is the distance from the start&lt;br /&gt;
of the raster form to the left side of the first character. One succeeding entry follows&lt;br /&gt;
for each character in the font yielding (number of characters + 1) entries in the table.&lt;br /&gt;
Each entry must be byte-swapped as it appears in Intel ('Little Endian') format.&lt;br /&gt;
&lt;br /&gt;
Horizontal Offset Table:&lt;br /&gt;
&lt;br /&gt;
The Horizontal Offset Table is an optional array of positive or negative WORD values&lt;br /&gt;
which when added to the values in the character offset table yield the true spacing &lt;br /&gt;
information for each character. One entry appears in the table for each character. This &lt;br /&gt;
table is not often used.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Back to [[ST Picture Formats]]&lt;/div&gt;</summary>
		<author><name>&gt;Lp</name></author>
	</entry>
</feed>