Skip to content

Commit ad60e0e

Browse files
author
John Daggett
committed
tighten up the font-feature-settings syntax
1 parent fdbbcf4 commit ad60e0e

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

css3-fonts/Fonts.html

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@
120120

121121
<h1>CSS Fonts Module Level 3</h1>
122122

123-
<h2 class="no-num no-toc" id=editors-draft-28-february-2012>Editor's Draft
124-
28 February 2012</h2>
123+
<h2 class="no-num no-toc" id=editors-draft-20-april-2012>Editor's Draft 20
124+
April 2012</h2>
125125

126126
<dl id=authors>
127127
<dt>This version:
128128

129129
<dd><a
130130
href="http://dev.w3.org/csswg/css3-fonts/">http://dev.w3.org/csswg/css3-fonts/</a>
131-
<!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-fonts-20120228/">http://www.w3.org/TR/2012/ED-css3-fonts-20120228/</a> -->
131+
<!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-fonts-20120420/">http://www.w3.org/TR/2012/ED-css3-fonts-20120420/</a> -->
132132

133133

134134
<dt>Latest version:
@@ -168,12 +168,12 @@ <h2 class="no-num no-toc" id=editors-draft-28-february-2012>Editor's Draft
168168
<!--begin-copyright-->
169169
<p class=copyright><a
170170
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
171-
rel=license>Copyright</a> © 2012 <a href="http://www.w3.org/"><acronym
172-
title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a
173-
href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute
174-
of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym
171+
rel=license>Copyright</a> © 2012 <a href="http://www.w3.org/"><abbr
172+
title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
173+
href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of
174+
Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr
175175
title="European Research Consortium for Informatics and
176-
Mathematics">ERCIM</acronym></a>, <a
176+
Mathematics">ERCIM</abbr></a>, <a
177177
href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
178178
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
179179
<a
@@ -4418,12 +4418,14 @@ <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
44184418

44194419
<p>The &lt;string&gt; is a case-sensitive OpenType feature tag. For it to
44204420
match an OpenType feature contained in a font, it must follow the syntax
4421-
rules for tags. As specified in the OpenType specification, feature tags
4422-
contain four characters. Tag strings longer than four characters must be
4423-
ignored, user agents must not use a feature tag created by truncating the
4424-
string to four characters. Feature tags need only match a feature tag
4425-
defined in the font, they are not limited to explicitly registered
4426-
OpenType features. Fonts defining custom feature tags should follow the <a
4421+
rules for these tags. As specified in the OpenType specification, feature
4422+
tags contain four ASCII characters. Tag strings longer or shorter than
4423+
four characters, or containing characters outside the U+20-7E codepoint
4424+
range are invalid. User agents must not use a feature tag created by
4425+
truncating or padding the string to four characters. Feature tags need
4426+
only match a feature tag defined in the font, they are not limited to
4427+
explicitly registered OpenType features. Fonts defining custom feature
4428+
tags should follow the <a
44274429
href="http://www.microsoft.com/typography/otspec/featuretags.htm">tag name
44284430
rules</a> defined in the OpenType specification <a
44294431
href="#OPENTYPE-FEATURES"
@@ -4446,8 +4448,10 @@ <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
44464448
font-feature-settings: 'c2sc'; /* c2sc=1 enable caps to small caps */
44474449
font-feature-settings: "liga" off; /* liga=0 no common ligatures */
44484450
font-feature-settings: "tnum", 'hist'; /* tnum=1, hist=1 enable tabular numbers and historical forms */
4449-
font-feature-settings: "palin" off; /* good idea but invalid tagname, ignored */
4451+
font-feature-settings: "tnum" "hist"; /* invalid, need a comma-delimited list */
4452+
font-feature-settings: "palin" off; /* good idea but invalid tagname */
44504453
font-feature-settings: "PKRN"; /* PKRN=1 enable custom feature */
4454+
font-feature-settings: dlig; /* invalid, tag must be a string */
44514455
</pre>
44524456

44534457
<p>Authors should generally use ‘<a href="#propdef-font-variant"><code
@@ -4458,10 +4462,8 @@ <h3 id=font-feature-settings-prop><span class=secno>6.12 </span>Low-level
44584462

44594463
<p>Although specifically defined for OpenType feature tags, feature tags
44604464
for other modern font formats that support font features may be added in
4461-
the future.
4462-
4463-
<p class=issue>While the use of quotes distinguishes feature tags as
4464-
defined in an external resource, they still seem a bit clumsy.
4465+
the future. Where possible, features defined for other font formats should
4466+
attempt to follow the pattern of registered OpenType tags.
44654467

44664468
<div class=example>
44674469
<p>The Japanese text below will be rendered with half-width kana

0 commit comments

Comments
 (0)