Showing
2 changed files
with
18 additions
and
0 deletions
| @@ -54,6 +54,23 @@ class TtfParser { | @@ -54,6 +54,23 @@ class TtfParser { | ||
| 54 | tableSize[name] = size; | 54 | tableSize[name] = size; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | + assert(tableOffsets.containsKey(head_table), | ||
| 58 | + 'Unable to find the `head` table. This file is not a supported TTF font'); | ||
| 59 | + assert(tableOffsets.containsKey(name_table), | ||
| 60 | + 'Unable to find the `name` table. This file is not a supported TTF font'); | ||
| 61 | + assert(tableOffsets.containsKey(hmtx_table), | ||
| 62 | + 'Unable to find the `hmtx` table. This file is not a supported TTF font'); | ||
| 63 | + assert(tableOffsets.containsKey(hhea_table), | ||
| 64 | + 'Unable to find the `hhea` table. This file is not a supported TTF font'); | ||
| 65 | + assert(tableOffsets.containsKey(cmap_table), | ||
| 66 | + 'Unable to find the `cmap` table. This file is not a supported TTF font'); | ||
| 67 | + assert(tableOffsets.containsKey(maxp_table), | ||
| 68 | + 'Unable to find the `maxp` table. This file is not a supported TTF font'); | ||
| 69 | + assert(tableOffsets.containsKey(loca_table), | ||
| 70 | + 'Unable to find the `loca` table. This file is not a supported TTF font'); | ||
| 71 | + assert(tableOffsets.containsKey(glyf_table), | ||
| 72 | + 'Unable to find the `glyf` table. This file is not a supported TTF font'); | ||
| 73 | + | ||
| 57 | _parseFontName(); | 74 | _parseFontName(); |
| 58 | _parseCMap(); | 75 | _parseCMap(); |
| 59 | _parseIndexes(); | 76 | _parseIndexes(); |
-
Please register or login to post a comment