-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-text-decor-4] Add use-font keyword for text-decoration-width & text-decoration-offset #2376
Comments
PS: Since currently browser do various things for |
Agenda+ to get an official WG resolution on adding this, and to ask if there's preference on what keyword to use. I think |
If we do this, we need language to give browsers enough freedom to perform platform-dependent "fixup" to these font values. For example, CoreText performs its own fixup before WebKit even calls into it to get these values. |
Also we need to specify which font in the |
Perhaps the same criterion as we use elsewhere: the first font to have a glyph for 0x20 space. |
Would it be sufficient if this fixup would only be applied in the |
@litherum We use the “first available font”, as always. |
CoreText uses a heuristic to guess when a font has bad data, and if it detects bad data, it synthesizes new values and exposes those. If WebKit wanted to use literally what the font file says, it would have to parse the font file tables itself. This would be unfortunate because the CoreText synthesized data will be of higher quality than the font file itself (that's the whole point of the synthesis). |
@fantasai So if the first available font does not have a space glyph, the underline position will be taken from a different font than the rest of the font metrics? That seems odd. |
@svgeesus We use the “first available font” for a variety of operations that are relevant: the sizes of font-relative units, the height and baseline position of the line, etc. We should consistently use it for every operation for which we need a single set of font metrics. And the position and thickness of an underline for a given element is a single set of metrics. If you have a problem with how the “first available font” is found, file an issue against that. Also if we for some reason have multiple concepts of “first available font”, we should consolidate them into one. There should only be one “first available font” per element, regardless of operation. |
I see there are cases when what's in the Can we perhaps dig in and describe the criteria for when |
I would prefer not to specify CoreText implementation details. |
The Working Group just discussed
The full IRC log of that discussion<dael> Topic: ] Add use-font keyword for text-decoration-width & text-decoration-offset<dael> github: https://github.com//issues/2376#issuecomment-371376593 <dael> fantasai: Suggestion to have a keyword to use metrics in font. Proposals were use-font and from-font. We're open to other ideas. Resolution I'm looking for is a keyword for this thing. I vaguely recall another property with a similar keyword, but I couldn't find it. <dael> astearns: I don't recall <dael> myles: I think having a new keyword is fine. Point I raised in the issue is that implmay want UA dependant fixus if font has rediculous values. <dael> fantasai: That's fine. <dael> florian: Do you plan that for a known list? <dael> myles: It's done automatically so I can't comment on specific algo, but it's impl detail on how we perform the fixup. <dael> florian: Okay. <dael> astearns: Spec would say use font would use metrics from first available font if they are reasonable? <dael> myles: Or just say it would similar metrics to the font...that's bad...I'm not sure exact text. <dael> myles: You could have a second sentence saying UA MAY synth values. I'll defer to fantasai . She can do a good job. <myles> s/fixus/fixup/ <dael> astearns: Question is if we add this keyword. Does anyone have concerns about adding a use font keyword for these text decoration metrics <dael> astearns: Obj? <dael> astearns: I'm assuming use font is what we should use. <dael> fantasai: Use fotn and from font are the top two. <dael> astearns: Use sounds better to me. <liam> i prefer from-font <dael> fantasai: We're not dead set on this if there's a better idea. <liam> since the font's glyphs aren't used. <florian> +1 to from-font, but no objection to the other one <dael> RESOLVED: about adding a use-font (name to be bikesheded) keyword for these text decoration metrics |
Ping about bikeshedding the name, perhaps you can agree on a keyword name while meeting in Berlin. Thanks. |
The Working Group just discussed
The full IRC log of that discussion<dael> Topic: Bikeshed font underline value names<dael> github: https://github.com//issues/2376 <dael> myles: THere's 2 properties to describe the geomeptry of text decoration. Move up and move down. Increase size. Fonts also include information about where font desigener thigns decorations should be. We resolved to add keywords to say use what's in the font file. We have not found names. <dael> myles: One is from-font and one is use-font <dael> fantasai: Also match-font <dael> TabAtkins: We have a from-image keyword. <dael> fantasai: Anyone impl? <dael> TabAtkins: Dunno. <dael> fantasai: I like your point that they should be consistent. <dael> astearns: Objections to from-font? <dael> RESOLVED: use from-font |
…t-underline-offset per WG resolution. Fixes w3c#2376
In the WG minutes from February 2017 and the discussion in issue 459 there were references to adding a keyword to
text-decoration-width
andtext-decoration-offset
. @fantasai suggested to useuse-font
as the keyword name.Quite possibly I missed earlier discussions on this, that's why I am asking to clarify:
Can we add such a keyword and specifying is as adhering to the definitions of
underlinePosition
andunderlineThickness
in the post table of the OpenType specification?The text was updated successfully, but these errors were encountered: