107107
108108 < h1 > CSS Fonts Module Level 3</ h1 >
109109
110- < h2 class ="no-num no-toc " id =editors-draft-12 -november-2012 > Editor's Draft
111- 12 November 2012</ h2 >
110+ < h2 class ="no-num no-toc " id =editors-draft-13 -november-2012 > Editor's Draft
111+ 13 November 2012</ h2 >
112112
113113 < dl id =authors >
114114 < dt > This version:
115115
116116 < dd > < a
117117 href ="http://dev.w3.org/csswg/css3-fonts/ "> http://dev.w3.org/csswg/css3-fonts/</ a >
118- <!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-fonts-20121112 /">http://www.w3.org/TR/2012/ED-css3-fonts-20121112 /</a> -->
118+ <!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-fonts-20121113 /">http://www.w3.org/TR/2012/ED-css3-fonts-20121113 /</a> -->
119119
120120
121121 < dt > Latest version:
@@ -378,25 +378,31 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
378378 </ span > Feature precedence examples</ a >
379379 </ ul >
380380
381- < li > < a href ="#font-load-events "> < span class =secno > 8 </ span > Font Load
381+ < li > < a href ="#object-model "> < span class =secno > 8 </ span > Object Model</ a >
382+ < ul class =toc >
383+ < li > < a href ="#om-fontface "> < span class =secno > 8.1 </ span > The
384+ < code > CSSFontFaceRule</ code > interface</ a >
385+
386+ < li > < a href ="#om-fontfeaturevalues "> < span class =secno > 8.2 </ span > The
387+ < code > CSSFontFeatureValuesRule</ code > interface</ a >
388+ </ ul >
389+
390+ < li > < a href ="#font-load-events "> < span class =secno > 9 </ span > Font Load
382391 Events</ a >
383392 < ul class =toc >
384- < li > < a href ="#document-fontloader "> < span class =secno > 8 .1
393+ < li > < a href ="#document-fontloader "> < span class =secno > 9 .1
385394 </ span > Extension to the < code > document</ code > interface</ a >
386395
387- < li > < a href ="#fontloader-interface "> < span class =secno > 8 .2 </ span > The
396+ < li > < a href ="#fontloader-interface "> < span class =secno > 9 .2 </ span > The
388397 < code > FontLoader</ code > Interface</ a >
389398
390- < li > < a href ="#font-load-event-examples "> < span class =secno > 8 .3
399+ < li > < a href ="#font-load-event-examples "> < span class =secno > 9 .3
391400 </ span > Font load event examples</ a >
392401 </ ul >
393402
394403 < li class =no-num > < a href ="#platform-props-to-css "> Appendix A: Mapping
395404 platform font properties to CSS properties</ a >
396405
397- < li class =no-num > < a href ="#font-feature-values-DOM "> Appendix B: DOM
398- Interfaces</ a >
399-
400406 < li class =no-num > < a href ="#ch-ch-ch-changes "> Changes</ a >
401407 < ul class =toc >
402408 < li class =no-num > < a href ="#recent-changes "> Changes from the August 2012
@@ -2952,12 +2958,11 @@ <h3 id=cluster-matching><span class=secno>5.2 </span>Cluster matching</h3>
29522958 selection rules defined in the previous section.
29532959 < ol >
29542960 < li > If all characters in the sequence < em > b + c1 + c2 …</ em > are
2955- completely supported by the font's character map, select this font for
2956- the sequence.
2961+ completely supported by the font, select this font for the sequence.
29572962
29582963 < li > If a sequence of multiple codepoints is canonically equivalent to a
2959- single character and the font's character map supports that character,
2960- select this font for the sequence.
2964+ single character and the font supports that character, select this font
2965+ for the sequence.
29612966 </ ol >
29622967
29632968 < li > If no font was found in the font list in step 1:
@@ -4910,14 +4915,71 @@ <h3 id=feature-precedence-examples><span class=secno>7.3 </span>Feature
49104915 discretionary ligatures.</ p >
49114916 </ div >
49124917
4913- < h2 id =font-load-events > < span class =secno > 8 </ span > Font Load Events</ h2 >
4918+ < h2 id =object-model > < span class =secno > 8 </ span > Object Model</ h2 >
4919+
4920+ < p > The contents of < code > @font-face</ code > and
4921+ < code > @font-feature-values</ code > rules can be accessed via the following
4922+ extensions to the CSS Object Model.
4923+
4924+ < h3 id =om-fontface > < span class =secno > 8.1 </ span > The < a
4925+ href ="#cssfontfacerule "> < code > CSSFontFaceRule</ code > </ a > interface</ h3 >
4926+
4927+ < p > The < dfn id =cssfontfacerule > CSSFontFaceRule</ dfn > interface represents a
4928+ ‘< code class =css > @font-face</ code > ’ rule.
4929+
4930+ < pre class =idl >
4931+ interface CSSFontFaceRule : CSSRule {
4932+ readonly attribute DOMString family;
4933+ readonly attribute DOMString src;
4934+ readonly attribute DOMString style;
4935+ readonly attribute DOMString weight;
4936+ readonly attribute DOMString stretch;
4937+ readonly attribute DOMString unicodeRange;
4938+ readonly attribute DOMString variant;
4939+ readonly attribute DOMString featureSettings;
4940+ }</ pre >
4941+
4942+ < p > The CSS 2.0 specification defined a different variant of this rule. This
4943+ definition supercedes that one.
4944+
4945+ < h3 id =om-fontfeaturevalues > < span class =secno > 8.2 </ span > The < a
4946+ href ="#cssfontfeaturevaluesrule "> < code > CSSFontFeatureValuesRule</ code > </ a >
4947+ interface</ h3 >
4948+
4949+ < p > The < code > CSSRule</ code > interface is extended as follows:
4950+
4951+ < pre class =idl > partial interface CSSRule {
4952+ const unsigned short FONT_FEATURE_VALUES_RULE = 14;
4953+ }</ pre >
4954+
4955+ < p > The < dfn id =cssfontfeaturevaluesrule > CSSFontFeatureValuesRule</ dfn >
4956+ interface represents a ‘< code class =css > @font-feature-values</ code > ’
4957+ rule.
4958+
4959+ < pre class =idl > interface CSSFontFeatureValuesRule : CSSRule {
4960+ readonly attribute DOMString familyList;
4961+ readonly attribute DOMString valueText;
4962+ };</ pre >
4963+
4964+ < dl class =idl-attributes >
4965+ < dt > < var > familyList</ var > of type < code > DOMString</ code > , readonly
4966+
4967+ < dd > The list of one or more font families for which a given set of feature
4968+ values is defined.
4969+
4970+ < dt > < var > valueText</ var > of type < code > DOMString</ code > , readonly
4971+
4972+ < dd > Serialized set of feature values.
4973+ </ dl >
4974+
4975+ < h2 id =font-load-events > < span class =secno > 9 </ span > Font Load Events</ h2 >
49144976
49154977 < p > Since fonts defined via @font-face rules are loaded on demand, pages may
49164978 need to know precisely when fonts have completed downloading before
49174979 measuring text elements on the page or to show some form of interim user
49184980 interface state.
49194981
4920- < h3 id =document-fontloader > < span class =secno > 8 .1 </ span > Extension to the
4982+ < h3 id =document-fontloader > < span class =secno > 9 .1 </ span > Extension to the
49214983 < code > document</ code > interface</ h3 >
49224984
49234985 < p > To allow font loading to be tracked explicitly within content the
@@ -4928,7 +4990,7 @@ <h3 id=document-fontloader><span class=secno>8.1 </span>Extension to the
49284990};
49294991</ pre >
49304992
4931- < h3 id =fontloader-interface > < span class =secno > 8 .2 </ span > The
4993+ < h3 id =fontloader-interface > < span class =secno > 9 .2 </ span > The
49324994 < code > FontLoader</ code > Interface</ h3 >
49334995
49344996 < pre class =idl > [Constructor]
@@ -5006,7 +5068,7 @@ <h3 id=fontloader-interface><span class=secno>8.2 </span>The
50065068 authors need to explicitly call this method again to have the callback
50075069 called again.
50085070
5009- < h3 id =font-load-event-examples > < span class =secno > 8 .3 </ span > Font load
5071+ < h3 id =font-load-event-examples > < span class =secno > 9 .3 </ span > Font load
50105072 event examples</ h3 >
50115073
50125074 < div class =example >
@@ -5135,99 +5197,6 @@ <h2 class=no-num id=platform-props-to-css>Appendix A: Mapping platform font
51355197 Mac OS X. Apple has indicated it intends to support complex script
51365198 rendering using OpenType font features in the future.
51375199
5138- < h2 class =no-num id =font-feature-values-DOM > Appendix B: DOM Interfaces</ h2 >
5139-
5140- < p > < em > This appendix is normative.</ em >
5141-
5142- < p > Font feature values defined within < code > @font-feature-values</ code >
5143- rules are accessible via the following modifications to the CSS Object
5144- Model.
5145-
5146- < dl >
5147- < dt > < b > Interface < i > < a id =DOM-CSSRule name =DOM-CSSRule > CSSRule</ a > </ i > </ b >
5148-
5149- < dd >
5150- < p > The following additional rule type is added to the
5151- < code > CSSRule</ code > interface.</ p >
5152-
5153- < dl >
5154- < dt > < b > IDL Definition</ b >
5155-
5156- < dd >
5157- < div class =idl-code >
5158- < pre >
5159- interface CSSRule {
5160- ...
5161- const unsigned short FONT_FEATURE_VALUES_RULE = 14;
5162- ...
5163- };</ pre >
5164- </ div >
5165- </ dd >
5166- <!-- IDL -->
5167- </ dl >
5168-
5169- < dt > < b > Interface < i > < a id =DOM-CSSFontFeatureValuesRule
5170- name =DOM-CSSFontFeatureValuesRule > CSSFontFeatureValuesRule</ a > </ i > </ b >
5171-
5172- < dd >
5173- < p > The < code > CSSFontFeatureValuesRule</ code > interface represents font
5174- feature selector values for a given set of font families.</ p >
5175-
5176- < dl >
5177- < dt > < br >
5178- < b > IDL Definition</ b >
5179-
5180- < dd >
5181- < div class =idl-code >
5182- < pre >
5183- interface CSSFontFeatureValuesRule : CSSRule {
5184- attribute DOMString fontFamily;
5185- // raises(DOMException) on setting
5186- attribute DOMString valueText;
5187- // raises(DOMException) on setting
5188- };
5189- </ pre >
5190- </ div >
5191- < br >
5192-
5193- < dt > < b > Attributes</ b >
5194-
5195- < dd >
5196- < dl >
5197- < dt > < code class =attribute-name > < a
5198- id =DOM-CSSFontFeatureValuesRule-fontFamily
5199- name =DOM-CSSFontFeatureValuesRule-fontFamily > fontFamily</ a > </ code > of
5200- type < code > DOMString</ code >
5201-
5202- < dd > This attribute represents the list of font families for which a
5203- particular set of values are defined. The syntax is the same as that
5204- of the font-family property.
5205- </ dl >
5206-
5207- < dd >
5208- < dl >
5209- < dt > < code class =attribute-name > < a
5210- id =DOM-CSSFontFeatureValuesRule-valueText
5211- name =DOM-CSSFontFeatureValuesRule-valueText > valueText</ a > </ code > of
5212- type < code > DOMString</ code >
5213-
5214- < dd > Parsable text representing the set of feature values defined for a
5215- given set of font families.
5216- </ dl >
5217-
5218- < dt > < b > Exceptions on setting</ b >
5219- </ dl >
5220-
5221- < dl >
5222- < dt > < code > DOMException SYNTAX_ERR</ code >
5223-
5224- < dd > Thrown when the specified string value has a syntax error or is
5225- unparsable.
5226- </ dl >
5227-
5228- < dt > < b > No Methods</ b >
5229- </ dl >
5230-
52315200 < h2 class =no-num id =ch-ch-ch-changes > Changes</ h2 >
52325201
52335202 < h3 class =no-num id =recent-changes > Changes from the < a
@@ -5247,6 +5216,10 @@ <h3 class=no-num id=recent-changes> Changes from the <a
52475216 < li > Added definition of font load events
52485217
52495218 < li > Defined explicit steps for font matching grapheme clusters
5219+
5220+ < li > Added font-stretch values to the font shorthand
5221+
5222+ < li > Created object model section and revised definition of CSSFontFaceRule
52505223 </ ul >
52515224
52525225 < h2 class =no-num id =acknowledgments > Acknowledgments</ h2 >
@@ -5651,6 +5624,12 @@ <h2 class=no-num id=index>Index</h2>
56515624 < li > contextual, < a href ="#contextual "
56525625 title =contextual > < strong > 6.4</ strong > </ a >
56535626
5627+ < li > CSSFontFaceRule, < a href ="#cssfontfacerule "
5628+ title =CSSFontFaceRule > < strong > 8.1</ strong > </ a >
5629+
5630+ < li > CSSFontFeatureValuesRule, < a href ="#cssfontfeaturevaluesrule "
5631+ title =CSSFontFeatureValuesRule > < strong > 8.2</ strong > </ a >
5632+
56545633 < li > cursive, definition of, < a href ="#cursive0 " title ="cursive, definition
56555634 of "> < strong > #</ strong > </ a >
56565635
0 commit comments