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 <yoavwe...@chromium.org> wrote:



    On Fri, Aug 18, 2023 at 8:25 PM Yi Xu <yi...@chromium.org> wrote:


                Contact emails

        yi...@chromium.org, aaro...@chromium.org, fs...@chromium.org


                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
        <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 byweb-platform-tests
        
<https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
        Link to test suite results fromwpt.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
        
<https://wpt.fyi/results/html/canvas/element/text/2d.text.measure.baselines.html?label=experimental&label=master&aligned>


        Entry on thefeature dashboard <http://www.chromestatus.com/>

        https://chromestatus.com/feature/6516079022571520
        <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 blink-dev+unsubscr...@chromium.org.
        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 blink-dev+unsubscr...@chromium.org. 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 blink-dev+unsubscr...@chromium.org.
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.

Reply via email to