Bug 270005 - [REGRESSION] Letter spacing is too large for some cursive text
Summary: [REGRESSION] Letter spacing is too large for some cursive text
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-02-23 13:04 PST by Brad Andalman
Modified: 2024-02-24 11:29 PST (History)
6 users (show)

See Also:


Attachments
HTML that shows too-large spacing between these Cyrillic characters (521 bytes, text/html)
2024-02-23 13:04 PST, Brad Andalman
no flags Details
Screenshots of the HTML in two Safari versions (and Chrome) (59.84 KB, image/png)
2024-02-23 13:08 PST, Brad Andalman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Andalman 2024-02-23 13:04:36 PST
Created attachment 470031 [details]
HTML that shows too-large spacing between these Cyrillic characters

In the attached HTML, I’ve set a Cyrillic string to use the “cursive” font. On Safari 17.3, the spacing between each Cyrillic character (П) is way too large. It almost looks like there are spaces between those characters, even though there aren’t any in the HTML.

This is a change from Safari 17.2.1, where the spacing is more appropriate.

It feels like maybe the “cursive” font doesn’t have a glyph for this (and other) Cyrillic characters, and the size for the fallback glyph is somehow not correct?

I’ll attached renderings of this HTML in these two Safari versions so it’s easy to see the regression. And I’ll attach a rendering in Chrome, too, just in case.
Comment 1 Brad Andalman 2024-02-23 13:08:48 PST
Created attachment 470032 [details]
Screenshots of the HTML in two Safari versions (and Chrome)
Comment 2 zalan 2024-02-23 13:15:43 PST
strangely I am unable to reproduce this on trunk (need to check the branch point for Safari 17.3 to see if I can repro it there)
Comment 3 Brad Andalman 2024-02-23 13:17:00 PST
I repro’d in Safari Technology Preview, but I didn’t try in trunk (sorry!)
Comment 4 zalan 2024-02-23 13:19:41 PST
(In reply to Brad Andalman from comment #3)
> I repro’d in Safari Technology Preview, but I didn’t try in trunk (sorry!)
Good to know, thanks! This may very well be something below WebKit then. Let me check.
Comment 5 zalan 2024-02-23 14:08:15 PST
I am not seeing it on a freshly installed Sonoma 14.3.1 either.
Comment 6 Brad Andalman 2024-02-23 14:27:28 PST
I just updated to Sonoma 14.3.1, and I still see the issue.
Comment 7 zalan 2024-02-23 14:39:11 PST
hmm, weird. Either way, I think it is more about fonts than inline layout. @Vitor, could you try to repro and/or figure out why Brad is seeing this, please?
Comment 8 Radar WebKit Bug Importer 2024-02-23 14:40:40 PST
<rdar://problem/123529842>
Comment 9 Vitor Roriz 2024-02-23 14:58:45 PST
Hi Brad, thank you for reporting this.

I also couldn't reproduce it on trunk on Sonoma 14.4. I'll have to investigate if there was a related regression on in a framework below WebKit.
Comment 10 Brad Andalman 2024-02-23 15:01:36 PST
I’ve tested on my main (non-VM) partition, initially running 14.3 and now 14.3.1. And this bug manifests.

However, I cannot reproduce it on VMs running 13.6, 14.2.1, 14.3, 14.4b4. (This is why I assumed it was a regression. I first tested on my Ventura partition, and didn’t see the bug there.)

So, what could be different about my main partition vs a clean install? Is the font used for fallback glyphs somehow different on one of my machines?
Comment 11 Vitor Roriz 2024-02-23 15:15:07 PST
@Brad, if that is ok for you, could you inform what preferred language you were using when you have reproduced this bug? Thanks.
Comment 12 Brad Andalman 2024-02-23 15:20:04 PST
My preferred language on my Mac is English (but the HTML has its language set to Russian). The preferred language is the same on my Mac, as well as on all of my VMs.
Comment 13 Vitor Roriz 2024-02-23 15:30:57 PST
Just for transparency, the reason I'm asking is because preferred language can affect font cascade on one of the frameworks we use for shaping. The whole list might affect it and not only the primary one, so if you could disclose the list you are using when reproducing the bug, this would be helpful. Are the lists different by any chances on the different partitions/VMs? Thanks!
Comment 14 Brad Andalman 2024-02-23 15:41:51 PST
Here’s the list of Preferred Languages on my (real) Mac:
English — Primary
Spanish (US)
French
English (US)
English (UK)
German
Japanese
Hebrew
Italian
Portuguese (Brazil)
Dutch
Russian
Chinese, Simplified
Korean
Turkish
Thai

On the first VM I checked it’s just: English (US) - Primary. I set them all up the same, so I assume all my VMs have just that one Preferred Language.
Comment 15 Brad Andalman 2024-02-23 15:49:01 PST
Well, it does appear to be due to the Preferred Language list! If I delete Japanese from the list, the letter spacing appears as expected.
Comment 16 Vitor Roriz 2024-02-23 15:54:16 PST
Aha, nice. Thank you for your help. I'll forward this internally to other colleagues responsive for the relevant framework.
Comment 17 zalan 2024-02-23 16:25:48 PST
Brad, do you mind filing a report through https://developer.apple.com/bug-reporting/? (and attach the "Feedback Assistant ID" here so that I can connect some rdars) Thank you.
Comment 18 Brad Andalman 2024-02-24 10:47:37 PST
No problem. Filed as FB13651054.
Comment 19 zalan 2024-02-24 11:28:31 PST
(In reply to Brad Andalman from comment #18)
> No problem. Filed as FB13651054.
Awesome, thank you.
Comment 20 zalan 2024-02-24 11:29:41 PST
(not sure if Moved is the right reason, but can't find anything better)