flatpak icon indicating copy to clipboard operation
flatpak copied to clipboard

[Bug]: Some flatpak apps can't choose right font for specific language when using ttc or otc fonts

Open lumingzh opened this issue 3 years ago • 4 comments

Checklist

  • [X] I agree to follow the Code of Conduct that this project adheres to.
  • [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • [X] If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • [X] This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

1.12.7

What Linux distribution are you using?

Fedora Silverblue

Linux distribution version

35

What architecture are you using?

x86_64

How to reproduce

  1. set system language to simplified Chinese (zh_CN)
  2. install affected app like epiphany/firefox/libreoffice/blender...
  3. look Chinese text displayed on webpage or default font in settings or enter Chinese text

Expected Behavior

The Chinese text should be displayed with correct font like noto-cjk-sc (Simplified Chinese version of noto cjk fonts).

Actual Behavior

The Chinese text displayed with Japanese font like noto-cjk-jp (Japanese version of noto cjk fonts).

Additional Information

It seems like this problem only happens when using ttc or otc fonts, if there is single font available then the right font will be chosen.

The noto cjk fonts used by fedora is font collection formate (.ttc), and the default font used by all web browsers is Japanese font.

But the default font used for document in libreoffice is noto-cjk-hk, and blender's text object creating can only recognize Japanese font from noto cjk fonts.

However, all other apps include gtk based and qt based using right font. Thank you.

lumingzh avatar Apr 22 '22 14:04 lumingzh

I open this issue as well https://github.com/flatpak/flatpak/issues/4818

carnage-mode avatar May 25 '22 14:05 carnage-mode

可以为flatpak设置环境变量,对打开程序生效: flatpak run --env=LC_ALL=zh_CN.UTF-8 org.libreoffice.LibreOffice 对全局永久生效: sudo flatpak override --env=LC_ALL=zh_CN.UTF-8

clyl avatar Sep 21 '23 08:09 clyl

可以为flatpak设置环境变量,对打开程序生效: flatpak run --env=LC_ALL=zh_CN.UTF-8 org.libreoffice.LibreOffice 对全局永久生效: sudo flatpak override --env=LC_ALL=zh_CN.UTF-8

Well, fedora using vf (variable font) fonts now, and the problem doesn't exist anymore for fedora users (I think so or for me at least). But I don't know this bug is fixed or not.

lumingzh avatar Sep 21 '23 13:09 lumingzh

I replaced the code given by carnage-mode with the one below. Then I opened the problematic application and it was solved.

Code; sudo flatpak override --env=LC_ALL=ja_JP.UTF-8

ghost avatar Aug 11 '24 02:08 ghost