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

[api-minor] Simplify the TextLayer.#getAscent fallback (PR 12896 follow-up) #19399

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jan 31, 2025

At the time of PR #12896 the fontBoundingBox{Ascent, Descent} properties were not yet available by default in Fírefox, however that's no longer the case since Firefox 116; please see https://bugzilla.mozilla.org/show_bug.cgi?id=1801198.

Hence this patch which replaces the "full" fallback with a warning and uses the ascent/descent values from the fonts in the PDF document (as we did previously). Obviously the TextLayer won't look as good in that case, but it's a simpler and shorter solution.

@Snuffleupagus
Copy link
Collaborator Author

/botio browsertest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/21abf56c49c8210/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/7427d98c47c400b/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/21abf56c49c8210/output.txt

Total script time: 16.99 mins

  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/7427d98c47c400b/output.txt

Total script time: 30.19 mins

  • Regression tests: Passed

@Snuffleupagus Snuffleupagus changed the title Simplify the TextLayer.#getAscent fallback (PR 12896 follow-up) [api-minor] Simplify the TextLayer.#getAscent fallback (PR 12896 follow-up) Feb 1, 2025
…llow-up)

At the time of PR 12896 the `fontBoundingBox{Ascent, Descent}` properties were not yet available by default in Fírefox, however that's no longer the case since Firefox 116; please see https://bugzilla.mozilla.org/show_bug.cgi?id=1801198.

Hence this patch which replaces the "full" fallback with a warning and uses the `ascent`/`descent` values from the fonts in the PDF document (as we did previously). Obviously the TextLayer won't look as good in that case, but it's a simpler and shorter solution.
@Snuffleupagus Snuffleupagus force-pushed the TextLayer-#getAscent-simplify branch from d8eaead to c8be02f Compare February 1, 2025 09:12
@Snuffleupagus Snuffleupagus added the release-blocker Blocker for the upcoming release label Feb 4, 2025
@Snuffleupagus
Copy link
Collaborator Author

@calixteman Gentle ping, any opinions about this?

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@Snuffleupagus Snuffleupagus merged commit 72339dc into mozilla:master Feb 7, 2025
9 checks passed
@Snuffleupagus Snuffleupagus deleted the TextLayer-#getAscent-simplify branch February 7, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker Blocker for the upcoming release text-selection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants