Re: [csswg-drafts] [css-text-decor] Results for text-underline-position: under

Older drafts of css-text-decor-3 have more guidance on underline positioning, fwiw. I don't think it handles fallback fonts, but that seems like an oversight since it delves into varying font settings across elements. https://www.w3.org/TR/2013/WD-css-text-decor-3-20130103/#line-position Some of that guidance could be helpful here for dealing with fallback fonts. Of course, that section was removed because implementers didn't want it...

I don't think there's anything we can do about bad font metrics. I'm happy to put guidance in the spec about <em>which</em> font metrics to use, but certainly the glyph bounding box--which is the only metric that would avoid collisions entirely--is not an acceptable answer here since it can place the underline on top of text in the next line when the font designer has chosen to bleed the glyphs outside the ascent/descent. I suspect the best place to put an underline will vary a lot by typeface: the more cursive ones will require greater levels of collision in order for the text not to look absurdly disjoint from the underline, whereas the more print-like ones will be able to accommodate a nearby underline without so many problems since they maintain a more consistent inked "baseline".

Wrt Tibetan, SIL has some examples: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-chapter09#964d1526 Afaict from @r12a's examples, it seems more important to avoid collisions with the top of the next line than to avoid collisions with the bottom of the current one, and what we choose to do here should ideally reflect that constraint.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1055#issuecomment-337752816 using your GitHub account

Received on Wednesday, 18 October 2017 23:04:34 UTC