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

--- Comment #12 from خالد حسني <kha...@aliftype.com> ---
(In reply to Maxim Iorsh from comment #11)
> (In reply to خالد حسني from comment #8)
> > It seems that displaying localized font names is tied to the locale being
> > used and not the UI language. I find this questionable choice, but IIRC
> > Windows does this as well, so may be there is a good rational for this or
> > may be users of certain locale expect it?
> > 
> > I think this is a FontConfig issue, though:
> > 
> > $ fc-match "Miriam CLM"
> > MiriamCLM-Book.ttf: "Miriam CLM" "Book"
> > 
> > $ LC_ALL=he_IL LANG=en_US fc-match "Miriam CLM"
> > MiriamCLM-Book.ttf: "מרים" "קל"
> > 
> > $ LC_ALL=en_US LANG=he_IL fc-match "Miriam CLM"
> > MiriamCLM-Book.ttf: "Miriam CLM" "Book"
> > 
> > FontConfig seems to be returning the localized name depending on the locale
> > not the language.
> 
> The behavior of fontconfig is correct, because LC_ALL overrides LANG. The
> issue seems to be that UI language is not necessarily reflected in any
> environment variable, Libreoffice even allows to set it explicitly in
> settings.
> 
> Maybe the correct solution is to call fontconfig with custom environment
> which depends on use case. I'd suggest the following:
> 
> For UI: Set LC_ALL=<UI locale>; call fontconfig
> For file save: Set LC_ALL=C; call fontconfig
> 
> In this way each user will see font name tailored to their UI, but the font
> name used inside file read/write will be stable across all systems.

Sorry, that was red-herring indeed.

The issue is in LibreOffice code, in particular this code that uses process
locale instead of the UI language:

https://git.libreoffice.org/core/+/refs/heads/master/vcl/unx/generic/fontmanager/fontconfig.cxx#445

The best person to comment about this code is Caolán McNamara, but this code
have been like this since ~forever.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to