Description: After mac OS Update, on LibreOffice Vanilla 6.2.6.2 and macOS Catalina, I noticed that font names in drop down list at the formatting toolbar are not localized. The Japanese font names were localized before macOS update(macOS Mojave) on LibreOffice Vanilla 6.2.6.2. バージョン: 6.2.6.2 Build ID: 684e730861356e74889dfe6dbddd3562aae2e6ad CPU threads: 4; OS:Mac OS X 10.15; UI render: default; VCL: osx; ロケール: ja-JP (zh_Hans.UTF-8); UIの言語: ja-JP Calc: threaded I reproduced this bug on LibreOffice master(6.4.0 alpha). Steps to Reproduce: 1.Start Writer. 2.Click Font Name dropdown list in Formatting Toolbar 3.There is "Hiragino Sans" Font in the font list Actual Results: "Hiragino Sans" font lists in the font list. Expected Results: "ヒラギノ角ゴシック" font lists in the font list. Reproducible: Always User Profile Reset: No Additional Info: The font list is created by / core / vcl / quartz / ctfonts.cxx. CTFontDescriptorCopyLocalizedAttribute function used in this file seems to have changed from macOS Catalina.
Created attachment 155161 [details] on macOS Mojave
Created attachment 155162 [details] on macOS Catalina
The patch on Gerrit can be found at : https://gerrit.libreoffice.org/#/c/81145/
I quote a comment from Gerrit : ----- start ----- Thank you for your advice, Julie Nabet. (snip) >My main point is, is this patch also right for MacOS before Catalina? Yes.I think so. After this patch is applied, LibreOffice always uses CTFontDescriptorCopyLocalizedAttribute function to get the font name. Therefore, the font name is always localized. - For example, Japanese fonts are in Japanese and Simplified Chinese fonts are displayed in English. It works the same as Apple Pages in Japanese language environment( it looks like ). - The behavior is the same, both before and after macOS Catalina. - I think that almost users were expecting this behavior. Now(before this patch is applied), I think there may be some cases like this. Please refer the following url: Code point /core/vcl/quartz/ctfonts.cxx https://opengrok.libreoffice.org/xref/core/vcl/quartz/ctfonts.cxx?r=60d4be99 Apple's CTFontDescriptorCopyLocalizedAttribute reference: https://developer.apple.com/documentation/coretext/1509510-ctfontdescriptorcopylocalizedatt?language=objc (Case 1-1) Japanese language environment before Catalina Font names in LibreOffice are localized(OK) CTFontDescriptorCopyLocalizedAttribute function's third parameter returns: -> ja(Japanese fonts) or en(Non Japanese fonts) LibreOffice's Application::GetSettings().GetUILanguageTag().getLanguage() returns: -> ja (Case 1-2) Japanese language environment in(after) Catalina Font names in LibreOffice are *not* localized(NG) CTFontDescriptorCopyLocalizedAttribute function's third parameter returns: -> ja-JP(Japanese fonts) or ja(some Chinese fonts,It is probably a OS's bug) or en(others) LibreOffice's Application::GetSettings().GetUILanguageTag().getLanguage() returns: -> ja (Case 2-1) Simplified Chinese language environment before Catalina Font names in LibreOffice are *not* localized(NG). CTFontDescriptorCopyLocalizedAttribute function's third parameter returns: -> zh-CN(Chinese fonts) or ja(some Chinese fonts) or en LibreOffice's Application::GetSettings().GetUILanguageTag().getLanguage() returns: -> zh-Hans (Case 2-2) Simplified chinese language environment in(after) Catalina Font names in LibreOffice are localized(OK). CTFontDescriptorCopyLocalizedAttribute function's third parameter returns: -> zh-Hans(Chinese fonts) or ja-JP(Japanese fonts) or en LibreOffice's Application::GetSettings().GetUILanguageTag().getLanguage() returns: -> zh-Hans (Case 3) others Font names in LibreOffice are *not* localized both before and after Catalina. But font names are displayed in English as it is desired by the user,so no problem. Sorry for my long reply. ----- e n d -----
(In reply to Tomofumi Yagi from comment #0) The locale was wrong. The following version is correct. バージョン: 6.2.6.2 Build ID: 684e730861356e74889dfe6dbddd3562aae2e6ad CPU threads: 4; OS:Mac OS X 10.15; UI render: default; VCL: osx; ロケール: ja-JP (ja_JP.UTF-8); UIの言語: ja-JP Calc: threaded > バージョン: 6.2.6.2 > Build ID: 684e730861356e74889dfe6dbddd3562aae2e6ad > CPU threads: 4; OS:Mac OS X 10.15; UI render: default; VCL: osx; > ロケール: ja-JP (zh_Hans.UTF-8); UIの言語: ja-JP > Calc: threaded
Created attachment 155221 [details] a screenshot on macOS Catalina
Created attachment 155222 [details] LocalizedFontnameTestPatchedMaster.fodt
Created attachment 155223 [details] LocalizedFontnameTestLibO6.2.6.fodt
I quote a comment from Gerrit : ----- start ----- Thank you for your review, Khaled Hosny. >What happens if a document that uses a localized font name is open in a system that uses the English (or other language) font name? The document is displayed in a different font, because font fallback occurs. I uploaded screenshots to Bugzilla, so please refer. https://bugs.documentfoundation.org/show_bug.cgi?id=128276 >Is the localized name stored in the document? Yes. I uploaded Writer documents(flat odf) to Bugzilla, so please refer. https://bugs.documentfoundation.org/show_bug.cgi?id=128276 ----- e n d -----
(In reply to Tomofumi Yagi from comment #3) > The patch on Gerrit can be found at : > > https://gerrit.libreoffice.org/#/c/81145/ Moving to ASSIGNED
Created attachment 155253 [details] a screenshot on macOS Catalina take2 Fix font aliases on macOS Catalina. I added an entry because It doesn't working with a Hiragino Sans font-Alias.
I don't think this is a regression...
(In reply to Xisco Faulí from comment #12) > I don't think this is a regression... Thank you for your investigation. This bug is a regression of an old bug in LibreOffice version 4. Is it better not to tag the regression bug?
Created attachment 155671 [details] Font list from my Mac in macOS Catalina(Japanese environment) I got a font list from my MacBook in macOS Catalina(Japanese environment).
Created attachment 156068 [details] Font list from my Mac in macOS Catalina and Mojave(Japanese environment)
Tomofumi Yagi committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c663d0bcc93b278f50c8f6802928a7a6154207f2 tdf#128276 Font names are not localized on macOS Catalina It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
A polite ping to Tomofumi Yagi: Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing? Thanks
(In reply to Xisco Faulí from comment #17) > A polite ping to Tomofumi Yagi: > Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? > Otherwise, Could you please explain what's missing? > Thanks Sorry. I forgot to close this bug. Thanks.