Bug 2184872

Summary: User installed Japanese fonts override system fonts when substituting glyphs
Product: [Fedora] Fedora Reporter: bztdlinux
Component: fontconfigAssignee: Akira TAGOH <tagoh>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: ajax, fonts-bugs, gnome-sig, i18n-bugs, mclasen, pnemade, rstrode, sandmann, tagoh
Target Milestone: ---Flags: tagoh: needinfo? (bztdlinux)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description bztdlinux 2023-04-06 04:34:06 UTC
Description of problem:
When installing a Japanese font locally (using gnome font viewer, which effectively copies to ~/.local/share/fonts/), with the default fontconfig, all kana in the system uses that font.

However, it only affects certain applications. Firefox (rpm) and Inkscape (flatpak) is affected, but gwrite is not.

Version-Release number of selected component (if applicable):
fontconfig-2.14.0-3.fc37.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Download the following font: http://font.sumomo.ne.jp/fontdata-c2157415/k-font.zip
2. Unzip and install by double-clicking the font in nautilus and clicking install.
3. Restart Firefox or Inkscape and paste "です” in a field with sans-serif or system-ui font

Actual results:
Text appears with the new font

Expected results:
Text appears with the normal system font

Additional info:
Running pango-view, e.g. the following, works fine and selects a reasonable font (Droid Sans Japanese):
FC_DEBUG=4 pango-view --font="system-ui" -t です | grep family

Comment 1 Akira TAGOH 2023-05-30 10:41:19 UTC
Well, it seems the dead link.  What's the family name in that font?

If you are sure it happens with system-ui generic alias and then result is different between fc-match and applications, you should report it to those applications first.
Strictly speaking, they may have more additional parameters to query a font. you may need to try it in the same condition. otherwise the result could be different.