Skip to content

Commit 3fda23d

Browse files
committed
Update encoding guidance to talk about handling UVS's
1 parent 9a600af commit 3fda23d

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

Overview.bs

+10-3
Original file line numberDiff line numberDiff line change
@@ -2499,7 +2499,7 @@ to a segment and determining what other glyphs must be included in the patch tha
24992499
be substituted for a glyph included in the segment by code point. In some cases a glyph might only be needed when multiple segments
25002500
have been loaded, in which case that glyph can be added to the patch corresponding to any of those segments. (This can be true of
25012501
a ligature or a pre-composed accented character.) Finally, after the initial analysis of segments the same glyph might be needed
2502-
when loading the patches for two or more segments. There are four main strategies for dealing with that situation:
2502+
when loading the patches for two or more segments. There are five main strategies for dealing with that situation:
25032503

25042504
1. Two or more segments can be combined to be contained within a single patch. This avoids duplicating the common glyphs, but
25052505
increases the segment's size.
@@ -2511,10 +2511,17 @@ when loading the patches for two or more segments. There are four main strategi
25112511
* subset definition b → segment b
25122512
* subset definition a union subset definition b → segment c
25132513

2514-
3. Alternatively, the glyph can be included in more than one of the patches that correspond to those segments at the cost of duplicating
2514+
3. In some cases, such as with [[open-type/cmap#format-14-unicode-variation-sequences|Unicode variation selectors]], there will be a
2515+
modifier code point which triggers a glyph substitution when paired with many other code points. Given the large number of alternate
2516+
glyphs it's desirable to keep them in their own patches which are only loaded when both the modifier code point and appropriate base
2517+
code point(s) are present. This can be achieved by using a [[#patch-map-format-2|Format 2 Patch Map]] and multiple subset definitions
2518+
per entry via [=Mapping Entry/copyModeAndCount=]. For the entry one subset definition should contain the modifier code point and a
2519+
second one has the base code point(s).
2520+
2521+
4. Alternatively, the glyph can be included in more than one of the patches that correspond to those segments at the cost of duplicating
25152522
the glyph's data into multiple patches.
25162523

2517-
4. Lastly, the common glyph can be moved into the initial font. This avoids increasing segment sizes and duplicating the glyph data,
2524+
5. Lastly, the common glyph can be moved into the initial font. This avoids increasing segment sizes and duplicating the glyph data,
25182525
but will increase the size of the initial font. It also means that the glyph's data is always loaded, even when not needed. This
25192526
can be useful for glyphs that are required in many segments or are otherwise complicating the segmentation.
25202527

Overview.html

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta content="WD" name="w3c-status">
77
<meta content="Bikeshed version d765c696b, updated Fri Mar 8 15:58:52 2024 -0800" name="generator">
88
<link href="https://www.w3.org/TR/IFT/" rel="canonical">
9-
<meta content="4c2c26160f626d1b3b01fda623655edef77a5e4d" name="revision">
9+
<meta content="f8ae95814f7c787037b1b027cd66cbb49962bcc2" name="revision">
1010
<meta content="dark light" name="color-scheme">
1111
<style>
1212
.conform:hover {background: #31668f; color: white}
@@ -2863,7 +2863,7 @@ <h3 class="heading settled" data-level="7.1" id="encoding-considerations"><span
28632863
be substituted for a glyph included in the segment by code point. In some cases a glyph might only be needed when multiple segments
28642864
have been loaded, in which case that glyph can be added to the patch corresponding to any of those segments. (This can be true of
28652865
a ligature or a pre-composed accented character.) Finally, after the initial analysis of segments the same glyph might be needed
2866-
when loading the patches for two or more segments. There are four main strategies for dealing with that situation:</p>
2866+
when loading the patches for two or more segments. There are five main strategies for dealing with that situation:</p>
28672867
<ol>
28682868
<li data-md>
28692869
<p>Two or more segments can be combined to be contained within a single patch. This avoids duplicating the common glyphs, but
@@ -2880,6 +2880,13 @@ <h3 class="heading settled" data-level="7.1" id="encoding-considerations"><span
28802880
<li data-md>
28812881
<p>subset definition a union subset definition b → segment c</p>
28822882
</ul>
2883+
<li data-md>
2884+
<p>In some cases, such as with <a href="https://docs.microsoft.com/en-us/typography/opentype/spec/cmap#format-14-unicode-variation-sequences">Unicode variation selectors</a>, there will be a
2885+
modifier code point which triggers a glyph substitution when paired with many other code points. Given the large number of alternate
2886+
glyphs it’s desirable to keep them in their own patches which are only loaded when both the modifier code point and appropriate base
2887+
code point(s) are present. This can be achieved by using a <a href="#patch-map-format-2">Format 2 Patch Map</a> and multiple subset definitions
2888+
per entry via <a data-link-type="dfn" href="#mapping-entry-copymodeandcount" id="ref-for-mapping-entry-copymodeandcount②">copyModeAndCount</a>. For the entry one subset definition should contain the modifier code point and a
2889+
second one has the base code point(s).</p>
28832890
<li data-md>
28842891
<p>Alternatively, the glyph can be included in more than one of the patches that correspond to those segments at the cost of duplicating
28852892
the glyph’s data into multiple patches.</p>
@@ -3691,7 +3698,7 @@ <h3 class="no-num no-ref heading settled" id="informative"><span class="content"
36913698
"mapping-entry-bias": {"dfnID":"mapping-entry-bias","dfnText":"bias","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-bias"},{"id":"ref-for-mapping-entry-bias\u2460"}],"title":"5.2.2.1. Interpreting Format 2"}],"url":"#mapping-entry-bias"},
36923699
"mapping-entry-codepoints": {"dfnID":"mapping-entry-codepoints","dfnText":"codePoints","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-codepoints"}],"title":"5.2.2.1. Interpreting Format 2"}],"url":"#mapping-entry-codepoints"},
36933700
"mapping-entry-copyindices": {"dfnID":"mapping-entry-copyindices","dfnText":"copyIndices","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-copyindices"},{"id":"ref-for-mapping-entry-copyindices\u2460"},{"id":"ref-for-mapping-entry-copyindices\u2461"}],"title":"5.2.2.1. Interpreting Format 2"}],"url":"#mapping-entry-copyindices"},
3694-
"mapping-entry-copymodeandcount": {"dfnID":"mapping-entry-copymodeandcount","dfnText":"copyModeAndCount","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-copymodeandcount"},{"id":"ref-for-mapping-entry-copymodeandcount\u2460"}],"title":"5.2.2.1. Interpreting Format 2"}],"url":"#mapping-entry-copymodeandcount"},
3701+
"mapping-entry-copymodeandcount": {"dfnID":"mapping-entry-copymodeandcount","dfnText":"copyModeAndCount","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-copymodeandcount"},{"id":"ref-for-mapping-entry-copymodeandcount\u2460"}],"title":"5.2.2.1. Interpreting Format 2"},{"refs":[{"id":"ref-for-mapping-entry-copymodeandcount\u2461"}],"title":"7.1. Encoding Considerations"}],"url":"#mapping-entry-copymodeandcount"},
36953702
"mapping-entry-designspacecount": {"dfnID":"mapping-entry-designspacecount","dfnText":"designSpaceCount","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-designspacecount"}],"title":"5.2.2.1. Interpreting Format 2"}],"url":"#mapping-entry-designspacecount"},
36963703
"mapping-entry-designspacesegments": {"dfnID":"mapping-entry-designspacesegments","dfnText":"designSpaceSegments","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-designspacesegments"}],"title":"5.2.2.1. Interpreting Format 2"}],"url":"#mapping-entry-designspacesegments"},
36973704
"mapping-entry-entryiddelta": {"dfnID":"mapping-entry-entryiddelta","dfnText":"entryIdDelta","external":false,"refSections":[{"refs":[{"id":"ref-for-mapping-entry-entryiddelta"}],"title":"5.2.2. Patch Map Table: Format 2"},{"refs":[{"id":"ref-for-mapping-entry-entryiddelta\u2460"}],"title":"5.2.2.1. Interpreting Format 2"}],"url":"#mapping-entry-entryiddelta"},

0 commit comments

Comments
 (0)