Skip to content

Commit 935cc2a

Browse files
author
John Daggett
committed
[css3-fonts] character handling tweaks
1 parent c3efc4d commit 935cc2a

1 file changed

Lines changed: 26 additions & 25 deletions

File tree

css-fonts/Fonts.html

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@
115115

116116
<h1>CSS Fonts Module Level 3</h1>
117117

118-
<h2 class="no-num no-toc" id=editors-draft-10-june-2013>Editor's Draft 10
118+
<h2 class="no-num no-toc" id=editors-draft-11-june-2013>Editor's Draft 11
119119
June 2013</h2>
120120

121121
<dl id=authors>
122122
<dt>This version:
123123

124124
<dd><a
125125
href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
126-
<!-- <dd><a href="http://www.w3.org/TR/2013/ED-css3-fonts-20130610/">http://www.w3.org/TR/2013/ED-css3-fonts-20130610/</a> -->
126+
<!-- <dd><a href="http://www.w3.org/TR/2013/ED-css3-fonts-20130611/">http://www.w3.org/TR/2013/ED-css3-fonts-20130611/</a> -->
127127

128128

129129
<dt>Latest version:
@@ -3342,6 +3342,12 @@ <h3 id=font-style-matching><span class=secno>5.2 </span>Matching font
33423342
Font</a>) or using the missing character glyph from a default font.
33433343
</ol>
33443344

3345+
<p>Optimizations of this process are allowed provided that an
3346+
implementation behaves as if the algorithm had been followed exactly.
3347+
Matching occurs in a well-defined order to insure that the results are as
3348+
consistent as possible across user agents, given an identical set of
3349+
available fonts and rendering technology.
3350+
33453351
<h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
33463352

33473353
<p>When text contains characters such as combining marks, ideally the base
@@ -3402,8 +3408,8 @@ <h3 id=cluster-matching><span class=secno>5.3 </span>Cluster matching</h3>
34023408
<h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
34033409
issues</h3>
34043410

3405-
<p>The procedure above is always performed on text runs containing Unicode
3406-
characters, documents using legacy encodings are assumed to have been
3411+
<p>CSS font matching is always performed on text runs containing Unicode
3412+
characters, so documents using legacy encodings are assumed to have been
34073413
transcoded before matching fonts. For fonts containing <a
34083414
href="#character-map"><em title="character map">character maps</em></a>
34093415
for both legacy encodings and Unicode, the contents of the legacy encoding
@@ -3413,22 +3419,23 @@ <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
34133419
<p>The font matching process does not assume that text runs are in either
34143420
normalized or denormalized form (see <a href="#CHARMOD-NORM"
34153421
rel=biblioentry>[CHARMOD-NORM]<!--{{CHARMOD-NORM}}--></a> for more
3416-
details). Layout engines often convert base character plus combining
3417-
character sequences into precomposed characters if they exist. The font
3418-
matching algorithm outlined here supports both ways and fonts can
3419-
generally support either but variations can occur. Authors should always
3422+
details). Fonts may only support precomposed forms and not the decomposed
3423+
sequence of base character plus combining marks. Authors should always
34203424
tailor their choice of fonts to their content, including whether that
34213425
content contains normalized or denormalized character streams.
34223426

3423-
<p>If a given character is a Private-Use Area Unicode codepoint and none of
3424-
the fonts in the fontlist contain a glyph for that codepoint, user agents
3425-
must display some form of missing glyph symbol for that character rather
3426-
than attempting <a href="#system-font-fallback"><em>system font
3427-
fallback</em></a> for that codepoint. When matching the replacement
3428-
character U+FFFD, user agents may skip the font matching process and
3429-
immediately display some form of missing glyph symbol, they are not
3430-
required to display the glyph from the font that would be selected by the
3431-
font matching process.
3427+
<p>If a given character is a Private-Use Area Unicode codepoint, user
3428+
agents must only match font families named in the ‘<code
3429+
class=property>font-family</code>’ list that are not generic families.
3430+
If none of the families named in the ‘<code
3431+
class=property>font-family</code>’ list contain a glyph for that
3432+
codepoint, user agents must display some form of missing glyph symbol for
3433+
that character rather than attempting <a
3434+
href="#system-font-fallback"><em>system font fallback</em></a> for that
3435+
codepoint. When matching the replacement character U+FFFD, user agents may
3436+
skip the font matching process and immediately display some form of
3437+
missing glyph symbol, they are not required to display the glyph from the
3438+
font that would be selected by the font matching process.
34323439

34333440
<p>In general, the fonts for a given family will all have the same or
34343441
similar <a href="#character-map"><em title="character map">character
@@ -3437,12 +3444,6 @@ <h3 id=char-handling-issues><span class=secno>5.4 </span>Character handling
34373444
title="character map">character maps</em></a>. However, authors are
34383445
cautioned that the use of such families can lead to unexpected results.
34393446

3440-
<p>Optimizations of this process are allowed provided that an
3441-
implementation behaves as if the algorithm had been followed exactly.
3442-
Matching occurs in a well-defined order to insure that the results are as
3443-
consistent as possible across user agents, given an identical set of
3444-
available fonts and rendering technology.
3445-
34463447
<h3 id=font-matching-changes><span class=secno>5.5 </span>Font matching
34473448
changes since CSS 2.1</h3>
34483449

@@ -3478,8 +3479,8 @@ <h3 id=font-matching-examples><span class=secno>5.6 </span>Font matching
34783479
*:lang(zh-tw) { font: 800 14pt/16.5pt &quot;Li Sung&quot;, serif; }
34793480
</pre>
34803481

3481-
<p>This selects any element that has the given language - Japanese or
3482-
Traditional Chinese - and uses the appropriate font.
3482+
<p>This selects any element that has the given language — Japanese or
3483+
Traditional Chinese — and uses the appropriate font.
34833484
</div>
34843485

34853486
<h2 id=font-rend-props><span class=secno>6 </span>Font Feature Properties</h2>

0 commit comments

Comments
 (0)