TrueType table lookup and font initialization. Validates font signatures, finds tables in the table directory, and initializes a font by locating all required tables and the cmap encoding.
Check if data at offset contains a valid TrueType/OpenType signature. Recognizes: 00-01-00-00 (standard), "true", "typ1", "OTTO".
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | data(:) | |||
| integer, | intent(in) | :: | offset |
Find a table by its 4-byte tag in the table directory. Returns the table byte offset, or 0 if not found.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | data(:) | |||
| integer, | intent(in) | :: | fontstart | |||
| character(len=4), | intent(in) | :: | tag |
Get font byte offset for a given index in a TTC collection. For a standalone font, index 0 returns 0. Returns -1 if the index is out of range or data is invalid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | data(:) | |||
| integer, | intent(in) | :: | index |
Initialize a TrueType font by locating all required tables and the cmap encoding subtable. Sets success=.false. if required tables are missing, no glyf table is present (CFF not supported), or no usable cmap encoding is found.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int8), | intent(in) | :: | data(:) | |||
| integer, | intent(in) | :: | fontstart | |||
| integer, | intent(out) | :: | loca | |||
| integer, | intent(out) | :: | head | |||
| integer, | intent(out) | :: | glyf | |||
| integer, | intent(out) | :: | hhea | |||
| integer, | intent(out) | :: | hmtx | |||
| integer, | intent(out) | :: | kern | |||
| integer, | intent(out) | :: | gpos | |||
| integer, | intent(out) | :: | index_map | |||
| integer, | intent(out) | :: | index_to_loc_format | |||
| integer, | intent(out) | :: | num_glyphs | |||
| logical, | intent(out) | :: | success |