RESOLVED FIXED304530
outlook.com: Microsoft OWA: ETS:Font Mingliu renders malpositioned numbers in Safari
https://bugs.webkit.org/show_bug.cgi?id=304530
Summary outlook.com: Microsoft OWA: ETS:Font Mingliu renders malpositioned numbers in...
Vitor Roriz
Reported 2025-12-19 16:42:02 PST
So, the issue here is when author specify a generic font-family that is resolved to times (like serif) and specify a lang attribute. When lang attribute is present we call FontDescription::platformResolveGenericFamily for resolving the font-family name with the locale. For serif, this will result in SystemFontDatabaseCoreText::serifFamily(const String& locale) -> genericFamily() -> CreateDescriptorForCSSFamily(kCTFontCSSFamilySerif, "en-US”) CreateDescriptorForCSSFamily(kCTFontCSSFamilySerif, "en-US") returns '.Times Fallback’ which, from what I understand, is considered as a UI font per core text. We can’t use that name for creating a font otherwise we get this error from CoreText: CoreText note: Client requested name ".Times Fallback", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:]. However, our intent here wasn’t to request a UI font, we want serif (kCTFontCSSFamilySerif) and not serif-ui (kCTFontCSSFamilySerifUI). I wonder if this is a bug on CoreText or intentional, but anyway we can fix that on our side. Just to be precise, CreateDescriptorForCSSFamily doesn’t return '.Times Fallback’ directly, but a descriptor which has this kCTFontFamilyNameAttribute attribute.
Attachments
Vitor Roriz
Comment 1 2025-12-19 16:42:08 PST
Vitor Roriz
Comment 2 2025-12-19 16:48:14 PST
EWS
Comment 3 2025-12-19 22:36:08 PST
Committed 304809@main (1ecb160d72f7): <https://commits.webkit.org/304809@main> Reviewed commits have been landed. Closing PR #55739 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.