- "html": "<p>For each <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/otff#table-directory\">font table</a> listed in <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches-tables\" id=\"ref-for-glyphpatches-tables②\">tables</a>, with index <code>i</code>:</p>\n <ul>\n <li data-md=\"\">\n <p>Using the corresponding table in <var>base font subset</var>, synthesize\na new table where the data for each glyph is replaced with the data corresponding to that glyph index\nfrom <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches-glyphdata\" id=\"ref-for-glyphpatches-glyphdata\">glyphData</a> if present, otherwise copied from the corresponding table in <var>base font subset</var> for\nthat glyph index.</p>\n </li><li data-md=\"\">\n <p>The patch glyph data for a glyph index is located by finding <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches-glyphids\" id=\"ref-for-glyphpatches-glyphids①\">glyphIds[j]</a> equal to the glyph index. The\noffset to the associated glyph data is <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches-glyphdataoffsets\" id=\"ref-for-glyphpatches-glyphdataoffsets①\">glyphDataOffsets[i * glyphCount + j]</a>. The length\nof the associated glyph data is <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches-glyphdataoffsets\" id=\"ref-for-glyphpatches-glyphdataoffsets②\">glyphDataOffsets[i * glyphCount + j + 1]</a> minus <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches-glyphdataoffsets\" id=\"ref-for-glyphpatches-glyphdataoffsets③\">glyphDataOffsets[i * glyphCount + j]</a>.</p>\n </li><li data-md=\"\">\n <p>The specific process for synthesizing the new table, depends on the specified format of the <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/otff#table-directory\">table</a>. Any non-glyph associated data should be copied from the table in <var>base font subset</var>. Tables of the type <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/glyf#\">glyf</a>, <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/gvar#\">gvar</a>, <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/cff#\">CFF</a>, or <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/cff2#\">CFF2</a> are supported. Entries for tables\nof any other types must be ignored. When updating <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/glyf#\">glyf</a> the <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/loca#\">loca</a> table must be updated as\nwell. No other tables in the font can be modified as a result of this step. Notably this means that a patch cannot add glyphs\nwith indices beyond the numGlyphs specified in <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/maxp#\">maxp</a>.</p>\n <p><a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/cff#\">CFF</a>, <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/cff2#\">CFF2</a>, and <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/gvar#\">gvar</a> have variable sized offsets to per glyph data. If\nnecessary when synthesizing a new table the offset sizes can be increased as needed. For <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/glyf#\">glyf</a>/<a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/loca#\">loca</a> offset sizes cannot be changed because the offset size is specified in the <a href=\"https://learn.microsoft.com/en-us/typography/opentype/spec/head#\">head</a> table. If during synthesis an offset\nis generated which exceeds the maximum possible offset value (after increasing offset size if possible), then patch application has\nfailed. Return an error.</p>\n </li><li data-md=\"\">\n <p>If <var>base font subset</var> does not have a matching table, return an error.</p>\n </li><li data-md=\"\">\n <p>Insert the synthesized table into <var>extended font subset</var>.</p>\n </li></ul>"
0 commit comments