Skip to content

Conversation

@james-atticus
Copy link
Contributor

@james-atticus james-atticus commented Sep 2, 2025

Extends on #14064, which was added to fix #13845.

While the initial implementation worked for some font names, getSerifFonts uses the mapped names, eg Times. If you have a font name such as AAAAAC+TimesNewRomanPSMT (as used in the added test) or TimesNewRomanPS-BoldMT (observed in other files), then the fallback serif logic wouldn't work. This PR changes the logic to be more similar to fallbackToSystemFont which maps the passed-in font name through getStdFontMap/getNonStdFontMap.

Before:

image

After:

image

@james-atticus james-atticus force-pushed the improve-serif-fallback-font-name-matching branch from fe25257 to 44acabb Compare September 2, 2025 03:25
@james-atticus james-atticus force-pushed the improve-serif-fallback-font-name-matching branch from 44acabb to 040fec1 Compare September 4, 2025 23:14
@calixteman
Copy link
Contributor

@james-atticus the linter isn't happy: you can run it locally with npx gulp lint (you can add --fix to fix whatever is fixable).

@james-atticus james-atticus force-pushed the improve-serif-fallback-font-name-matching branch from 040fec1 to fe30d08 Compare September 9, 2025 22:57
@calixteman
Copy link
Contributor

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/936b4c79caca1b1/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/9f860d71cc358d0/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/936b4c79caca1b1/output.txt

Total script time: 37.22 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 3

Image differences available at: http://54.241.84.105:8877/936b4c79caca1b1/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/9f860d71cc358d0/output.txt

Total script time: 75.52 mins

  • Unit tests: FAILED
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 3

Image differences available at: http://54.193.163.58:8877/9f860d71cc358d0/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij removed their request for review September 11, 2025 19:17
@james-atticus james-atticus force-pushed the improve-serif-fallback-font-name-matching branch from fe30d08 to ae8f8e4 Compare September 18, 2025 04:15
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.

@calixteman calixteman merged commit 3234912 into mozilla:master Oct 1, 2025
9 checks passed
@calixteman
Copy link
Contributor

/botio makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/f53846c4ac2c411/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/3580a0f17575509/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/f53846c4ac2c411/output.txt

Total script time: 4.05 mins

  • Make references: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/3580a0f17575509/output.txt

Total script time: 4.80 mins

  • Make references: FAILED

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.

Some letters in textLayer aren't properly aligned with the rendered text

4 participants