@@ -2125,6 +2125,41 @@ Cursive Scripts</h4>
2125
2125
Text shaping <em> should not</em> be broken across inline box boundaries otherwise,
2126
2126
if it is reasonable and possible for that case given the limitations of the font technology.
2127
2127
2128
+ <div class="example">
2129
+ An example of reasonable and possible shaping across boundaries
2130
+ is Arabic shaping:
2131
+ in many systems this is performed by the font engine,
2132
+ allowing the font to provide variant glyphs
2133
+ with potentially very sophisticated contextual shaping.
2134
+ It's not generally possible to rely on this system across a font change
2135
+ unless the font engine has an API to provide context,
2136
+ but it is straightforward and therefore quite reasonable
2137
+ for an engine to work around this limitation by, for example,
2138
+ using the zero-width-joiner (U+200D) or zero-width-non-joiner (U+200C)
2139
+ as appropriate to solicit the correct choice of
2140
+ initial/medial/final/isolated glyph.
2141
+
2142
+ An example of possible but not reasonable shaping across boundaries
2143
+ is handling a font that is sensitive to 20 characters of context
2144
+ on either side to choose its glyphs:
2145
+ passing all the text before <em> and after</em> the string in question,
2146
+ even through multiple inline boundaries with formatting changes,
2147
+ is complicated.
2148
+ The UA <em> could</em> handle such cases,
2149
+ but is not required to,
2150
+ as they are not typical or fundamentally required
2151
+ by any modern writing system.
2152
+
2153
+ An example of impossible shaping accross boundaries
2154
+ is a change in font weight partway through the word “and”
2155
+ in a font where a ligature would replace
2156
+ all three letters of the word “and”
2157
+ with an ampersand glyph (“&”).
2158
+ <!--
2159
+ It's simply not possible for the UA
2160
+ to create the effect of a partway-bold single glyph.
2161
+ -->
2162
+ </div>
2128
2163
2129
2164
<h2 id="edge-effects">
2130
2165
Edge Effects</h2>
0 commit comments