Skip to content

Commit 70d2a2f

Browse files
author
John Daggett
committed
[css3-fonts] editorial fixes in cluster matching section
1 parent 318e590 commit 70d2a2f

1 file changed

Lines changed: 49 additions & 39 deletions

File tree

css-fonts/Fonts.html

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3143,10 +3143,25 @@ <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
31433143
with the appropriate style based on other font properties and then
31443144
determining whether a glyph exists for the given character. This is done
31453145
using the <dfn id=character-map>character map</dfn> of the font, data
3146-
which maps characters to the default glyph for that character. Codepoint
3147-
sequences consisting of a base character followed by a sequence of
3148-
combining characters are treated slightly differently, see the section on
3149-
<a href="#cluster-matching">cluster matching</a> below.
3146+
which maps characters to the default glyph for that character. A font is
3147+
considered to <dfn id=support>support</dfn> a given character if (1) the
3148+
character is contained in the font's <a
3149+
href="#character-map"><em>character map</em></a> and (2) if required by
3150+
the containing script, shaping information is available for that
3151+
character.
3152+
3153+
<p>Some legacy fonts may include a given character in the <a
3154+
href="#character-map"><em>character map</em></a> but lack the shaping
3155+
information (e.g. <a
3156+
href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
3157+
layout tables</a> or <a
3158+
href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
3159+
tables</a>) necessary for correctly rendering text runs containing that
3160+
character.
3161+
3162+
<p>Codepoint sequences consisting of a base character followed by a
3163+
sequence of combining characters are treated slightly differently, see the
3164+
section on <a href="#cluster-matching">cluster matching</a> below.
31503165

31513166
<p>For this procedure, the <dfn id=default-face>default face</dfn> for a
31523167
given font family is defined to be the face that would be selected if all
@@ -3329,31 +3344,18 @@ <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
33293344

33303345
<h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
33313346

3332-
<p>When text contains characters such as combining diacritics, ideally the
3333-
base character should be rendered using the same font as the diacritic,
3334-
this assures proper placement of the diacritic. For this reason, the font
3335-
matching algorithm for clusters is more specialized than the general case
3336-
of matching a single character by itself. For sequences containing
3337-
variation selectors, which indicate the precise glyph to be used for a
3338-
given character, user agents always attempt <a
3339-
href="#system-font-fallback"><em>system font fallback</em></a> to find the
3340-
appropriate glyph before using the default glyph of the base character.
3341-
3342-
<p>A font is considered to <em>support</em> a given character if (1) the
3343-
character is contained in the font's <a
3344-
href="#character-map"><em>character map</em></a> and (2) if required by
3345-
the containing script, shaping information is available for that
3346-
character. Some legacy fonts may include a given character in the <a
3347-
href="#character-map"><em>character map</em></a> but lack the shaping
3348-
information (e.g. <a
3349-
href="http://www.microsoft.com/typography/otspec/ttochap1.htm">OpenType
3350-
layout tables</a> or <a
3351-
href="http://scripts.sil.org/cms/scripts/page.php?site_id=projects&amp;item_id=graphite_techAbout">Graphite
3352-
tables</a>) necessary for correctly rendering text runs containing that
3353-
character.
3354-
3355-
<p>A sequence of codepoints containing combining diacritics or other
3356-
modifiers is termed a grapheme cluster (see <a href="#CSS3TEXT"
3347+
<p>When text contains characters such as combining marks, ideally the base
3348+
character should be rendered using the same font as the mark, this assures
3349+
proper placement of the mark. For this reason, the font matching algorithm
3350+
for clusters is more specialized than the general case of matching a
3351+
single character by itself. For sequences containing variation selectors,
3352+
which indicate the precise glyph to be used for a given character, user
3353+
agents always attempt <a href="#system-font-fallback"><em>system font
3354+
fallback</em></a> to find the appropriate glyph before using the default
3355+
glyph of the base character.
3356+
3357+
<p>A sequence of codepoints containing combining mark or other modifiers is
3358+
termed a grapheme cluster (see <a href="#CSS3TEXT"
33573359
rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> for a more complete
33583360
description). For a given cluster containing a base character, <em>b</em>
33593361
and a sequence of combining characters <em>c1, c2…</em>, the entire
@@ -3367,27 +3369,33 @@ <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
33673369
completely supported by the font, select this font for the sequence.
33683370

33693371
<li>If a sequence of multiple codepoints is canonically equivalent to a
3370-
single character and the font supports that character, select this font
3371-
for the sequence.
3372+
single character and the font <a href="#support"><em
3373+
title=support>supports</em></a> that character, select this font for
3374+
the sequence.
33723375
</ol>
33733376

33743377
<li>If no font was found in the font list in step 1:
33753378
<ol>
33763379
<li>If <em>c1</em> is a variation selector, system fallback must be used
3377-
to find a font that supports the full sequence of <em>b + c1</em>. If
3378-
no font on the system supports the full sequence, match the single
3380+
to find a font that <a href="#support"><em
3381+
title=support>supports</em></a> the full sequence of <em>b + c1</em>.
3382+
If no font on the system <a href="#support"><em
3383+
title=support>supports</em></a> the full sequence, match the single
33793384
character <em>b</em> using the normal procedure for matching single
33803385
characters and ignore the variation selector. Note: a sequence with
3381-
more than one variation selector is treated as an encoding error and
3382-
the trailing selectors are ignored.
3386+
more than one variation selector must be treated as an encoding error
3387+
and the trailing selectors must be ignored. <a href="#UNICODE6"
3388+
rel=biblioentry>[UNICODE6]<!--{{!UNICODE6}}--></a>
33833389

33843390
<li>Otherwise, the user agent may optionally use system font fallback to
3385-
match a font that supports the entire cluster.
3391+
match a font that <a href="#support"><em
3392+
title=support>supports</em></a> the entire cluster.
33863393
</ol>
33873394

33883395
<li>If no font is found in step 2, use the matching sequence from step 1
3389-
to determine the longest sequence that is completely matched by a font in
3390-
the font list and attempt to match the remaining combining characters
3396+
to determine the longest sequence that is completely <a
3397+
href="#support"><em title=support>supported</em></a> by a font in the
3398+
font list and attempt to match the remaining combining characters
33913399
separately using the rules for single characters.
33923400
</ol>
33933401

@@ -4225,7 +4233,7 @@ <h3 id=font-variant-caps-prop><span class=secno>6.6 </span>Capitalization:
42254233
<pre>blockquote { font-style: italic; }
42264234
blockquote:first-line { font-variant: small-caps; }
42274235

4228-
&lt;blockquote><a href="http://lists.w3.org/Archives/Public/www-style/2009Dec/0036.html" style="text-decoration: none">I'll be honor-bound to slap them like a haddock.</a>&lt;/blockquote>
4236+
&lt;blockquote><a href="http://lists.w3.org/Archives/Public/www-style/2009Dec/0036.html" style="text-decoration: none; border: none;">I'll be honor-bound to slap them like a haddock.</a>&lt;/blockquote>
42294237
</pre>
42304238
</div>
42314239
<!-- prop: font-variant-numeric -->
@@ -6737,6 +6745,8 @@ <h2 class=no-num id=index>Index</h2>
67376745

67386746
<li>super, <a href="#super" title=super><strong>6.5</strong></a>
67396747

6748+
<li>support, <a href="#support" title=support><strong>5.2</strong></a>
6749+
67406750
<li>swash, <a href="#swash" title=swash><strong>6.8</strong></a>
67416751

67426752
<li>system font fallback, <a href="#system-font-fallback" title="system

0 commit comments

Comments
 (0)