Hi Ashley, Thank you for reviewing! I am trying to launch hanging, alphabetic and ideographic baselines and the issues that you pointed out are related to the "top" baseline. I can look into the top baseline definition afterwards.
Yi Xu On Tue, Aug 22, 2023 at 5:59 AM Ashley Gullen <[email protected]> wrote: > There is still this open issue about inconsistent TextMetrics measurements > across browsers: > https://bugs.chromium.org/p/chromium/issues/detail?id=1183752 > I think it may involve this unresolved spec issue: > https://github.com/whatwg/html/issues/6731 > > This is causing us constant annoying compatibility problems across > browsers - we just can't draw or align text in a canvas consistently across > browsers and our customers keep complaining about it. Shouldn't these > issues be sorted out before adding even more text metrics? > > On Tue, 22 Aug 2023 at 00:14, 'TAMURA, Kent' via blink-dev < > [email protected]> wrote: > >> LGTM3. >> >> >> On Tue, Aug 22, 2023 at 5:11 AM Chris Harrelson <[email protected]> >> wrote: >> >>> LGTM2 >>> >>> On Mon, Aug 21, 2023 at 1:01 PM Mike Taylor <[email protected]> >>> wrote: >>> >>>> LGTM1 >>>> On 8/21/23 1:52 PM, Yi Xu wrote: >>>> >>>> Hi Yoav, >>>> >>>> In first attempt link >>>> <https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/intent$20to$20ship$20textmetrics%7Csort:date/blink-dev/KQW4thKogkk/SiE-xZ7OAQAJ>, >>>> we tried to ship all the attributes under TextMetrics API (in 2018). Some >>>> definitions were not clear so we was not able to do it. >>>> In second attempt >>>> <https://groups.google.com/a/chromium.org/g/blink-dev/c/dTL2nW5mhGc>, >>>> we shipped actualBoundingBoxLeft, actualBoundingBoxRight, >>>> fontBoundingBoxAscent, >>>> fontBoundingBoxDescent, actualBoundingBoxAscent, actualBoundingBoxDescent, >>>> emHeightAscent and emHeightDescent. >>>> In third attempt >>>> <https://groups.google.com/a/chromium.org/g/blink-dev/c/GSmWjdqmgCA/m/F8YRklTQCQAJ>, >>>> we shipped fontBoundingBoxAscent, fontBoundingBoxDescent >>>> In this attempt, we are trying to ship alphabeticBaseline, >>>> hangingBaseline and ideographicBaseline. Note that both Safari and firefox >>>> have shipped it, so we will like to catch up on this. >>>> >>>> Thank you, >>>> >>>> Yi Xu >>>> >>>> On Sun, Aug 20, 2023 at 10:40 PM Yoav Weiss <[email protected]> >>>> wrote: >>>> >>>>> >>>>> >>>>> On Fri, Aug 18, 2023 at 8:25 PM Yi Xu <[email protected]> wrote: >>>>> >>>>>> Contact emails [email protected], [email protected], >>>>>> [email protected] >>>>>> >>>>>> Explainer >>>>>> https://learn.microsoft.com/en-us/typography/opentype/spec/baselinetags >>>>>> >>>>>> Specification >>>>>> https://html.spec.whatwg.org/multipage/canvas.html#textmetrics >>>>>> we are launching the following attributes in TextMetrics: >>>>>> alphabeticBaseline, hangingBaseline and ideographicBaseline >>>>>> >>>>>> *Tag Review* >>>>>> https://github.com/w3ctag/design-reviews/issues/302 >>>>>> >>>>>> Summary >>>>>> >>>>>> This is the 4th installment in extending the TextMetrics API (first >>>>>> attempt link >>>>>> <https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/intent$20to$20ship$20textmetrics%7Csort:date/blink-dev/KQW4thKogkk/SiE-xZ7OAQAJ> >>>>>> , second attempt >>>>>> <https://groups.google.com/a/chromium.org/g/blink-dev/c/dTL2nW5mhGc> >>>>>> , third attempt) >>>>>> <https://groups.google.com/a/chromium.org/g/blink-dev/c/GSmWjdqmgCA/m/F8YRklTQCQAJ> >>>>>> .The current canvas TextMetrics API exposes the actualBoundingBox >>>>>> and the fontBoundingBox readings. The definition of baseline is more >>>>>> clear >>>>>> now. Both Firefox and Safari have already shipped this *extension to >>>>>> TextMetrics*. >>>>>> >>>>> >>>>> Thanks for pushing through this!! Any details on why the past attempts >>>>> weren't successful? >>>>> >>>>> >>>>>> >>>>>> The original feature bug (https://crbug.com/277215) has strong user >>>>>> support (23 stars). >>>>>> >>>>>> Blink component Blink>Canvas >>>>>> <https://bugs.chromium.org/p/chromium/issues/list?q=component%3ABlink%3ECanvas&can=2> >>>>>> >>>>>> Is this feature supported on all six Blink platforms (Windows, Mac, >>>>>> Linux, Chrome OS, Android, and Android WebView)? >>>>>> >>>>>> Yes >>>>>> >>>>>> >>>>>> Is this feature fully tested by web-platform-tests >>>>>> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>? >>>>>> Link to test suite results from wpt.fyi >>>>>> <https://wpt.fyi/results/?label=experimental>. >>>>>> >>>>>> >>>>>> https://wpt.fyi/results/html/canvas/element/text/2d.text.measure.baselines.html?label=experimental&label=master&aligned >>>>>> >>>>>> Entry on the feature dashboard <http://www.chromestatus.com/> >>>>>> >>>>>> https://chromestatus.com/feature/6516079022571520 >>>>>> >>>>>> >>>>>> Risks >>>>>> >>>>>> Interoperability and Compatibility >>>>>> >>>>>> Safari and Firefox have has already shipped these metrics in the spec. >>>>>> >>>>>> >>>>>> >>>>>> Firefox: <https://bugzilla.mozilla.org/show_bug.cgi?id=1102584> >>>>>> Shipped <https://bugzilla.mozilla.org/show_bug.cgi?id=1102584> >>>>>> >>>>>> Safari: Shipped <https://bugs.webkit.org/show_bug.cgi?id=157629> >>>>>> >>>>>> >>>>>> >>>>>> We know this is a feature requested by developers (as well as >>>>>> internal Google teams like Google Docs). This API will help developers >>>>>> have >>>>>> more control and more accurate text rendering. As of today a different >>>>>> way >>>>>> to achieve this is by using rendering text to the DOM and using >>>>>> getBoundingClientRect to get some measurements. This process requires a >>>>>> relayout of the page. >>>>>> >>>>>> >>>>>> >>>>>> Activation >>>>>> >>>>>> Enable the platform experiment ExtendedTextMetrics >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "blink-dev" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAC3hXJeKqXo9QKyreEM%2BqiNM0gi_us%3DWZ_-17AxpMg-bF%2BoLkA%40mail.gmail.com >>>>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAC3hXJeKqXo9QKyreEM%2BqiNM0gi_us%3DWZ_-17AxpMg-bF%2BoLkA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "blink-dev" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAC3hXJf_8acu24TWR47Cc9MLtaxYs2o3urOkwgfkm1QFAwN%2BeA%40mail.gmail.com >>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAC3hXJf_8acu24TWR47Cc9MLtaxYs2o3urOkwgfkm1QFAwN%2BeA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "blink-dev" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/67059d9a-6196-4783-9707-33b5be2de094%40chromium.org >>>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/67059d9a-6196-4783-9707-33b5be2de094%40chromium.org?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "blink-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw8iYj0O0Tsuikpav%3Dd4SxF0c6Lt97pEzR%3DWRdV1E242yQ%40mail.gmail.com >>> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw8iYj0O0Tsuikpav%3Dd4SxF0c6Lt97pEzR%3DWRdV1E242yQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> TAMURA, Kent >> Software Engineer, Google >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "blink-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGH7WqFyY0MrwH9SpAP05XyEBJVP8UA71yZfbk0SnbyNercizw%40mail.gmail.com >> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGH7WqFyY0MrwH9SpAP05XyEBJVP8UA71yZfbk0SnbyNercizw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAC3hXJf4g6ibLicuQ1GM0scimxY1QneWhEYQhVfDxrqp9Jk7Rw%40mail.gmail.com.
