[Libreoffice-bugs] [Bug 128276] Font names are not localized (Mac OS X) on macOS Catalina

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Oct 20 15:34:35 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=128276

--- Comment #4 from Tomofumi Yagi <yagit at mknada.sakura.ne.jp> ---
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 -----

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191020/290e9f2a/attachment.html>


More information about the Libreoffice-bugs mailing list