Skip to content

Commit 10b2224

Browse files
author
John Daggett
committed
add in font-stretch to font matching
1 parent 01cade8 commit 10b2224

1 file changed

Lines changed: 86 additions & 93 deletions

File tree

css3-fonts/Fonts.html

Lines changed: 86 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -183,20 +183,23 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
183183
class=property>font-stretch</span>&rsquo;</span> </a>
184184

185185
<li><a href="#font-family0"><span class=secno>3.2 </span>Font family:
186-
the &lsquo;<span class=property>font-family</span>&rsquo; property</a>
186+
the &lsquo;<span class=property>font-family</span>&rsquo;
187+
descriptor</a>
187188

188189
<li><a href="#font-style0"><span class=secno>3.3 </span>Font style: the
189-
&lsquo;<span class=property>font-style</span>&rsquo; property</a>
190+
&lsquo;<span class=property>font-style</span>&rsquo; descriptor</a>
190191

191192
<li><a href="#font-weight0"><span class=secno>3.4 </span>Font weight:
192-
the &lsquo;<span class=property>font-weight</span>&rsquo; property</a>
193+
the &lsquo;<span class=property>font-weight</span>&rsquo;
194+
descriptor</a>
193195

194196
<li><a href="#font-stretch"><span class=secno>3.5 </span>Font stretch:
195-
the &lsquo;<span class=property>font-stretch</span>&rsquo; property</a>
197+
the &lsquo;<span class=property>font-stretch</span>&rsquo;
198+
descriptor</a>
196199

197200
<li><a href="#character"><span class=secno>3.6 </span>Character range:
198201
the &lsquo;<span class=property>unicode-range</span>&rsquo;
199-
property</a>
202+
descriptor</a>
200203

201204
<li><a href="#font-reference"><span class=secno>3.7 </span>Font
202205
reference: the &lsquo;<span class=property>src</span>&rsquo;
@@ -1815,7 +1818,7 @@ <h3 id=descriptors><span class=secno>3.1 </span><a name=select>Descriptors
18151818
initial value for the descriptor is used.
18161819

18171820
<h3 id=font-family0><span class=secno>3.2 </span>Font family: the &lsquo;<a
1818-
class=property href="#font-family2">font-family</a>&rsquo; property</h3>
1821+
class=property href="#font-family2">font-family</a>&rsquo; descriptor</h3>
18191822

18201823
<table class=descdef>
18211824
<tbody>
@@ -1847,7 +1850,7 @@ <h3 id=font-family0><span class=secno>3.2 </span>Font family: the &lsquo;<a
18471850
href="#font-family2">font-family</a>&rsquo;</span> property.
18481851

18491852
<h3 id=font-style0><span class=secno>3.3 </span>Font style: the &lsquo;<a
1850-
class=property href="#font-style2">font-style</a>&rsquo; property</h3>
1853+
class=property href="#font-style2">font-style</a>&rsquo; descriptor</h3>
18511854

18521855
<table class=descdef>
18531856
<tbody>
@@ -1879,7 +1882,7 @@ <h3 id=font-style0><span class=secno>3.3 </span>Font style: the &lsquo;<a
18791882
comma-separated list is permitted.
18801883

18811884
<h3 id=font-weight0><span class=secno>3.4 </span>Font weight: the &lsquo;<a
1882-
class=property href="#font-weight2">font-weight</a>&rsquo; property</h3>
1885+
class=property href="#font-weight2">font-weight</a>&rsquo; descriptor</h3>
18831886

18841887
<table class=descdef>
18851888
<tbody>
@@ -1926,7 +1929,7 @@ <h3 id=font-weight0><span class=secno>3.4 </span>Font weight: the &lsquo;<a
19261929

19271930
<h3 id=font-stretch><span class=secno>3.5 </span>Font stretch: the
19281931
&lsquo;<a class=property href="#font-stretch1">font-stretch</a>&rsquo;
1929-
property</h3>
1932+
descriptor</h3>
19301933

19311934
<table class=descdef>
19321935
<tbody>
@@ -1970,7 +1973,7 @@ <h3 id=font-stretch><span class=secno>3.5 </span>Font stretch: the
19701973

19711974
<h3 id=character><span class=secno>3.6 </span>Character range: the
19721975
&lsquo;<a class=property href="#unicode-range">unicode-range</a>&rsquo;
1973-
property</h3>
1976+
descriptor</h3>
19741977

19751978
<table class=descdef>
19761979
<tbody>
@@ -1995,21 +1998,19 @@ <h3 id=character><span class=secno>3.6 </span>Character range: the
19951998
<td>visual
19961999
</table>
19972000

1998-
<p> The following descriptor is optional within a font definition, but is
2001+
<p>The following descriptor is optional within a font definition, but is
19992002
used to avoid checking or downloading a font that does not have sufficient
20002003
glyphs to render a particular character.
20012004

2002-
<p>This is the descriptor for the <a href="#ucode">range of ISO 10646
2003-
characters</a> covered by the font.
2004-
2005-
<p>The values of <span class=index-def id=lturangegt
2005+
<p>This is the descriptor for the Unicode characters covered by the font.
2006+
The values of <span class=index-def id=lturangegt
20062007
title="&lt;urange&gt;::definition of"><a
20072008
name=value-def-urange>&lt;urange&gt;</a></span> are expressed using
2008-
hexadecimal numbers prefixed by "U+", corresponding to character code
2009-
positions in ISO 10646 (<a href="#ISO10646"
2010-
rel=biblioentry>[ISO10646]<!--{{ISO10646}}--></a>).
2009+
hexadecimal numbers prefixed by "U+", corresponding to Unicode character
2010+
code positions (<a href="#UNICODE5"
2011+
rel=biblioentry>[UNICODE5]<!--{{!UNICODE5}}--></a>).
20112012

2012-
<p>For example, <tt>U+05D1</tt> is the ISO 10646 character &lsquo;<code
2013+
<p>For example, <tt>U+05D1</tt> is the Unicode character &lsquo;<code
20132014
class=css>Hebrew letter bet</code>&rsquo;. For values outside the Basic
20142015
Multilingual Plane (BMP), additional leading digits corresponding to the
20152016
plane number are added, also in hexadecimal, like this: <tt>U+A1234</tt>
@@ -2019,9 +2020,9 @@ <h3 id=character><span class=secno>3.6 </span>Character range: the
20192020

20202021
<p>The <a href="cascade.html#initial-value">initial value</a> of this
20212022
descriptor covers not only the entire Basic Multilingual Plane (BMP),
2022-
which would be expressed as U+0-FFFF, but also the whole repertoire of ISO
2023-
10646. Thus, the initial value says that the font may have glyphs for
2024-
characters anywhere in ISO 10646. Specifying a value for <span
2023+
which would be expressed as U+0-FFFF, but also the whole repertoire of
2024+
Unicode. Thus, the initial value says that the font may have glyphs for
2025+
characters anywhere in Unicode. Specifying a value for <span
20252026
class=descinst-unicode-range>&lsquo;<a class=property
20262027
href="#unicode-range">unicode-range</a>&rsquo;</span> provides information
20272028
to make searching efficient, by declaring a constrained range in which the
@@ -2079,7 +2080,7 @@ <h3 id=character><span class=secno>3.6 </span>Character range: the
20792080

20802081
<dd>Something of a worst case in terms of verbosity, this very precisely
20812082
indicates that this (extremely large) font contains only Chinese
2082-
characters from ISO 10646, without including any characters that are
2083+
characters from Unicode, without including any characters that are
20832084
uniquely Japanese or Korean. The range is 3000 to 303F (CJK symbols and
20842085
punctuation) plus 3100 to 312F (Bopomofo) plus 3200 to 32FF (enclosed CJK
20852086
letters and months) plus 3300 to 33FF (CJK compatibility zone) plus 4E00
@@ -2257,7 +2258,7 @@ <h3 id=font-reference><span class=secno>3.7 </span>Font reference: the
22572258
independent, but at the moment it is the best way to identify locally
22582259
installed font data. The use of the font face name can be made more
22592260
accurate by providing an indication of the glyph complement required. This
2260-
may be done by indicating the range of ISO 10646 character positions for
2261+
may be done by indicating the range of Unicode character positions for
22612262
which the font provides some glyphs (see <span
22622263
class=descinst-unicode-range>&lsquo;<a class=property
22632264
href="#unicode-range">unicode-range</a>&rsquo;</span>).
@@ -2271,10 +2272,10 @@ <h2 id=font-matching><span class=secno>4. </span>Font matching algorithm</h2>
22712272

22722273
<li>choose the face based on the set of faces associated with that name
22732274
<ol>
2274-
<li>font-style
2275-
22762275
<li>font-stretch
22772276

2277+
<li>font-style
2278+
22782279
<li>font-weight
22792280

22802281
<li>font-size
@@ -2296,29 +2297,6 @@ <h2 id=font-matching><span class=secno>4. </span>Font matching algorithm</h2>
22962297

22972298
<li>note that this means a single element can end up using multiple
22982299
fonts/faces!
2299-
2300-
<li>simple to complex examples
2301-
<ul>
2302-
<li>bold italic
2303-
2304-
<li>italic (synthesized)
2305-
2306-
<li>specific weights
2307-
2308-
<li>bolder/lighter
2309-
2310-
<li>bolder (synthesized)
2311-
2312-
<li>condensed
2313-
2314-
<li>run of text containing diacritics
2315-
2316-
<li>run of text containing mixture of Japanese/English
2317-
2318-
<li>simple downloaded font
2319-
2320-
<li>font-face with local/url combination
2321-
</ul>
23222300
</ul>
23232301

23242302
<p>This specification extends the algorithm given in the CSS1
@@ -2398,21 +2376,8 @@ <h2 id=font-matching><span class=secno>4. </span>Font matching algorithm</h2>
23982376
for whatever reason, or where the downloaded font cannot be used for
23992377
whatever reason, are considered to fail at this step.
24002378

2401-
<li>If there is no matching font face within the <span
2379+
<li>If all of steps 3 and 4 fail, and if there is a next alternative <span
24022380
class=descinst-font-family>&lsquo;<a class=property
2403-
href="#font-family2">font-family</a>&rsquo;</span> being processed by
2404-
step 3, <em>UAs that implement font synthesis</em> may proceed to examine
2405-
other descriptors such as <span class=descinst-x-height>&lsquo;<span
2406-
class=property>x-height</span>&rsquo;</span>, glyph widths, and <span
2407-
class=descinst-panose-1>&lsquo;<code
2408-
class=css>panose-1</code>&rsquo;</span> to identify a different tentative
2409-
font family for synthesis. If there are matches for all the remaining
2410-
descriptors, then that is the matching font face for the given element
2411-
and synthesis of the faux font may begin. UAs that do not implement font
2412-
synthesis are considered to fail at this step.
2413-
2414-
<li>If all of steps 3, 4 and 5 fail, and if there is a next alternative
2415-
<span class=descinst-font-family>&lsquo;<a class=property
24162381
href="#font-family2">font-family</a>&rsquo;</span> in the font set, then
24172382
repeat from step 2 with the next alternative <span
24182383
class=descinst-font-family>&lsquo;<a class=property
@@ -2457,12 +2422,6 @@ <h2 id=font-matching><span class=secno>4. </span>Font matching algorithm</h2>
24572422
<!-- [this text isn't perfect either, but it's important to get it in
24582423
before going to PR, HWL] -->
24592424

2460-
2461-
<li>UAs that implement progressive rendering and have pending font
2462-
downloads may, once download is successful, use the downloaded font as a
2463-
font family. If the downloaded font is missing some glyphs that the
2464-
temporary progressive font did contain, the downloaded font is not used
2465-
for that character and the temporary font continues to be used.
24662425
</ol>
24672426

24682427
<div class=note>
@@ -2474,7 +2433,13 @@ <h2 id=font-matching><span class=secno>4. </span>Font matching algorithm</h2>
24742433

24752434
<ol>
24762435
<li> <span class=descinst-font-style>&lsquo;<a class=property
2477-
href="#font-style2">font-style</a>&rsquo;</span> is tried first.
2436+
href="#font-stretch1">font-stretch</a>&rsquo;</span> is tried first.
2437+
&lsquo;<span class=property>normal</span>&rsquo; matches a font not
2438+
labeled as &lsquo;<span class=property>condensed</span>&rsquo; or
2439+
&lsquo;<span class=property>expanded</span>&rsquo;.
2440+
2441+
<li> <span class=descinst-font-style>&lsquo;<a class=property
2442+
href="#font-style2">font-style</a>&rsquo;</span> is tried next.
24782443
&lsquo;<span class=property>italic</span>&rsquo; will be satisfied if
24792444
there is either a face in the UA's font database labeled with the CSS
24802445
keyword &lsquo;<span class=property>italic</span>&rsquo; (preferred) or
@@ -2511,8 +2476,7 @@ <h2 id=font-matching><span class=secno>4. </span>Font matching algorithm</h2>
25112476
<h3 id=mapping><span class=secno>4.1 </span>Mapping font weight values to
25122477
font names</h3>
25132478

2514-
<p><!-- the above para might be moved around again --> The <span
2515-
class=propinst-font-weight>&lsquo;<a class=property
2479+
<p> The <span class=propinst-font-weight>&lsquo;<a class=property
25162480
href="#font-weight2">font-weight</a>&rsquo;</span> property values are
25172481
given on a numerical scale in which the value &lsquo;<code
25182482
class=css>400</code>&rsquo; (or &lsquo;<span
@@ -2676,6 +2640,32 @@ <h3 id=mapping><span class=secno>4.1 </span>Mapping font weight values to
26762640

26772641
<h3 id=examples><span class=secno>4.2 </span>Examples of font matching</h3>
26782642

2643+
<ul></ul>
2644+
2645+
<p>simple to complex examples
2646+
2647+
<ul>
2648+
<li>bold italic
2649+
2650+
<li>italic (synthesized)
2651+
2652+
<li>specific weights
2653+
2654+
<li>bolder/lighter
2655+
2656+
<li>bolder (synthesized)
2657+
2658+
<li>condensed
2659+
2660+
<li>run of text containing diacritics
2661+
2662+
<li>run of text containing mixture of Japanese/English
2663+
2664+
<li>simple downloaded font
2665+
2666+
<li>font-face with local/url combination
2667+
</ul>
2668+
26792669
<div class=example>
26802670
<p> The following example defines a specific font face, Alabama Italic. A
26812671
panose font description and source URI for retrieving a truetype server
@@ -2978,11 +2968,22 @@ <h3 id=normative><span class=secno>6.1 </span>Normative</h3>
29782968
href="http://www.w3.org/TR/2003/WD-css3-syntax-20030813">http://www.w3.org/TR/2003/WD-css3-syntax-20030813</a>
29792969
</dd>
29802970
<!---->
2971+
2972+
<dt id=UNICODE5>[UNICODE5]
2973+
2974+
<dd>The Unicode Consortium. <a
2975+
href="http://www.unicode.org/versions/Unicode5.1.0/"><cite>The Unicode
2976+
Standard, Version 5.1.0.</cite></a> Addison-Wesley. 2007. ISBN
2977+
0-321-48091-0. URL: <a
2978+
href="http://www.unicode.org/versions/Unicode5.1.0/">http://www.unicode.org/versions/Unicode5.1.0/</a>
2979+
</dd>
2980+
<!---->
29812981
</dl>
29822982
<!--end-normative-->
29832983
<!--
2984-
[[UNICODE5]]
2985-
-->
2984+
<a href="#UNICODE5" rel="biblioentry">[UNICODE5]<!--{{UNICODE5}}-->
2985+
2986+
<p>-->
29862987

29872988
<h3 id=informative><span class=secno>6.2 </span>Informative</h3>
29882989
<!--begin-informative-->
@@ -2994,12 +2995,8 @@ <h3 id=informative><span class=secno>6.2 </span>Informative</h3>
29942995

29952996
<dt id=ARABIC-TYPO>[ARABIC-TYPO]
29962997

2997-
<dd>Huda Smitshuijzen AbiFares. <a
2998-
href="http://www.saqibooks.com/saqi/display.asp?K=9780863563478"><cite>Arabic
2999-
Typography: A Comprehensive Sourcebook.</cite></a> 2001. ISBN
3000-
0-86356-347-3. URL: <a
3001-
href="http://www.saqibooks.com/saqi/display.asp?K=9780863563478">http://www.saqibooks.com/saqi/display.asp?K=9780863563478</a>
3002-
</dd>
2998+
<dd>Huda Smitshuijzen AbiFares. <cite>Arabic Typography: A Comprehensive
2999+
Sourcebook.</cite> 2001. ISBN 0-86356-347-3.</dd>
30033000
<!---->
30043001

30053002
<dt id=ELEMTYPO>[ELEMTYPO]
@@ -3018,23 +3015,19 @@ <h3 id=informative><span class=secno>6.2 </span>Informative</h3>
30183015
</dd>
30193016
<!---->
30203017

3021-
<dt id=ISO10646>[ISO10646]
3018+
<dt id=LANGCULTTYPE>[LANGCULTTYPE]
30223019

3023-
<dd><cite>Information Technology - Universal Multiple- Octet Coded
3024-
CharacterSet (UCS) - Part 1: Architecture and Basic Multilingual
3025-
Plane.</cite> ISO/IEC10646-1:1993. The current specification also takes
3026-
into consideration the first five amendments to ISO/IEC 10646-1:1993.
3027-
Useful &lt;a
3028-
href=&quot;http://www.egt.ie/standards/iso10646/ucs-roadmap.html&quot;&gt;roadmaps&lt;/a&gt;show
3029-
which scripts sit at which numeric ranges.</dd>
3020+
<dd>John D. Berry, Ed. <cite>Language Culture Type.</cite> 2001. ISBN
3021+
1-932026-01-0.</dd>
30303022
<!---->
30313023

3032-
<dt id=LANGCULTTYPE>[LANGCULTTYPE]
3024+
<dt id=UNICODE5>[UNICODE5]
30333025

3034-
<dd>John D. Berry, Ed. <a
3035-
href="http://www.graphis.com/other_titles/design.php?view=book&amp;id=81"><cite>Language
3036-
Culture Type.</cite></a> 2001. ISBN 1-932026-01-0. URL: <a
3037-
href="http://www.graphis.com/other_titles/design.php?view=book&amp;id=81">http://www.graphis.com/other_titles/design.php?view=book&amp;id=81</a>
3026+
<dd>The Unicode Consortium. <a
3027+
href="http://www.unicode.org/versions/Unicode5.1.0/"><cite>The Unicode
3028+
Standard, Version 5.1.0.</cite></a> Addison-Wesley. 2007. ISBN
3029+
0-321-48091-0. URL: <a
3030+
href="http://www.unicode.org/versions/Unicode5.1.0/">http://www.unicode.org/versions/Unicode5.1.0/</a>
30383031
</dd>
30393032
<!---->
30403033
</dl>

0 commit comments

Comments
 (0)