https://trello.com/c/N0hJJV95/129-2d-canvas-api-fx-74
@Elchi3 not saying you necessarily have to do this one; but I'd like help in giving it a proper estimate. Thanks!
Updated/created docs:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/74#Canvas_and_WebGL
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxAscent
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxDescent
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxLeft
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxRight
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/alphabeticBaseline
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/emHeightAscent
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/emHeightDescent
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/fontBoundingBoxAscent
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/fontBoundingBoxDescent
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/hangingBaseline
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/ideographicBaseline
review? @chrisdavidmills
@Elchi3 awesome work here, nice one!
I only had a few comments here:
actualBoundingBoxLeft|Right — "Is a double giving the distance parallel to the baseline from the alignment point given by...". Umm, what does that mean? It'd be nice to try to clarify this text a bit.Thanks @chrisdavidmills!
Do you think we can embed this diagram for clarity? https://html.spec.whatwg.org/images/baselines.png
Yes, that would work for me, along with a little bit of context.
These are all properties. Per stumptown content types, properties have no syntax box, because (unlike methods) there is no signature to show. Do you disagree with this?
Ah, so that's what we've agreed going forward for stumptown? I guess it works for me, as long as the value type is explained in the summary of the page, which it usually is.
Do you think we can embed this diagram for clarity? https://html.spec.whatwg.org/images/baselines.png
Yes, that would work for me, along with a little bit of context.
So, I've given this another try and added a live sample, see https://wiki.developer.mozilla.org/en-US/docs/Web/API/TextMetrics#Examples, with the goal of illustrating this like done in the spec diagram. Of course it only fully works in browsers that support the TextMetrics API or have the respective flags enabled.
Ah, so that's what we've agreed going forward for stumptown? I guess it works for me, as long as the value type is explained in the summary of the page, which it usually is.
Yup. I think it is a good change. I never fully saw the point of syntax boxes for properties.
@Elchi3 live example looks good; illustrates nicely what the lines referenced in the property values mean. It's a shame so few of them are supported right now ;-)
Particularly difficult was this bit, in actualBoundingBoxLeft|Right — "Is a double giving the distance parallel to the baseline from the alignment point given by...". Umm, what does that mean? It'd be nice to try to clarify this text a bit.
So, I now get why these two properties exist and I have added example that shows the usefulness of these two: https://wiki.developer.mozilla.org/en-US/docs/Web/API/TextMetrics#Measuring_text_width
I struggle with finding a better description for this though as I don't want to risk writing something wrong there. (I think the current descriptions are close to the spec, so they are very precise). Do you have a suggestion? Or should we leave this as is for now?
So, I now get why these two properties exist and I have added example that shows the usefulness of these two: https://wiki.developer.mozilla.org/en-US/docs/Web/API/TextMetrics#Measuring_text_width
Cool, this is really useful, thanks! I've added a bit to the example's description to say clearly why this is useful; does it look OK to you?
I struggle with finding a better description for this though as I don't want to risk writing something wrong there. (I think the current descriptions are close to the spec, so they are very precise). Do you have a suggestion? Or should we leave this as is for now?
I have had a go at rewriting the sentence slightly so that it makes more sense. The information is the same, but I've just broken it out into a couple of sentences so that it isn't as hard to parse. WDYT?
Thank Chris, I think both looks good now! :)
Lets call this done :tada:
Most helpful comment
Thank Chris, I think both looks good now! :)
Lets call this done :tada: