| 
255 | 255 |           "html": "<p>Initialize <var>extended font subset</var> to be an empty font with no tables.</p>"  | 
256 | 256 |         },  | 
257 | 257 |         {  | 
258 |  | -          "html": "<p>Check that the <var>patch</var> is valid according to the requirements in <a href=\"https://w3c.github.io/IFT/Overview.html#table-keyed\">§ 6.2 Table Keyed</a> (requirements are marked with a\n\"must\") and all <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#tablepatch\" id=\"ref-for-tablepatch②\">TablePatch</a>'s are contained within <var>patch</var>. If it is not return an error.</p>"  | 
 | 258 | +          "html": "<p>Check that the <var>patch</var> is valid according to the requirements in <a href=\"https://w3c.github.io/IFT/Overview.html#table-keyed\">§ 6.2 Table Keyed</a> (requirements are marked with a\n\"must\") and all <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#tablepatch\" id=\"ref-for-tablepatch②\">TablePatch</a>'s are contained within <var>patch</var>. Otherwise, return an error</p>"  | 
259 | 259 |         },  | 
260 | 260 |         {  | 
261 | 261 |           "html": "<p>Check that the <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#table-keyed-patch-compatibilityid\" id=\"ref-for-table-keyed-patch-compatibilityid\">compatibilityId</a> field in <var>patch</var> is equal to <var>compatibility id</var>.\nIf there is no match, or <var>base font subset</var> does not have either an 'IFT ' or 'IFTX' table, then patch application\nhas failed, return an error.</p>"  | 
 | 
276 | 276 |       "rationale": "check",  | 
277 | 277 |       "steps": [  | 
278 | 278 |         {  | 
279 |  | -          "html": "<p>Check that the <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyph-keyed-patch-format\" id=\"ref-for-glyph-keyed-patch-format\">format</a> field in <var>patch</var> is equal to 'ifgk', if it is\nnot equal, then <var>patch</var> is not correctly formatted and patch application has failed, return\nan error.</p>"  | 
 | 279 | +          "html": "<p>Check that the <var>patch</var> is valid according to the requirements in <a href=\"https://w3c.github.io/IFT/Overview.html#glyph-keyed\">§ 6.3 Glyph Keyed</a> (requirements are marked with a\n\"must\"). Otherwise, return an error</p>"  | 
280 | 280 |         },  | 
281 | 281 |         {  | 
282 | 282 |           "html": "<p>Check that the <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyph-keyed-patch-compatibilityid\" id=\"ref-for-glyph-keyed-patch-compatibilityid\">compatibilityId</a> field in <var>patch</var> is equal to <var>compatibility id</var>.\nIf there is no match, or <var>base font subset</var> does not have either an 'IFT ' or 'IFTX' table, then patch application has\nfailed, return an error.</p>"  | 
283 | 283 |         },  | 
284 | 284 |         {  | 
285 |  | -          "html": "<p>Decode the brotli encoded data in <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyph-keyed-patch-brotlistream\" id=\"ref-for-glyph-keyed-patch-brotlistream①\">brotliStream</a> following <a href=\"https://www.rfc-editor.org/rfc/rfc7932#section-10\">Brotli Compressed Data Format § section-10</a>. The\ndecoded data is a <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches\" id=\"ref-for-glyphpatches②\">GlyphPatches</a> table.</p>"  | 
 | 285 | +          "html": "<p>Decode the brotli encoded data in <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyph-keyed-patch-brotlistream\" id=\"ref-for-glyph-keyed-patch-brotlistream①\">brotliStream</a> following <a href=\"https://www.rfc-editor.org/rfc/rfc7932#section-10\">Brotli Compressed Data Format § section-10</a>. The\ndecoded data is a <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyphpatches\" id=\"ref-for-glyphpatches②\">GlyphPatches</a> table. If the decoded data is larger than <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyph-keyed-patch-maxuncompressedlength\" id=\"ref-for-glyph-keyed-patch-maxuncompressedlength\">maxUncompressedLength</a> return an\nerror</p>"  | 
286 | 286 |         },  | 
287 | 287 |         {  | 
288 |  | -          "html": "<p>For each <a href=\"https://docs.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://docs.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://docs.microsoft.com/en-us/typography/opentype/spec/glyf#\">glyf</a>/<a href=\"https://docs.microsoft.com/en-us/typography/opentype/spec/loca#\">loca</a>, <a href=\"https://docs.microsoft.com/en-us/typography/opentype/spec/gvar#\">gvar</a>, <a href=\"https://docs.microsoft.com/en-us/typography/opentype/spec/cff#\">CFF</a>, or <a href=\"https://docs.microsoft.com/en-us/typography/opentype/spec/cff2#\">CFF2</a> are supported. Entries for tables\nof any other types must be ignored.</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>"  | 
 | 288 | +          "html": "<p>For each <a href=\"https://docs.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://docs.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://docs.microsoft.com/en-us/typography/opentype/spec/glyf#\">glyf</a>, <a href=\"https://docs.microsoft.com/en-us/typography/opentype/spec/gvar#\">gvar</a>, <a href=\"https://docs.microsoft.com/en-us/typography/opentype/spec/cff#\">CFF</a>, or <a href=\"https://docs.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://docs.microsoft.com/en-us/typography/opentype/spec/glyf#\">glyf</a> the <a href=\"https://docs.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://docs.microsoft.com/en-us/typography/opentype/spec/maxp#\">maxp</a>.</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>"  | 
289 | 289 |         },  | 
290 | 290 |         {  | 
291 | 291 |           "html": "<p>Locate the <a href=\"https://w3c.github.io/IFT/Overview.html#patch-map-table\">§ 5.2 Patch Map Table</a> which has the same <a data-link-type=\"dfn\" href=\"https://w3c.github.io/IFT/Overview.html#glyph-keyed-patch-compatibilityid\" id=\"ref-for-glyph-keyed-patch-compatibilityid①\">compatibilityId</a> as <var>compatibility id</var>. If it is a\nformat 1 patch map then, invoke <a data-link-type=\"abstract-op\" href=\"https://w3c.github.io/IFT/Overview.html#abstract-opdef-remove-entries-from-format-1-patch-map\" id=\"ref-for-abstract-opdef-remove-entries-from-format-1-patch-map\">Remove Entries from Format 1 Patch Map</a> with the patch map table and <var>patch uri</var> as an\ninput. Otherwise if it is a format 2 patch map then, invoke <a data-link-type=\"abstract-op\" href=\"https://w3c.github.io/IFT/Overview.html#abstract-opdef-remove-entries-from-format-2-patch-map\" id=\"ref-for-abstract-opdef-remove-entries-from-format-2-patch-map\">Remove Entries from Format 2 Patch Map</a> with the patch map table and <var>patch uri</var> as an input. Copy the modified patch map table into <var>extended font subset</var>.</p>"  | 
 | 
0 commit comments