[Webkit-unassigned] [Bug 15257] Support CSS 3 font-size-adjust

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 6 02:53:52 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=15257





--- Comment #7 from Nicholas Shanks <contact at nickshanks.com>  2011-04-06 02:53:51 PST ---
My opinion is that the biggest barrier to adoption of this, besides general lack of renderer support, is that calculating the value to use is not exactly trivial, and requires examining the typeface in a font editor. Most web page authors won't go to this length.

As such, may I suggest that when implementing this, WebKit includes a lookup table of common fonts and their ex/em ratios. Since these values are fixed for each typeface, WebKit can store and retrieve these data to avoid the web designer having to calculate the values for himself.

For example:

font-family: "Janson", "Janson Text", serif;
font-weight: bold;
font-size-adjust: 0.42;  // perhaps incorrect

WebKit would then use the fact that the page author tried to give a font-size-adjust value as a c(l)ue to use its own table, check if "Janson-Bold" is in the list, and if not, use the author-provided value.

An alternative idea is, after the above three properties, the author optionally puts:
font-size-adjust: auto;  // cue to renderer to use its pre-generated conversion table if available
this property will override the 0.42 value if and only if the computed first font-family is known to WebKit, and be ignored if not. Other renderers will always ignore it, as they will not recognise 'auto'. If this was adopted, WebKit would not use the mere presence of font-size-adjust as its cue to do a lookup.

Some pre-calculated values are listed at http://www.fonttester.com/help/css_property/font-size-adjust.html

A good starting point would be all fonts shipped with Windows XP, Vista, 7 and Mac OS 10.4-10.7


What font-size-adjust was intended to do, is maintain equivalent ex-heights across typefaces.
What font-size-adjust really does is define a characteristic of the typeface the author wanted to use.
Therefore, if I was designing a system today to do this, I'd consider instead a property as a member of @font-face { } such as "ex-height: 42%" where value is one of [percentage|floating-point|integer/integer]. This is really where it belongs, not as a property of some selector.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list