Re: Thoughts on Font-x-size property for CSS

Thank you Alastair, this is all extremely helpful! I’m going to edit the post along these lines. 

TL;DR: In short, font size by x-height is do-able today in CSS and a critical priority.
Font weight is more important but not do-able today, so weight is sidelined for future development.


Commenting on your bullets, in order:

Good to know, as font-x-height covers a very wide swath of priorities including those not related to accessibility.
Yes, a principal idea behind font-x-size: is to replace font-size as the common means for setting font size as rendered on screen, specifically for the purpose of maintaining a high confidence of consistency.
“come to us with a use-case, not a solution” Okay, well, I think in terms of solutions and not problems, though I think I understand what you’re getting at… This is part of the larger readability research I’ve been doing for a the last 2½ years, and so the presentation is part of the thought process on how it needs to work...
There is very much a general need for this from a design perspective. Consistency as I mentioned, and avoiding un-expected behaviors when doing something like a site-wide font change. 
Font size is not such a thing in the physical print world because the designer has it all right in front of them, and after the choices are made they are locked onto paper.
But also, back in the day there were maybe half a dozen fonts to choose from for body text depending on the typesetter you went to (Times, Optima, Helvetica/Univers, Bookman, Garamond, Cooper, Franklin Gothic)… today there are thousands.
And in a website and dynamic environment, elements are much more fluid and often dynamically created, and adjusted to flow in multiple different environments, from a phone to a desktop display and even including print.
And yes I know it’s a big deal, partly why I waited till now to start really pushing for it, though I first brought up these concepts to Janina/APA about two years ago.
And this specific issue is a main reason that I lobbied for starting a vision subgroup again back in January of this year.

Font Related Readability
Inconsistent font size and font weight properties are central to the readability problems on the web.
As we have discussed in the past, font weight requires:
a technology for assessment and categorization that has eluded major corporate research and invention as evidenced by the mass of patents without finding a “standard” methodology.
is substantially subjective, varies as a function of size, and is not as simple as “stroke width"
automated weight assessment is far beyond CSS or any other existing web technology.
I have some things under review, but that’s the most I’ll say at the moment. It’s a LONG way off.
Font size though is a different matter.
Font size based on x-height is objective, and usually trivial to determine.
“Swashy” fonts can be a problem unless they have an x-height metric in the font file (and most do).
web fonts *do* need to mandate an x-height metric in the woff file, and this is something else that needs to be brought forward.
nevertheless, using x-height for font size is easily within the purview of CSS.


While perceptually consistent font weight is arguably more important thank size, it is also out of reach of CSS or any other web technology without a lengthy development process that probably needs corporate sponsorship, and even then the non-standard font-weight issue has been a problem since the era of Gutenberg, and past corporate attempts have fallen flat, i.e. PANOSE is not helpful here.

Honestly, we need a subgroup just on font weight not just for accessibility, but for general design needs.


Thank you,

Andy


“If you plant a cube in the ground does it grow square roots?"


> On Oct 7, 2021, at 4:39 PM, Alastair Campbell <acampbell@nomensa.com> wrote:
> 
> Hi Andrew,
>  
> Just a couple of observations from having been in the standards / W3C space for a while:
> I’ve never seen an argument for “this is needed for accessibility guidelines” work with HTML or CSS standards unless it also aligns with other priorities. (See also https://www.tpgi.com/html5-document-outline/ <https://www.tpgi.com/html5-document-outline/>)
> 
> From the github issue, it took a lot of reading to work out the benefit of font-x-height, which is (I think) that you can set a font-size which would appear to be the same size across font-families.
> 
> There is a mantra in the HTML/CSS space of “come to us with a use-case, not a solution”. If you start naming things (like font-x-height) people focus on the wrong things.
> 
> If there is a benefit to general web development (e.g. switching font-families doesn’t cause layout issues), start with that, and then mention the accessibility benefits.
> If you can edit your initial comment in the issue, I’d suggest putting the TL;DR bit at the top, but frame the name as “a CSS property such as font-x-height”.
>  
> I’ve previously had a good experience with issues put to the CSS working group. They have a ton of issues, but they are efficient when they get to them. However, proposing a whole new property is a big deal.
>  
> I hope that helps,
>  
> -Alastair

Received on Sunday, 10 October 2021 02:25:50 UTC