-
Notifications
You must be signed in to change notification settings - Fork 687
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-inline-3] Canvas 2D's textBaseline = "middle" neccessitates an em-middle baseline? #5431
Comments
Maybe an alternative is that I describe it as the middle of the em-over and em-under baselines, but we might as well have a term for it? |
See w3c/csswg-drafts#5312. And also #5429 for where all of this started. Ideally though w3c/csswg-drafts#5431 would be fixed too and we'd figure out how to update images/baselines.png (I've asked Ian if there's an original somewhere).
@annevk I think you should be able to use the |
What is ex-middle? I don't see it in https://drafts.csswg.org/css-inline/#baseline-types. And are we sure the middle of em-over and em-under is equal to the middle of ideographic-under and ideographic-over? If so, that's probably worth noting in the specification, but it seems unlikely that would be the case? |
@annevk sorry, “x-middle”. You're right, it could differ in the case where the ideographic baselines are not defined by the font and the ascent + descent != 1em, we don't currently define how to find the central baseline in that case. In that case I'd say you should just define it as halfway between em-over and em-under, assuming that's the relationship you want to encode there. |
Yeah, though it seems a bit weird that we would sometimes give that an explicit baseline definition (e.g., as for central) and sometimes not. |
@annevk Yeah, but it's a simple relationship between two existing terms (whereas defining what each of these terms are is not). I'll note CSS doesn't use these at all so defining any of them here is a bit weird to begin with :) |
See w3c/csswg-drafts#5312. And also #5429 for where all of this started. Ideally though w3c/csswg-drafts#5431 would be fixed too and we'd figure out how to update images/baselines.png (I've asked Ian if there's an original somewhere).
See w3c/csswg-drafts#5312. And also #5429 for where all of this started. Ideally though w3c/csswg-drafts#5431 would be fixed too and we'd figure out how to update images/baselines.png (I've asked Ian if there's an original somewhere).
We ended up defining this as:
|
It's described as "The middle of the em square".
This is a follow-up to #5312 that only looked at the
measureText()
API which doesn't expose this.cc @yiyix @kojiishi @macnmm @litherum
The text was updated successfully, but these errors were encountered: