One thought is to ask why we still install the fonts-arphic-uming
package when installing Chinese (Simplified as well as Traditional).
Probably it is of historical reasons from the time before Noto existed.
But let's consider that to be a matter of its own. Even if AR PL UMing
is available, Noto Sans CJK should have higher precedence.

With a Chinese locale, it's not possible to have fontconfig give Noto
Sans CJK higher precedence that it currently has:

$ LC_CTYPE=zh_CN.UTF-8 fc-match
NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular"

But also with non-Chinese locales, Noto Sans CJK ought to be preferred
over AR PL UMing:

$ LC_CTYPE=en_US.UTF-8 fc-match -a | grep -iE 'uming|cjk' | head -38
NotoSansCJK-Regular.ttc: "Noto Sans CJK JP" "Regular"
NotoSansCJK-Medium.ttc: "Noto Sans CJK JP" "Medium"
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK JP" "DemiLight"
NotoSansCJK-Light.ttc: "Noto Sans CJK JP" "Light"
NotoSansCJK-Thin.ttc: "Noto Sans CJK JP" "Thin"
NotoSansCJK-Bold.ttc: "Noto Sans CJK JP" "Bold"
NotoSansCJK-Black.ttc: "Noto Sans CJK JP" "Black"
NotoSansCJK-Regular.ttc: "Noto Sans CJK KR" "Regular"
NotoSansCJK-Medium.ttc: "Noto Sans CJK KR" "Medium"
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK KR" "DemiLight"
NotoSansCJK-Light.ttc: "Noto Sans CJK KR" "Light"
NotoSansCJK-Thin.ttc: "Noto Sans CJK KR" "Thin"
NotoSansCJK-Bold.ttc: "Noto Sans CJK KR" "Bold"
NotoSansCJK-Black.ttc: "Noto Sans CJK KR" "Black"
NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular"
NotoSansCJK-Medium.ttc: "Noto Sans CJK SC" "Medium"
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK SC" "DemiLight"
NotoSansCJK-Light.ttc: "Noto Sans CJK SC" "Light"
NotoSansCJK-Thin.ttc: "Noto Sans CJK SC" "Thin"
NotoSansCJK-Bold.ttc: "Noto Sans CJK SC" "Bold"
NotoSansCJK-Black.ttc: "Noto Sans CJK SC" "Black"
NotoSansCJK-Regular.ttc: "Noto Sans CJK TC" "Regular"
NotoSansCJK-Medium.ttc: "Noto Sans CJK TC" "Medium"
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK TC" "DemiLight"
NotoSansCJK-Light.ttc: "Noto Sans CJK TC" "Light"
NotoSansCJK-Thin.ttc: "Noto Sans CJK TC" "Thin"
NotoSansCJK-Bold.ttc: "Noto Sans CJK TC" "Bold"
NotoSansCJK-Black.ttc: "Noto Sans CJK TC" "Black"
NotoSansCJK-Regular.ttc: "Noto Sans CJK HK" "Regular"
NotoSansCJK-Medium.ttc: "Noto Sans CJK HK" "Medium"
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK HK" "DemiLight"
NotoSansCJK-Light.ttc: "Noto Sans CJK HK" "Light"
NotoSansCJK-Thin.ttc: "Noto Sans CJK HK" "Thin"
NotoSansCJK-Bold.ttc: "Noto Sans CJK HK" "Bold"
NotoSansCJK-Black.ttc: "Noto Sans CJK HK" "Black"
uming.ttc: "AR PL UMing CN" "Light"
uming.ttc: "AR PL UMing HK" "Light"
uming.ttc: "AR PL UMing TW" "Light"

But apparently the snap applications don't query fontconfig dynamically
about the default font. Instead a default font seems to be established
during installation, based on to me unknown criteria, and that default
font does not change.

We need help from the snap folks to sort this out, I think.

Another thought is that many available fontconfig files were moved from
/etc/fonts/conf.avail to /usr/share/fontconfig/conf.avail during the
lunar development cycle. Can this possibly have created a dissonance
between the snaps and the system in this respect? If I understand it
correctly, the snaps honor the symlinks in /etc/fonts/conf.d:

$ cat ~/snap/firefox/current/.config/fontconfig/fonts.conf
<fontconfig>
  <dir>/snap/firefox/2517/gnome-platform/usr/share/fonts</dir>
  <dir>/usr/local/share//fonts</dir>
  <dir>/usr/share//fonts</dir>
  <include ignore_missing="yes">/etc/fonts/conf.d</include>
  <include ignore_missing="yes">conf.d</include>
  <cachedir prefix="xdg">fontconfig</cachedir>
  <cachedir>/var/snap/firefox/common/fontconfig</cachedir>
</fontconfig>

But many of those symlinks on the system now point to /usr instead of
/etc.

One reason why I suspect that this has something to do with it is that
/etc/fonts/conf.avail/65-fonts-arphic-uming.conf — which prefers AR PL
UMing —is one of the files which was *not* moved to /usr.

** Changed in: fontconfig (Ubuntu)
   Importance: Undecided => High

** Changed in: fontconfig (Ubuntu)
       Status: Incomplete => New

** Also affects: snappy
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to fontconfig in Ubuntu.
https://bugs.launchpad.net/bugs/2017076

Title:
  default Chinese font in snap apps is ugly

Status in Snappy:
  New
Status in fontconfig package in Ubuntu:
  New
Status in language-selector package in Ubuntu:
  New

Bug description:
  After installs Ubuntu 23.04 with Chinese language selected, the
  default font is chosen to AR PL UMing CN, which is very ugly.

  ProblemType: Bug
  DistroRelease: Ubuntu 23.04
  Package: fontconfig 2.14.1-3ubuntu3
  ProcVersionSignature: Ubuntu 6.2.0-20.20-generic 6.2.6
  Uname: Linux 6.2.0-20-generic x86_64
  ApportVersion: 2.26.1-0ubuntu2
  Architecture: amd64
  CasperMD5CheckResult: pass
  CloudArchitecture: x86_64
  CloudID: none
  CloudName: none
  CloudPlatform: none
  CloudSubPlatform: config
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Apr 20 14:18:45 2023
  InstallationDate: Installed on 2023-04-20 (0 days ago)
  InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Release amd64 (20230418)
  ProcEnviron:
   LANG=zh_CN.UTF-8
   PATH=(custom, no user)
   SHELL=/bin/bash
   TERM=xterm-256color
   XDG_RUNTIME_DIR=<set>
  SourcePackage: fontconfig
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/snappy/+bug/2017076/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to