Class TtfSvgTable
Parsed OpenType "SVG " (Scalable Vector Graphics) table. Exposes per-glyph SVG document strings. Ref: OpenType spec §table-SVG.
Inherited Members
Namespace: DRIT.Drawing.Font.Ttf.Tables
Assembly: DRIT.Drawing.dll
Syntax
public sealed class TtfSvgTable : TtfTableBase
Fields
TableTag
The table tag for the SVG table.
Declaration
public const string TableTag = "SVG "
Field Value
| Type | Description |
|---|---|
| string |
Properties
DocumentCount
Number of SVG document records in the table.
Declaration
public int DocumentCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
GetSvgDocument(int)
Returns the SVG document string for glyphIndex, or
null if no document covers that glyph.
Declaration
public string? GetSvgDocument(int glyphIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | glyphIndex |
Returns
| Type | Description |
|---|---|
| string |
Remarks
Documents may cover a range of glyph IDs that share the same SVG. GZip-compressed documents (magic bytes 0x1F 0x8B) are decompressed automatically before being returned as a UTF-8 string.
Parse(byte[])
Parses the "SVG " table from its raw bytes.
Declaration
public static TtfSvgTable Parse(byte[] rawBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | rawBytes |
Returns
| Type | Description |
|---|---|
| TtfSvgTable |