| Summary: | An incorrect fallback font for Ahem returns where unicode-range is set. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | ChangSeok Oh <changseok> | ||||||
| Component: | Text | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Normal | CC: | fantasai.bugs, mmaxfield, ntim, vitor.roriz, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=264120 | ||||||||
| Attachments: |
|
||||||||
Created attachment 469561 [details]
test case
Created attachment 469562 [details]
test case
The WPT link no longer shows the problem, as the test got changed to work around it. Attaching the original test. |
While I was investigating the failure of size-adjust-unicode-range-system-fallback.html [1], I found Mac port behaved unexpectedly to unicode-range. Please try the following HTML snippet. ``` <style> @font-face { font-family: large-font; src: local(Ahem), url(/fonts/Ahem.ttf); size-adjust: 1000%; unicode-range: U+0020; } .test { font-family: large-font; } </style> <span class="test">X</span> ``` The expected result is a small `X`, but Mac port shows a large square from Ahem. Aside from the different sizes, unicode-range is set with U+0020 (i.e., space) so Ahem should be limited to only spaces. When I tracked down this issue, I encountered that CTFontCreateForCharactersWithLanguageAndOption returned Ahem as a fallback for Ahem in lookupFallbackFont() at FontCacheCoreText.cpp. However, further investigation was not possible since I could not see the definition of CTFontCreateForCharactersWithLanguageAndOption. Maybe, Apple folks want to look into this issue. FYI, GTK/WPE ports work fine. [1] https://wpt.fyi/results/css/css-fonts/size-adjust-unicode-range-system-fallback.html?label=experimental&label=master&aligned