Skip to content

Conversation

litherum
Copy link
Contributor

@litherum litherum commented Jul 13, 2022

457dbbe

[GPUP] Chinese text in language selector in Google News is invisible
https://bugs.webkit.org/show_bug.cgi?id=242674
<rdar://problem/96903146>

Reviewed by Cameron McCormack.

When falling off the end of the font-family list, the browser needs to pick some font which
can render the requested character. Font selection routines accept a "hint" font, which it
tries to match as stylistically closely as possible. The hint font itself may actually be
selected - if it is, we have to make sure the fallback font takes the CreationData from the
hint font. However, if the hint font is not selected, then the fallback font will be
guaranteed to be an installed font, which means that no CreationData should be specified.
252096@main had some of this logic, but not all of it.

* LayoutTests/fast/text/fallback-not-supported-expected-mismatch.html: Added.
* LayoutTests/fast/text/fallback-not-supported.html: Added.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::systemFallbackForCharacters):

Canonical link: https://commits.webkit.org/252407@main

@litherum litherum self-assigned this Jul 13, 2022
@litherum litherum added Text For bugs in text layout and rendering, including international text support. WebKit Nightly Build labels Jul 13, 2022
@litherum litherum requested review from alanbaradlay, heycam and smfr July 13, 2022 05:13
Comment on lines +1569 to +1570
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we assert in here that if platformData is not substituteFont, then it's an installed font?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hrmmm I don't see a way to do that 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll land as-is and in parallel discuss with the Core Text team.

@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label Jul 13, 2022
@litherum litherum added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Jul 13, 2022
https://bugs.webkit.org/show_bug.cgi?id=242674
<rdar://problem/96903146>

Reviewed by Cameron McCormack.

When falling off the end of the font-family list, the browser needs to pick some font which
can render the requested character. Font selection routines accept a "hint" font, which it
tries to match as stylistically closely as possible. The hint font itself may actually be
selected - if it is, we have to make sure the fallback font takes the CreationData from the
hint font. However, if the hint font is not selected, then the fallback font will be
guaranteed to be an installed font, which means that no CreationData should be specified.
252096@main had some of this logic, but not all of it.

* LayoutTests/fast/text/fallback-not-supported-expected-mismatch.html: Added.
* LayoutTests/fast/text/fallback-not-supported.html: Added.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::systemFallbackForCharacters):

Canonical link: https://commits.webkit.org/252407@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/GPUP-Chinese-text-in-language-selector-in-Google-News-is-invisible branch from 26b14c3 to 457dbbe Compare July 13, 2022 06:23
@webkit-early-warning-system webkit-early-warning-system merged commit 457dbbe into WebKit:main Jul 13, 2022
@webkit-commit-queue
Copy link
Collaborator

Committed 252407@main (457dbbe): https://commits.webkit.org/252407@main

Reviewed commits have been landed. Closing PR #2355 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 13, 2022
@litherum litherum deleted the eng/GPUP-Chinese-text-in-language-selector-in-Google-News-is-invisible branch July 13, 2022 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Text For bugs in text layout and rendering, including international text support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants