[Webkit-unassigned] [Bug 264115] New: An incorrect fallback font for Ahem returns where unicode-range is set.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 2 15:08:11 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=264115

            Bug ID: 264115
           Summary: An incorrect fallback font for Ahem returns where
                    unicode-range is set.
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Text
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: changseok at webkit.org
                CC: mmaxfield at apple.com

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231102/697684c6/attachment-0001.htm>


More information about the webkit-unassigned mailing list