14
edits
m (→SVG Glyphs) |
|||
| Line 36: | Line 36: | ||
== The SVG table == | == The SVG table == | ||
We define a new optional OpenType table '<code>SVG </code>'. This table contains a UTF-8 encoded | We define a new optional OpenType table '<code>SVG </code>'. This table contains one or more UTF-8 encoded SVG documents defining SVG glyphs. | ||
The table begins with a header: | |||
{| class="wikitable" | |||
!Name | |||
!Type | |||
!Description | |||
|- | |||
|<code>numDocuments</code> | |||
|<code>USHORT</code> | |||
|The number of SVG documents contained in this table | |||
|- | |||
|<code>numIndices</code> | |||
|<code>USHORT</code> | |||
|The number of index entries (see below) in this table | |||
|} | |||
This is followed by <code>numDocuments</code> document headers describing the location and length of the SVG documents: | |||
{| class="wikitable" | |||
!Name | |||
!Type | |||
!Description | |||
|- | |||
|<code>offset</code> | |||
|<code>ULONG</code> | |||
|The offset of the document into the SVG table | |||
|- | |||
|<code>length</code> | |||
|<code>ULONG</code> | |||
|The length of the document | |||
|} | |||
Then <code>numIndices</code> index entries: these specify which documents should be searched for which ranges of glyph IDs. | |||
{| class="wikitable" | |||
!Name | |||
!Type | |||
!Description | |||
|- | |||
|<code>startGlyphId</code> | |||
|<code>USHORT</code> | |||
|The first glyph ID mapped by this entry | |||
|- | |||
|<code>endGlyphId</code> | |||
|<code>USHORT</code> | |||
|The last glyph ID mapped by this entry | |||
|- | |||
|<code>documentId</code> | |||
|<code>USHORT</code> | |||
|The (zero-indexed) document index which should be searched for glyphs in this range | |||
|} | |||
Finally, the SVG documents themselves which are to be UTF-8 encoded, and whose length and offset are described by the document list above. | |||
If the index contains overlapping glyph ID ranges, the earlier entry wins. | |||
== Structure of the SVG Document == | == Structure of the SVG Document == | ||
edits