https://bugs.documentfoundation.org/show_bug.cgi?id=174329
--- Comment #9 from gio.bertelli <[email protected]> --- I think this is a regression from the commit that registers ".AppleSystemUIFont" in SystemFontList::Init() (tdf#91400, tdf#173342). That font is now the default UI font (UI_SANS). In 26.8 it was not in the font list, so the UI used a regular font. My understanding of what happens now (not confirmed by a debug run yet): 1. ".AppleSystemUIFont" has no CJK glyphs, so CoreTextGlyphFallbackSubstititution calls CTFontCreateForString() and gets PingFang SC as the fallback. 2. On macOS 15 the PingFang fonts have an 'hvgl' table and no 'glyf' table, and fontEnumCallBack() deliberately skips them (tdf#163000). 3. The fallback family name is therefore not in our font list, and the text ends up in the Last Resort glyphs (the black blocks in the screenshots). It should affect any text whose CoreText fallback is a skipped font, not only the UI. To confirm, please start the build from a terminal with SAL_LOG="+INFO.vcl.fonts" and check which fallback font is requested for the Chinese text. I attached a proposed patch (not tested on macOS, I don't have a Mac available). It extracts the hvgl check into IsHvglOnlyFont() and, in FindFontSubstitute(), skips a fallback that is hidden, Last Resort or hvgl-only, and takes the first usable font from CTFontCopyDefaultCascadeListForLanguages() that has the character. enhua_2008, since you build from source, could you try it? My understanding of what happens now (not confirmed by a debug run yet): 1. ".AppleSystemUIFont" has no CJK glyphs, so CoreTextGlyphFallbackSubstititution calls CTFontCreateForString() and gets PingFang SC as the fallback. 2. On macOS 15 the PingFang fonts have an 'hvgl' table and no 'glyf' table, and fontEnumCallBack() deliberately skips them (tdf#163000). 3. The fallback family name is therefore not in our font list, and the text ends up in the Last Resort glyphs (the black blocks in the screenshots). It should affect any text whose CoreText fallback is a skipped font, not only the UI. To confirm, please start the build from a terminal with SAL_LOG="+INFO.vcl.fonts" and check which fallback font is requested for the Chinese text. I attached a proposed patch (not tested on macOS, I don't have a Mac available). It extracts the hvgl check into IsHvglOnlyFont() and, in FindFontSubstitute(), skips a fallback that is hidden, Last Resort or hvgl-only, and takes the first usable font from CTFontCopyDefaultCascadeListForLanguages() that has the character. enhua_2008, since you build from source, could you try it? -- You are receiving this mail because: You are the assignee for the bug.
