Skip to content

Commit 05b1974

Browse files
author
John Daggett
committed
[css-fonts] first pass on revised description of unicode-range descriptor
1 parent 17f886d commit 05b1974

1 file changed

Lines changed: 120 additions & 55 deletions

File tree

css-fonts/Fonts.html

Lines changed: 120 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@
112112

113113
<h1>CSS Fonts Module Level 3</h1>
114114

115-
<h2 class="no-num no-toc" id=editors-draft-20-may-2013>Editor's Draft 20
115+
<h2 class="no-num no-toc" id=editors-draft-21-may-2013>Editor's Draft 21
116116
May 2013</h2>
117117

118118
<dl id=authors>
119119
<dt>This version:
120120

121121
<dd><a
122122
href="http://dev.w3.org/csswg/css-fonts/">http://dev.w3.org/csswg/css-fonts/</a>
123-
<!-- <dd><a href="http://www.w3.org/TR/2013/ED-css3-fonts-20130520/">http://www.w3.org/TR/2013/ED-css3-fonts-20130520/</a> -->
123+
<!-- <dd><a href="http://www.w3.org/TR/2013/ED-css3-fonts-20130521/">http://www.w3.org/TR/2013/ED-css3-fonts-20130521/</a> -->
124124

125125

126126
<dt>Latest version:
@@ -2332,10 +2332,10 @@ <h3 id=src-desc><span class=secno>4.3 </span>Font reference: the <a
23322332

23332333
<p>The name can optionally be enclosed in quotes. For OpenType and TrueType
23342334
fonts, this string is used to match only the Postscript name or the full
2335-
font name in the name table of locally available fonts. Which is used
2336-
varies by platform and font, so authors should include both of these names
2337-
to assure proper matching across platforms. Platform substitutions for a
2338-
given font name must not be used.
2335+
font name in the name table of locally available fonts. Which type of name
2336+
is used varies by platform and font, so authors should include both of
2337+
these names to assure proper matching across platforms. Platform
2338+
substitutions for a given font name must not be used.
23392339

23402340
<pre>
23412341
/* bold face of Gentium */
@@ -2510,7 +2510,7 @@ <h3 id=font-prop-desc><span class=secno>4.4 </span>Font property
25102510
properties except that relative keywords are not allowed, ‘<code
25112511
class=property>bolder</code>’ and ‘<code
25122512
class=property>lighter</code>’. If these descriptors are omitted,
2513-
default values are assumed.
2513+
initial values are assumed.
25142514

25152515
<p>The value for these font face style attributes is used in place of the
25162516
style implied by the underlying font data. This allows authors to combine
@@ -2533,66 +2533,128 @@ <h3 id=unicode-range-desc><span class=secno>4.5 </span>Character range: the
25332533
<tr>
25342534
<td>Value:
25352535

2536-
<td>&lt;urange>#
2536+
<td><dfn id=lturange>&lt;urange></dfn>#
25372537

25382538
<tr>
25392539
<td><em>Initial:</em>
25402540

25412541
<td>U+0-10FFFF
25422542
</table>
25432543

2544-
<p>This descriptor defines the range of Unicode characters supported by a
2545-
given font. The values of <span class=index-def id=lturangegt
2546-
title="&lt;urange&gt;"><a name=value-def-urange>&lt;urange&gt;</a></span>
2547-
are expressed using hexadecimal numbers prefixed by "U+" or "u+",
2548-
corresponding to <a href="http://www.unicode.org/charts/">Unicode
2549-
character code points</a>. The unicode-range descriptor serves as a hint
2550-
for user agents when deciding whether or not to download a font resource.
2544+
<p>This descriptor defines the set of Unicode codepoints that may be
2545+
supported by the font face for which it is declared. The descriptor value
2546+
is a comma-delimited list of Unicode range (<dfn id=lturangegt
2547+
title=value-def-urange><code>&lt;urange&gt;</code></dfn>) values. The
2548+
union of these ranges defines the set of codepoints that serves as a hint
2549+
for user agents when deciding whether or not to download a font resource
2550+
for a given text run.
25512551

2552-
<p>Unicode range values are written using hexadecimal values and are ASCII
2553-
case-insensitive. Each is prefixed by "U+" or "u+" and multiple,
2554-
discontinuous ranges are separated by commas. Whitespace before or after
2555-
commas is ignored. Valid character code values vary between 0 and 10FFFF
2556-
inclusive. A single range has three basic forms:
2552+
<p>Each <code>&lt;urange&gt;</code> value is a <a
2553+
href="#descdef-unicode-range"><code>UNICODE-RANGE</code></a> token made up
2554+
of a "U+" or "u+" prefix followed by a codepoint range in one of the three
2555+
forms listed below. Ranges that do not fit one of the these three forms
2556+
are considered to be parse errors and the descriptor is omitted.
25572557

25582558
<ul>
25592559
<li>a single code point (e.g. U+416)
25602560

2561-
<li>an interval value range (e.g. U+400-4ff)
2561+
<li>an interval value range defined by two hyphen-separated codepoints
2562+
that indicate the inclusive start and end codepoints of a range (e.g.
2563+
U+400-4ff)
25622564

2563-
<li>a range where trailing ‘<code class=css>?</code>’ characters imply
2564-
<code class=css>any digit value</code>’ (e.g. U+4??)
2565+
<li>a wildcard value range where trailing ‘<code class=css>?</code>
2566+
characters imply ‘<code class=css>any digit value</code>’ (e.g.
2567+
U+4??)
25652568
</ul>
25662569

2567-
<p>Ranges that do not fit any of the above three forms are considered to be
2568-
parse errors and the descriptor is omitted. Interval ranges consisting of
2569-
a single code point are valid. Ranges specified with ‘?’ that lack an
2570-
initial digit (e.g. "U+???") are also valid, and are treated as if there
2571-
was a single 0 before the question marks (thus, "U+???" = "U+0???" =
2572-
"U+0000-0FFF"). "U+??????" is not a syntax error, even though "U+0??????"
2573-
would be. Ranges can overlap but interval ranges that descend (e.g.
2574-
U+400-32f) are invalid and omitted rather than treated as parse errors;
2575-
they have no effect on other ranges in a list of ranges. Ranges are
2576-
clipped to the domain of Unicode code points (currently 0 – 10FFFF
2577-
inclusive); a range entirely outside the domain is omitted. Without any
2578-
valid ranges, the descriptor is omitted. User agents may normalize the
2579-
list of ranges into a list that is different but represents the same set
2580-
of character code points.
2581-
2582-
<p>The character range can be a subset of the full <a
2583-
href="#character-map"><em>character map</em></a> of the underlying font.
2584-
The effective unicode-range used when mapping characters to fonts is the
2585-
intersection of the unicode range specified and the underlying <a
2586-
href="#character-map"><em>character map</em></a> of the font. This means
2587-
that authors do not need to define the unicode-range of a font precisely,
2588-
broad ranges for which a sparse set of code points are defined in the font
2589-
can be used. Code points outside of the defined unicode-range are ignored,
2590-
regardless of whether the font contains a glyph for that code point or
2591-
not. User agents that download fonts for characters outside the defined
2592-
unicode-range are considered non-conformant. Likewise, user agents that
2593-
render a character using a font resource for which the defined
2594-
unicode-range does not include that character are also considered
2595-
non-conformant.
2570+
<p>Individual codepoints are written using hexadecimal values that
2571+
correspond to <a href="http://www.unicode.org/charts/">Unicode character
2572+
codepoints</a>. Valid character code values vary between 0 and 10FFFF
2573+
inclusive. They are ASCII case-insensitive.
2574+
2575+
<p>For interval ranges, the start and end codepoints must be valid Unicode
2576+
values and the end codepoint must be greater than or equal to the start
2577+
codepoint. Wildcard ranges specified with ‘?’ that lack an initial
2578+
digit (e.g. "U+???") are valid and treated as if there was a single 0
2579+
before the question marks (thus, "U+???" = "U+0???" = "U+0000-0FFF").
2580+
"U+??????" is not a syntax error, even though "U+0??????" would be.
2581+
Wildcard ranges that extend beyond the end of valid codepoint values are
2582+
clipped to the range of valid codepoint values. Ranges that do not conform
2583+
to these restrictions are considered parse errors and the descriptor is
2584+
omitted.
2585+
2586+
<p>Within the comma-delimited list of Unicode ranges in a ‘<a
2587+
href="#descdef-unicode-range"><code
2588+
class=property>unicode-range</code></a>’ descriptor declaration, ranges
2589+
may overlap. Whitespace before or after commas is ignored. The union of
2590+
these ranges defines the set of codepoints for which the corresponding
2591+
font may be used. User agents must not download or use the font for
2592+
codepoints outside this set. User agents may normalize the list of ranges
2593+
into a list that is different but represents the same set of codepoints.
2594+
2595+
<p>The associated font may not contain glyphs for the entire set of
2596+
codepoints defined by the ‘<a href="#descdef-unicode-range"><code
2597+
class=property>unicode-range</code></a>’ descriptor. When the font is
2598+
used the effective character map is the intersection of the codepoints
2599+
defined by ‘<a href="#descdef-unicode-range"><code
2600+
class=property>unicode-range</code></a>’ with the font's character map.
2601+
This allows authors to define supported ranges in terms of broad ranges
2602+
without worrying about the precise codepoint ranges supported by the
2603+
underlying font.</p>
2604+
<!--
2605+
<p>This descriptor defines the range of Unicode characters supported by
2606+
a given font. The values of <span class="index-def"
2607+
title="&lt;urange&gt;"><a
2608+
name="value-def-urange">&lt;urange&gt;</a></span> are expressed using
2609+
hexadecimal numbers prefixed by "U+" or "u+", corresponding to <a
2610+
href="http://www.unicode.org/charts/">Unicode character code points</a>.
2611+
The unicode-range descriptor serves as a hint for user agents when
2612+
deciding whether or not to download a font resource.</p>
2613+
2614+
<p>Unicode range values are written using hexadecimal values and are ASCII
2615+
case-insensitive. Each is prefixed by "U+" or "u+" and multiple, discontinuous
2616+
ranges are separated by commas. Whitespace before or after commas is
2617+
ignored. Valid character code values vary between 0 and 10FFFF
2618+
inclusive. A single range has three basic forms:
2619+
</p>
2620+
2621+
<ul>
2622+
<li>a single code point (e.g. U+416)</li>
2623+
<li>an interval value range (e.g. U+400-4ff)</li>
2624+
<li>a range where trailing '?' characters imply 'any digit value' (e.g. U+4??)</li>
2625+
</ul>
2626+
2627+
<p>Ranges that do not fit any of the above three forms are considered to
2628+
be parse errors and the descriptor is omitted. Interval ranges
2629+
consisting of a single code point are valid. Ranges specified with ‘?’
2630+
that lack an initial digit (e.g. "U+???") are also valid, and are
2631+
treated as if there was a single 0 before the question marks (thus,
2632+
"U+???" = "U+0???" = "U+0000-0FFF"). "U+??????" is not a syntax error,
2633+
even though "U+0??????" would be. Ranges can overlap but interval ranges
2634+
that descend (e.g. U+400-32f) are invalid and omitted rather than
2635+
treated as parse errors; they have no effect on other ranges in a list
2636+
of ranges. Ranges are clipped to the domain of Unicode code points
2637+
(currently 0 – 10FFFF inclusive); a range entirely outside the domain is
2638+
omitted. Without any valid ranges, the descriptor is omitted. User
2639+
agents may normalize the list of ranges into a list that is different
2640+
but represents the same set of character code points.
2641+
</p>
2642+
2643+
<p>The character range can be a subset of the full <em>character map</em> of the
2644+
underlying font. The effective unicode-range used when mapping
2645+
characters to fonts is the intersection of the unicode range specified
2646+
and the underlying <em>character map</em> of the font. This means that authors
2647+
do not need to define the unicode-range of a font precisely, broad
2648+
ranges for which a sparse set of code points are defined in the font can
2649+
be used. Code points outside of the defined unicode-range are ignored,
2650+
regardless of whether the font contains a glyph for that code point or
2651+
not. User agents that download fonts for characters outside the defined
2652+
unicode-range are considered non-conformant. Likewise, user agents that
2653+
render a character using a font resource for which the defined
2654+
unicode-range does not include that character are also considered
2655+
non-conformant.
2656+
</p>
2657+
-->
25962658

25972659
<p>Example ranges for specific languages or characters:
25982660

@@ -2799,7 +2861,7 @@ <h3 id=font-rend-desc><span class=secno>4.6 </span>Font features: the <a
27992861
<td>normal
28002862
</table>
28012863

2802-
<p>These descriptors define default settings that apply when the font
2864+
<p>These descriptors define initial settings that apply when the font
28032865
defined by an <code>@font-face</code> rule is rendered. They do not affect
28042866
font selection. Values are identical to those defined for the
28052867
corresponding ‘<a href="#propdef-font-variant"><code
@@ -5861,8 +5923,8 @@ <h2 class=no-num id=index>Index</h2>
58615923
<li>&lt;relative-size&gt;, <a href="#ltrelative-sizegt"
58625924
title="&lt;relative-size&gt;"><strong>3.5</strong></a>
58635925

5864-
<li>&lt;urange&gt;, <a href="#lturangegt"
5865-
title="&lt;urange&gt;"><strong>4.5</strong></a>
5926+
<li>&lt;urange>, <a href="#lturange"
5927+
title="&lt;urange>"><strong>4.5</strong></a>
58665928

58675929
<li>@font-face, <a href="#font-face" title="@font-face">4.1</a>, <a
58685930
href="#font-face0" title="@font-face">4.3</a>
@@ -6119,6 +6181,9 @@ <h2 class=no-num id=index>Index</h2>
61196181
<li>unicode-range, <a href="#descdef-unicode-range"
61206182
title=unicode-range><strong>4.5</strong></a>
61216183

6184+
<li>value-def-urange, <a href="#lturangegt"
6185+
title=value-def-urange><strong>4.5</strong></a>
6186+
61226187
<li>weight, <a href="#weight" title=weight><strong>2</strong></a>
61236188

61246189
<li>width, <a href="#width" title=width><strong>2</strong></a>

0 commit comments

Comments
 (0)