Repository navigation
fonts: Remove the per-FontGroup cached fallback font - #35705
Merged
Merged
Conversation
mrobinson
force-pushed
the
fix-font-fallback-caching
branch
from
February 27, 2025 16:40
ec75736 to
5ed2358
Compare
|
🔨 Triggering try run (#13578189831) for Linux (WPT) |
|
🔨 Triggering try run (#13578266415) for Linux (WPT) |
Contributor
|
I'm not convinced this will fix #35697, it seems a different problem. |
|
🔨 Triggering try run (#13583212315) for Linux (WPT) |
|
Test results for linux-wpt-layout-2020 from try job (#13583212315): Flaky unexpected result (23)
Stable unexpected results that are known to be intermittent (13)
Stable unexpected results (5)
|
|
|
Member
Author
Okay. I've removed that link. We can watch this to see if it's still flaky later. |
mrobinson
force-pushed
the
fix-font-fallback-caching
branch
from
February 28, 2025 11:26
5ed2358 to
882356a
Compare
mrobinson
enabled auto-merge
February 28, 2025 11:26
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Feb 28, 2025
Instead of keeping a per-FontGroup cache of the previously used fallback font, cache this value in the caller of `FontGroup::find_by_codepoint`. The problem with caching this value in the `FontGroup` is that it can make one layout different from the next. Still, it is important to cache the value somewhere so that, for instance, Chinese character don't have to continuously walk through the entire fallback list when laying out. The heuristic here is to try to last used font first if the `Script`s match. At the very least this should make one layout consistent with the next. Fixes servo#35704. Fixes servo#35697. Fixes servo#35689. Fixes servo#35679. Signed-off-by: Martin Robinson <[email protected]>
mrobinson
force-pushed
the
fix-font-fallback-caching
branch
from
February 28, 2025 12:58
882356a to
1a5a5e0
Compare
|
🔨 Triggering try run (#13588634610) for Linux (WPT) |
|
Test results for linux-wpt-layout-2020 from try job (#13588634610): Flaky unexpected result (21)
Stable unexpected results that are known to be intermittent (15)
|
|
✨ Try run (#13588634610) succeeded. |
mrobinson
enabled auto-merge
February 28, 2025 13:26
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Feb 28, 2025
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of keeping a per-FontGroup cache of the previously used fallback
font, cache this value in the caller of
FontGroup::find_by_codepoint.The problem with caching this value in the
FontGroupis that it canmake one layout different from the next.
Still, it is important to cache the value somewhere so that, for
instance, Chinese character don't have to continuously walk through the
entire fallback list when laying out. The heuristic here is to try to
last used font first if the
Scripts match. At the very least thisshould make one layout consistent with the next.
Fixes #35704.
Fixes #35689.
Fixes #35679.
Signed-off-by: Martin Robinson [email protected]
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors