diff --git a/css-fonts-5/Overview.bs b/css-fonts-5/Overview.bs index 026a8b54dea..4536cde63a3 100644 --- a/css-fonts-5/Overview.bs +++ b/css-fonts-5/Overview.bs @@ -25,6 +25,7 @@ spec:css-color-4; type:property; text:color spec:css-values; type:value; text:ex spec:css22; type:value; for:/; text:block spec:html; type:element; text:font +spec:html; type:element; text:meta spec:css-fonts-4; type:property; text:font-size spec:css-fonts-4; type:descriptor; text:font-language-override spec:css-fonts-4; type:property; text:font-family @@ -59,7 +60,78 @@ rules defined in CSS Fonts Level 4. This specification is currently a delta to the CSS Fonts Level 4 specification. Do not assume that if something is not here, it has been dropped. +

+Text-Scale <meta> element

+ +A document with a <{meta}> tag +whose name attribute +is a ASCII case-insensitive match for +"text-scale" +is recognized as setting the computed value +of the ''font-size/medium'' font size +and consequently scaling the computed size of the other <> keywords. + +The value of the content +attribute must be an ASCII case-insensitive match for one of the +recognized keywords. Otherwise the tag is ignored. + +Documents without this <meta> tag will have an assumed default +value of legacy. + +

+Keywords

+ +The recognized keywords in the [=text-scale=] +<{meta}> element are: + +
+
legacy
+
''env()/preferred-text-scale'' returns the user's OS-level font factor on mobile, + but 1 on desktop. + The document's initial font size only incorporates UA-level font preferences. + OS-level font preferences are ignored.
+
scale
+
''env()/preferred-text-scale'' returns the user's OS-level font preferences. + The document's initial font size incorporates both UA-level and OS-level font preferences.
+
+ +

The 'legacy' keyword

+ +When the value of the [=text-scale=] content attribute is +[=text-scale/legacy=] +the user agent must set the computed ''font-size/medium'' font size +to 16px multiplied by +the font scale factor +the user has chosen from any settings provided by the user agent. +The ''preferred-text-scale'' value must be 1 on desktop platforms. +On mobile: + + +

The 'scale' keyword

+ +The scale property is +recognized in the [=text-scale=] content attribute value. + +When the value of the [=text-scale=] content attribute is +scale +computed ''font-size/medium'' font size must match the user's preferred paragraph text size as determined from a combination of OS and UA preferences. + +The ''env()/preferred-text-scale'' value must be a number that, +when multiplied by 16px, +provides a <> that matches that of the initial font size. + +Further, when the value of the [=text-scale=] content attribute is +scale, the user agent should skip all font-sizing interventions it would otherwise perform in an attempt to automatically honor the user's preferences. E.g. text autosizing on mobile (See [[css-size-adjust#intro]]) and full-application zoom (popular browsers do this on Windows). +Note: It is expected that authors will use +''<meta name="text-scale" content="scale">'' in stylesheets so that the initial font size will reflect a combination of the user's font preferences, whether those are specified at the OS level or the UA level. The author will then be able to use ''rem'' throughout the page to honor the user's font preferences.

Value Definitions