Skip to content
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

Implement getActualBoundingBox feature for TextMetrics #46355

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

This change creates a new API method for TextMetrics objects in canvas
that uses font data and precalculated text runs, to calculate the
bounding box for an interval of characters. This interval is defined
by character positions in the input text.

The method returns a single rectangle, the actual bounding box of the
substring of the input text defined by the input indexes.

The new API was enabled under the ExtendedTextMetrics flag.

Bug: 341213359
Change-Id: I289a52283d0bd5a0001c5ec7a514cf16abba9611
Reviewed-on: https://chromium-review.googlesource.com/5546024
WPT-Export-Revision: bab6a7940196e2cf6cce680eccefeeb2ca1e762b

This change creates a new API method for TextMetrics objects in canvas
that uses font data and precalculated text runs, to calculate the
bounding box for an interval of characters. This interval is defined
by character positions in the input text.

The method returns a single rectangle, the actual bounding box of the
substring of the input text defined by the input indexes.

The new API was enabled under the `ExtendedTextMetrics` flag.

Bug: 341213359
Change-Id: I289a52283d0bd5a0001c5ec7a514cf16abba9611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants