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

--- Comment #11 from Maxim Iorsh <io...@users.sourceforge.net> ---
(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.

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

Reply via email to