<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Glyph Designer Binary Export Format]]></title><description><![CDATA[<p>As well as outputting the data as a text based file, there is also a binary based file format.</p>
<h4>Header</h4>
<p>The first three bytes of the header are the file identifier and are always set to 66, 77, 70 (BMF). The fourth byte is the version which is currently 3.</p>
<p>After the header are a number of blocks based on the tags described above.</p>
<h4>Block type 1: info</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>fontsize</td>
<td>2</td>
<td>int</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>bitField</td>
<td>1</td>
<td>bits</td>
<td>2</td>
<td>bit 0:smooth bit 1:unicode bit 2:italic bit 3:bold bit 4:fixedHeight bits 5-7:reservered</td>
</tr>
<tr>
<td>charSet</td>
<td>1</td>
<td>uint</td>
<td>3</td>
<td></td>
</tr>
<tr>
<td>stretchH</td>
<td>2</td>
<td>uint</td>
<td>4</td>
<td></td>
</tr>
<tr>
<td>aa</td>
<td>1</td>
<td>uint</td>
<td>6</td>
<td></td>
</tr>
<tr>
<td>paddingUp</td>
<td>2</td>
<td>uint</td>
<td>7</td>
<td></td>
</tr>
<tr>
<td>paddingRight</td>
<td>1</td>
<td>uint</td>
<td>8</td>
<td></td>
</tr>
<tr>
<td>paddingDown</td>
<td>1</td>
<td>uint</td>
<td>9</td>
<td></td>
</tr>
<tr>
<td>paddingLeft</td>
<td>1</td>
<td>uint</td>
<td>10</td>
<td></td>
</tr>
<tr>
<td>spacingHoriz</td>
<td>1</td>
<td>uint</td>
<td>11</td>
<td></td>
</tr>
<tr>
<td>spacingVert</td>
<td>1</td>
<td>uint</td>
<td>12</td>
<td></td>
</tr>
<tr>
<td>outline</td>
<td>1</td>
<td>uint</td>
<td>13</td>
<td></td>
</tr>
<tr>
<td>fontName</td>
<td>n+1</td>
<td>string</td>
<td>14</td>
<td>null terminated string with length n</td>
</tr>
</tbody>
</table>
<h4>Block type 2: common</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>lineHeight</td>
<td>2</td>
<td>uint</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>base</td>
<td>2</td>
<td>uint</td>
<td>2</td>
<td></td>
</tr>
<tr>
<td>scaleW</td>
<td>2</td>
<td>uint</td>
<td>4</td>
<td></td>
</tr>
<tr>
<td>scaleH</td>
<td>2</td>
<td>uint</td>
<td>6</td>
<td></td>
</tr>
<tr>
<td>pages</td>
<td>2</td>
<td>uint</td>
<td>8</td>
<td></td>
</tr>
<tr>
<td>bitField</td>
<td>1</td>
<td>bits</td>
<td>10</td>
<td>bits 0-6:reserved, bit 7:packed</td>
</tr>
</tbody>
</table>
<h4>Block type 3: pages</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>pageNames</td>
<td>p*(n+1)</td>
<td>strings</td>
<td>0</td>
<td>null terminated strings, each with length n</td>
</tr>
</tbody>
</table>
<h4>Block type 4: chars</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>4</td>
<td>uint</td>
<td>0+c*20</td>
<td>these fields are repeated until all characters have been described</td>
</tr>
<tr>
<td>x</td>
<td>2</td>
<td>uint</td>
<td>4+c*20</td>
<td></td>
</tr>
<tr>
<td>y</td>
<td>2</td>
<td>uint</td>
<td>6+c*20</td>
<td></td>
</tr>
<tr>
<td>width</td>
<td>2</td>
<td>uint</td>
<td>8+c*20</td>
<td></td>
</tr>
<tr>
<td>height</td>
<td>2</td>
<td>uint</td>
<td>10+c*20</td>
<td></td>
</tr>
<tr>
<td>xoffset</td>
<td>2</td>
<td>uint</td>
<td>12+c*20</td>
<td></td>
</tr>
<tr>
<td>yoffset</td>
<td>2</td>
<td>uint</td>
<td>14+c*20</td>
<td></td>
</tr>
<tr>
<td>xadvance</td>
<td>2</td>
<td>uint</td>
<td>16+c*20</td>
<td></td>
</tr>
<tr>
<td>page</td>
<td>1</td>
<td>uint</td>
<td>18+c*20</td>
<td></td>
</tr>
<tr>
<td>chnl</td>
<td>1</td>
<td>uint</td>
<td>19+c*20</td>
<td></td>
</tr>
</tbody>
</table>
<p>The number of characters in the file can be calculated by taking the size of the block and dividing it with the size of the charInfo structure, i.e. numChars = charsBlock.blockSize/20</p>
]]></description><link>https://forum.71squared.com/topic/41/glyph-designer-binary-export-format</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 08:42:02 GMT</lastBuildDate><atom:link href="https://forum.71squared.com/topic/41.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Oct 2015 20:59:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Glyph Designer Binary Export Format on Mon, 26 Oct 2015 09:21:54 GMT]]></title><description><![CDATA[<p>As well as outputting the data as a text based file, there is also a binary based file format.</p>
<h4>Header</h4>
<p>The first three bytes of the header are the file identifier and are always set to 66, 77, 70 (BMF). The fourth byte is the version which is currently 3.</p>
<p>After the header are a number of blocks based on the tags described above.</p>
<h4>Block type 1: info</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>fontsize</td>
<td>2</td>
<td>int</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>bitField</td>
<td>1</td>
<td>bits</td>
<td>2</td>
<td>bit 0:smooth bit 1:unicode bit 2:italic bit 3:bold bit 4:fixedHeight bits 5-7:reservered</td>
</tr>
<tr>
<td>charSet</td>
<td>1</td>
<td>uint</td>
<td>3</td>
<td></td>
</tr>
<tr>
<td>stretchH</td>
<td>2</td>
<td>uint</td>
<td>4</td>
<td></td>
</tr>
<tr>
<td>aa</td>
<td>1</td>
<td>uint</td>
<td>6</td>
<td></td>
</tr>
<tr>
<td>paddingUp</td>
<td>2</td>
<td>uint</td>
<td>7</td>
<td></td>
</tr>
<tr>
<td>paddingRight</td>
<td>1</td>
<td>uint</td>
<td>8</td>
<td></td>
</tr>
<tr>
<td>paddingDown</td>
<td>1</td>
<td>uint</td>
<td>9</td>
<td></td>
</tr>
<tr>
<td>paddingLeft</td>
<td>1</td>
<td>uint</td>
<td>10</td>
<td></td>
</tr>
<tr>
<td>spacingHoriz</td>
<td>1</td>
<td>uint</td>
<td>11</td>
<td></td>
</tr>
<tr>
<td>spacingVert</td>
<td>1</td>
<td>uint</td>
<td>12</td>
<td></td>
</tr>
<tr>
<td>outline</td>
<td>1</td>
<td>uint</td>
<td>13</td>
<td></td>
</tr>
<tr>
<td>fontName</td>
<td>n+1</td>
<td>string</td>
<td>14</td>
<td>null terminated string with length n</td>
</tr>
</tbody>
</table>
<h4>Block type 2: common</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>lineHeight</td>
<td>2</td>
<td>uint</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>base</td>
<td>2</td>
<td>uint</td>
<td>2</td>
<td></td>
</tr>
<tr>
<td>scaleW</td>
<td>2</td>
<td>uint</td>
<td>4</td>
<td></td>
</tr>
<tr>
<td>scaleH</td>
<td>2</td>
<td>uint</td>
<td>6</td>
<td></td>
</tr>
<tr>
<td>pages</td>
<td>2</td>
<td>uint</td>
<td>8</td>
<td></td>
</tr>
<tr>
<td>bitField</td>
<td>1</td>
<td>bits</td>
<td>10</td>
<td>bits 0-6:reserved, bit 7:packed</td>
</tr>
</tbody>
</table>
<h4>Block type 3: pages</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>pageNames</td>
<td>p*(n+1)</td>
<td>strings</td>
<td>0</td>
<td>null terminated strings, each with length n</td>
</tr>
</tbody>
</table>
<h4>Block type 4: chars</h4>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Size</th>
<th>Type</th>
<th>Pos</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>4</td>
<td>uint</td>
<td>0+c*20</td>
<td>these fields are repeated until all characters have been described</td>
</tr>
<tr>
<td>x</td>
<td>2</td>
<td>uint</td>
<td>4+c*20</td>
<td></td>
</tr>
<tr>
<td>y</td>
<td>2</td>
<td>uint</td>
<td>6+c*20</td>
<td></td>
</tr>
<tr>
<td>width</td>
<td>2</td>
<td>uint</td>
<td>8+c*20</td>
<td></td>
</tr>
<tr>
<td>height</td>
<td>2</td>
<td>uint</td>
<td>10+c*20</td>
<td></td>
</tr>
<tr>
<td>xoffset</td>
<td>2</td>
<td>uint</td>
<td>12+c*20</td>
<td></td>
</tr>
<tr>
<td>yoffset</td>
<td>2</td>
<td>uint</td>
<td>14+c*20</td>
<td></td>
</tr>
<tr>
<td>xadvance</td>
<td>2</td>
<td>uint</td>
<td>16+c*20</td>
<td></td>
</tr>
<tr>
<td>page</td>
<td>1</td>
<td>uint</td>
<td>18+c*20</td>
<td></td>
</tr>
<tr>
<td>chnl</td>
<td>1</td>
<td>uint</td>
<td>19+c*20</td>
<td></td>
</tr>
</tbody>
</table>
<p>The number of characters in the file can be calculated by taking the size of the block and dividing it with the size of the charInfo structure, i.e. numChars = charsBlock.blockSize/20</p>
]]></description><link>https://forum.71squared.com/post/41</link><guid isPermaLink="true">https://forum.71squared.com/post/41</guid><dc:creator><![CDATA[tom]]></dc:creator><pubDate>Mon, 26 Oct 2015 09:21:54 GMT</pubDate></item></channel></rss>