Bug 2075816

Summary: flatpak's fontconfig language order should obey host system's language setting
Product: [Fedora] Fedora Reporter: Junjie Yuan <yuan>
Component: flatpakAssignee: David King <amigadave>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 36CC: amigadave, debarshir, klember, mail
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-25 15:27:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Flathub Intellij IDEA Ultimate screenshot, contains Chinese (actually show Japanese) none

Description Junjie Yuan 2022-04-15 13:44:35 UTC
Created attachment 1872759 [details]
Flathub Intellij IDEA Ultimate screenshot, contains Chinese (actually show Japanese)

Description of problem:
Host system's language is Chinese Simplified (zh_cn), but flatpak gui apps show Japanese instead of Chinese.

Version-Release number of selected component (if applicable):
flatpak 1.12.7.
Flathub Intellij IDEA Ultimate 2022.1, flathub Google Chrome 100, and etc.

How reproducible:
Set host system's language to zh_cn, and then open flatpak gui apps.

Steps to Reproduce:
1. Set host system's language to zh_cn
2. open flatpak apps
3. see Chinese font

Actual results:
Show Japanese Chinese.

Expected results:
Show Chinese (Simplified).

Additional info:
East Asian languages such as Japanese and Korean are all developed from Chinese, so Google specially made CJK fonts (Chinese, Japanese, Korean) when making Noto fonts. If the configuration is wrong, the wrong font will be displayed.

Simplified Chinese -> SC
Traditional Chinese -> TC
Japanese -> JP
Korner -> KR

If configuration is wrong, these maybe order in alphabet.
JP -> KR -> SC -> TC

Comment 1 Junjie Yuan 2022-04-15 13:46:34 UTC
fc-list :lang=zh-cn in host:

```text
[junjie@xps ~]$ fc-list :lang=zh-cn
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Light.ttc: Noto Sans CJK SC,Noto Sans CJK SC Light:style=Light,Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Black.ttc: Noto Sans CJK SC,Noto Sans CJK SC Black:style=Black,Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Thin.ttc: Noto Sans CJK SC,Noto Sans CJK SC Thin:style=Thin,Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK SC:style=Bold
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK TC:style=Bold
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans CJK SC:style=Bold
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK JP:style=Bold
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK HK:style=Bold
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK KR:style=Bold
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans CJK SC:style=Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK SC:style=Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK TC:style=Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK HK:style=Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK KR:style=Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK JP:style=Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK SC,Noto Sans CJK SC Medium:style=Medium,Regular
/usr/share/fonts/google-noto-cjk/NotoSansCJK-DemiLight.ttc: Noto Sans CJK SC,Noto Sans CJK SC DemiLight:style=DemiLight,Regular
```

in flatpak container:

```text
[📦 com.jetbrains.IntelliJ-IDEA-Ultimate ~]$ fc-list :lang=zh-cn
/run/host/fonts/google-noto-cjk/NotoSansCJK-Black.ttc: Noto Sans CJK KR,Noto Sans CJK KR Black:style=Black,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Black.ttc: Noto Sans CJK TC,Noto Sans CJK TC Black:style=Black,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Light.ttc: Noto Sans CJK KR,Noto Sans CJK KR Light:style=Light,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans CJK JP:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans CJK HK:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans CJK KR:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK TC,Noto Sans CJK TC Medium:style=Medium,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans CJK TC:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Light.ttc: Noto Sans CJK HK,Noto Sans CJK HK Light:style=Light,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans CJK SC:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-DemiLight.ttc: Noto Sans CJK HK,Noto Sans CJK HK DemiLight:style=DemiLight,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Thin.ttc: Noto Sans CJK SC,Noto Sans CJK SC Thin:style=Thin,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Light.ttc: Noto Sans CJK JP,Noto Sans CJK JP Light:style=Light,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK KR,Noto Sans CJK KR Medium:style=Medium,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-DemiLight.ttc: Noto Sans CJK KR,Noto Sans CJK KR DemiLight:style=DemiLight,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-DemiLight.ttc: Noto Sans CJK SC,Noto Sans CJK SC DemiLight:style=DemiLight,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Black.ttc: Noto Sans CJK JP,Noto Sans CJK JP Black:style=Black,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK JP,Noto Sans CJK JP Medium:style=Medium,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK TC:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK SC:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK JP:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK KR:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK HK:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK TC:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans Mono CJK SC:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK HK:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK KR:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc: Noto Sans Mono CJK JP:style=Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans CJK TC:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Black.ttc: Noto Sans CJK SC,Noto Sans CJK SC Black:style=Black,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans CJK SC:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans CJK KR:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans CJK HK:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc: Noto Sans CJK JP:style=Bold
/run/host/fonts/google-noto-cjk/NotoSansCJK-Light.ttc: Noto Sans CJK SC,Noto Sans CJK SC Light:style=Light,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-DemiLight.ttc: Noto Sans CJK TC,Noto Sans CJK TC DemiLight:style=DemiLight,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Light.ttc: Noto Sans CJK TC,Noto Sans CJK TC Light:style=Light,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-DemiLight.ttc: Noto Sans CJK JP,Noto Sans CJK JP DemiLight:style=DemiLight,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Thin.ttc: Noto Sans CJK JP,Noto Sans CJK JP Thin:style=Thin,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK SC,Noto Sans CJK SC Medium:style=Medium,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Thin.ttc: Noto Sans CJK HK,Noto Sans CJK HK Thin:style=Thin,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Thin.ttc: Noto Sans CJK KR,Noto Sans CJK KR Thin:style=Thin,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Medium.ttc: Noto Sans CJK HK,Noto Sans CJK HK Medium:style=Medium,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Thin.ttc: Noto Sans CJK TC,Noto Sans CJK TC Thin:style=Thin,Regular
/run/host/fonts/google-noto-cjk/NotoSansCJK-Black.ttc: Noto Sans CJK HK,Noto Sans CJK HK Black:style=Black,Regular
```

Comment 2 Ben Cotton 2023-04-25 17:01:12 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Ludek Smid 2023-05-25 15:27:52 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.