<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; color: rgb(0, 0, 0);"><i>> In
those extreme cases the subtable can be broken down into more, like we currently do with 16bit offsets. I don't think it's a realistic limitation, but happy to bump all Coverage and ClassDef offsets to 32bit.</i></span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; color: rgb(0, 0, 0);"><br>
</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; color: rgb(0, 0, 0);">Fo
me, main reason would be not overflow but potential incovenience because of too many formats. We have a mix of 16-24-32 bit offsets without clear reason why to one over another (and no real explanation what future additions should use). I'll have to look up
the spec every time I want to read one or another. Saving one byte is not worth the trouble.</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; color: rgb(0, 0, 0);"><br>
</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; color: rgb(0, 0, 0);">Thanks</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; color: rgb(0, 0, 0);">Sergey</span></div>
<div class="elementToProof"><span style="letter-spacing: normal; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
<br>
</span></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> mpeg-otspec <mpeg-otspec-bounces@lists.aau.at> on behalf of Behdad Esfahbod <behdad@behdad.org><br>
<b>Sent:</b> Tuesday, December 12, 2023 4:39 AM<br>
<b>To:</b> Peter Constable <pconstable@microsoft.com>; Liam Quin <liam@fromoldbooks.org><br>
<b>Cc:</b> MPEG OT Spec list <mpeg-otspec@lists.aau.at><br>
<b>Subject:</b> [EXTERNAL] Re: [MPEG-OTSPEC] comments wrt wide glyph ID proposal</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">Thanks Peter for the excellent feedback.
<div><br>
</div>
<div>Comments inline.</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Dec 11, 2023 at 7:54 PM Peter Constable <<a href="mailto:pconstable@microsoft.com">pconstable@microsoft.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"><br>
</p>
<p class="x_MsoNormal"><b>Hybrid narrow/wide fonts:<u></u><u></u></b></p>
<p class="x_MsoNormal"><span lang="EN-CA">Hybrid fonts are going to be more challenging to build and maintain—much more so than hybrid COLRv0/v1. Attempting to engineer mechanisms specifically to accommodate hybrid fonts is likely to add to complexity.</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I agree it should not be the focus of the work</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"><b><span lang="EN-CA">TTCs:<u></u><u></u></span></b></p>
<p class="x_MsoNormal"><span lang="EN-CA">A second take-away for us from thinking about hybrid fonts is that we think TTCs can provide another approach to creating hybrid fonts—one that could be easier for font developers to create and maintain. To that end,
we think it would make sense to define a v2.1 TTC header that adds numFonts2 and tableDirectoryOffsets2 members, and provide guidance that software that supports wide glyph IDs should use only these new members, ignoring numFonts and tableDirectoryOffsets.
In this way, older software could see only fonts with narrow glyph IDs, while newer software could see a distinct set of fonts without duplication.</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I'd be happy to incorporate this.</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"><span lang="EN-CA">This brought to my mind that, six – ten years ago (I forget the exact timeframe), there was discussion between Adobe, Apple and MS about defining a _<i>dmap</i>_ (delta cmap) table for use in TTCs: It’s very common
in TTCs that there are cmap differences, with the result that each font in the TTC must have its own cmap without any sharing of data. In CJK fonts, the cmap table is one of the largest tables (probably second only to glyf or CFF / CFF2). Moreover, in a CJK
font, the majority of mappings in a cmap table could be the same, with only a small portion of mappings being different. (E.g., in MS Gothic vs MS PGothic, all the ideograph glyphs are the same; it’s just Latins and punctuation that differ.) A dmap table would
allow fonts in a TTC to share a common base cmap table with small, font-specific dmap tables handling differences. In our discussions, we came up with formats that would work, except we hadn’t figured out how to handle format 14 cmap subtables.</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>This reminds me of another idea we discussed in, I think, 2019, from Monotype to introduce a `cmap` subtable that would map individual characters to sequences of glyphs. Then the pre-composed Unicode characters wouldn't need to have their own glyphs. Back
then we dropped the idea for backwards-compat reasons. But maybe we can pick it up now?</div>
<div><br>
</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"><b><span lang="EN-CA">COLR, MATH:<u></u><u></u></span></b></p>
<p class="x_MsoNormal"><span lang="EN-CA">We noted that the proposal doesn’t include any integration for COLR or MATH tables. There might be several things to consider in relation to the MATH table, and we have no concern with leaving that for future consideration.<u></u><u></u></span></p>
<p class="x_MsoNormal"><span lang="EN-CA"><u></u> <u></u></span></p>
<p class="x_MsoNormal"><span lang="EN-CA">But COLR might not be too difficult. So, we think it’s worth discussing options:<u></u><u></u></span></p>
<ol start="1" type="a" style="margin-top:0in">
<li class="x_m_-579796598687322239MsoListParagraph" style="margin-left:0in"><span lang="EN-CA">Postpone for future consideration.<u></u><u></u></span></li><li class="x_m_-579796598687322239MsoListParagraph" style="margin-left:0in"><span lang="EN-CA">Create a new major version — i.e., a new table tag — to design a table with wide glyph IDs (it wouldn’t need to support narrow IDs).<u></u><u></u></span></li><li class="x_m_-579796598687322239MsoListParagraph" style="margin-left:0in"><span lang="EN-CA">Create a minor version enhancement (COLR v2) that maintains backward compatibility while adding wide support.<u></u><u></u></span></li></ol>
<p class="x_MsoNormal"><span lang="EN-CA"><u></u> <u></u></span></p>
<p class="x_MsoNormal"><span lang="EN-CA">The third option would need to add new offsets in the header for wide variants of base glyph and clip lists, with new BaseGlyphPaintRecord2 and ClipRecord2 formats. (There’d also need to be a new PaintGlyph format,
but that will be true regardless.)<u></u><u></u></span></p>
<p class="x_MsoNormal"><span lang="EN-CA"><u></u> <u></u></span></p>
<p class="x_MsoNormal"><span lang="EN-CA">We haven’t yet decided which option we prefer; we just want to get it into discussion.</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>My preference is to introduce PaintGlyph's with wide gid's without bumping the format number for now, and postpone ClipList and other enhancements to a future v2 version. Note that there exist already COLRv1 fonts that hit the 64k glyph limit because of
all the components. Those would become feasible with just a new PaintGlyph2 / PaintColrGlyph2 / etc extension and do not need the full ClipBox etc widening.</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"></p>
<p class="x_MsoNormal"><span lang="EN-CA"><u></u> <u></u></span></p>
<p class="x_MsoNormal"><b><span lang="EN-CA">Max profile:<u></u><u></u></span></b></p>
<p class="x_MsoNormal"><span lang="EN-CA">The current proposal doesn’t make any change wrt ‘maxp’, other than to say numGlyphs isn’t used for wide-GID support. In a hybrid font, it’s unclear what font developers should do with all the other maxp members: if
they’re set as appropriate for narrow GIDs, then the values may not work for wide GIDs and the app could run out of resources. On the other hand, if the values are set for wide GIDs, those can work for both narrow and wide, but for older software could lead
to over-allocation of unused resources.<u></u><u></u></span></p>
<p class="x_MsoNormal"><span lang="EN-CA"><u></u> <u></u></span></p>
<p class="x_MsoNormal"><span lang="EN-CA">Since we’re already considering glyf/loca and GLYF/LOCA that can exist side by side, it seems simple and clean to define a MAXP table that gets used only in conjunction with GLYF/LOCA. These tables are small, so the
file size impact is negligible.</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>How real is the use of max profile data these days? My understanding is that since the data cannot be trusted anyway, software doesn't rely on it.</div>
<div><br>
</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"><b><span lang="EN-CA">GPOS/GSUB:<u></u><u></u></span></b></p>
<p class="x_MsoNormal"><span lang="EN-CA">It appears the proposal doesn’t yet include wide versions for common table formats that will be required (e.g., coverage). These will, of course, be needed</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I'm surprised by that. But you are right, them seem missing from the PDF document. <a class="x_gmail_plusreply" id="x_plusReplyChip-0" href="mailto:liam@fromoldbooks.org" tabindex="-1">@Liam Quin</a> </div>
<div><br>
</div>
<div>The proposal is:</div>
<div><br>
</div>
<div> <a href="https://github.com/harfbuzz/boring-expansion-spec/issues/30" originalsrc="https://github.com/harfbuzz/boring-expansion-spec/issues/30" shash="OuUXyONM4WJWOZtz2lHmDTfK2gAQF9UjvCK2QaZ9uXMeziDw6xEqPSVy3g3mr91e9cJzs/IwPVS3NUXhIKPMtzhHM0m07rUoA6hE18yAqkVCsRTROD0Fo/JJ9JS34n6KQ2w2ObZ/22dkcf8anmArqGyNUc4P3tTT2xkKSCCtFqk=">https://github.com/harfbuzz/boring-expansion-spec/issues/30</a></div>
<div> <br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"><span lang="EN-CA">This may be an opportunity to deprecate certain formats from use in wide-GID fonts. E.g., GSUB type 5 and GPOS type 7 (contextual) were effectively obsoleted when the chaining contextual formats were added. If we agreed,
then Contextual positioning / substitution subtable formats 4 – 6 wouldn’t need to be added.</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I'm ambivalent here. Adding them is simple enough for me and keeps consistency.</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-579796598687322239">
<div lang="EN-US" style="">
<div class="x_m_-579796598687322239WordSection1">
<p class="x_MsoNormal"><span lang="EN-CA">Various formats are proposed using uint24 for subtable counts and Offset24 for subtable offsets. This could turn into a real limitation. For example, consider single substitution format 4: if glyphCount were 5,592,406,
then the size of the substituteGlyphIDs[] array would exceed xFFFFFF and Offset24 for coverageOffset would not work. We’re inclined to make offsets and any counts not limited by 24-bit GIDs to be 32-bit.</span></p>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>In those extreme cases the subtable can be broken down into more, like we currently do with 16bit offsets. I don't think it's a realistic limitation, but happy to bump all Coverage and ClassDef offsets to 32bit.</div>
<div><br>
</div>
<div>Thanks,</div>
<div> </div>
<div>behdad<br>
<div class="x_msg-579796598687322239"><a href="https://lists.aau.at/mailman/listinfo/mpeg-otspec" originalsrc="https://lists.aau.at/mailman/listinfo/mpeg-otspec" shash="tx+Tx4pnvBqVSHMuQNhIbBTliaheU3KjV/JM0OtuEdUE7uBpA8Pfyo5dWyw6ZxZzA3ekNQ9pQUAIvlP4sMgOUvwQE0vamJNdDloecVuPloPNqyGtgdmBuR70EloyQ2U7krdNNiSWGoYzR+/pJXT38k8d7p1Et2HIYPgEu709ON4=" rel="noreferrer" target="_blank"></a><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>