Contact [email protected], [email protected], [email protected] Explainer https://learn.microsoft.com/en-us/typography/opentype/spec/baselinetags
Specificationhttps://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* . The original feature bug (https://crbug.com/277215) has strong user support (23 stars). Blink componentBlink>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.
