https://bugzilla.redhat.com/show_bug.cgi?id=2063714
Bug ID: 2063714 Summary: serif:lang=ja falls back to Droid Sans instead of Noto Sans CJK JP Product: Fedora Version: 36 Status: NEW Component: fontconfig Assignee: tagoh@redhat.com Reporter: petersen@redhat.com QA Contact: extras-qa@fedoraproject.org CC: ajax@redhat.com, caillon+fedoraproject@gmail.com, fonts-bugs@lists.fedoraproject.org, gnome-sig@lists.fedoraproject.org, i18n-bugs@lists.fedoraproject.org, mclasen@redhat.com, pnemade@redhat.com, rhughes@redhat.com, rstrode@redhat.com, sandmann@redhat.com, tagoh@redhat.com Target Milestone: --- Classification: Fedora
Description of problem: In Fedora 36 when google-noto-serif-cjk-ttc-fonts is not installed fontconfig seems to fall back to google-droid-sans-fonts rather than google-noto-sans-cjk-ttc-fonts.
This might be related to/caused by bug 517789?
How reproducible: 100%
Steps to Reproduce: 1. boot Fedora Live image 2. fc-match serif:lang=ja
Actual results: 2. DroidSansJapanese.ttf: "Droid Sans" "Regular"
Expected results: 2. NotoSansCJK-Regular.ttc: "Noto Sans CJK JP" "Regular"
Additional info: I get the same result with your older copr repo applied F35 fwiw.
https://bugzilla.redhat.com/show_bug.cgi?id=2063714
--- Comment #1 from Akira TAGOH tagoh@redhat.com --- First, no, this isn't related to Bug#517789. fontconfig is trying to estimate the score from the various properties provided by font caches. what fonts are the best font according to the request is depending on what a sort of fonts installed. strictly speaking, it is reproducible but it isn't that easy to predict which one it would be. Usually we add a substitute rule to make it predictable. it is mostly obvious from the order of the family names. However, in this case, if no serif fonts is installed, it will be decided by other properties. thus, it doesn't care what fonts are default for sans-serif, and it could says this behavior isn't a bug.
One thing we can make it better is to add sans-serif at the end of family name list as a last resort. that may looks like (not tested):
<fontconfig> <match> <test name="family"> <string>serif</string> </test> <edit name="family" mode="append_last"> <string>sans-serif</string> </edit> </match> </fontconfig>
Note the position of this config. it must be proceeded prior to other config which interacts with "sans-serif". This would gives you Noto Sans related family instead of DejaVu Sans. though adding different typefaces as a fallback sounds not a good idea.
https://bugzilla.redhat.com/show_bug.cgi?id=2063714
--- Comment #2 from Jens Petersen petersen@redhat.com --- Thanks for the detailed analysis, Akira
https://bugzilla.redhat.com/show_bug.cgi?id=2063714
Akira TAGOH tagoh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|fontconfig |google-noto-fonts CC| |petersen@redhat.com, | |psatpute@redhat.com, | |pwu@redhat.com Status|NEW |MODIFIED
--- Comment #3 from Akira TAGOH tagoh@redhat.com --- This should be fixed in google-noto-fonts-20201206^1.git0c78c8329-9.fc38
https://bugzilla.redhat.com/show_bug.cgi?id=2063714
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version| |google-noto-fonts-20201206^ | |1.git0c78c8329-9.fc38
--- Comment #4 from Jens Petersen petersen@redhat.com --- I tested the build and it LGTM now, thanks!
https://bugzilla.redhat.com/show_bug.cgi?id=2063714
Jens Petersen petersen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|36 |37
https://bugzilla.redhat.com/show_bug.cgi?id=2063714
Akira TAGOH tagoh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NEXTRELEASE Status|MODIFIED |CLOSED Last Closed| |2023-08-07 07:23:37
--- Comment #5 from Akira TAGOH tagoh@redhat.com --- Unfortunately there are no plans to backport this change for some reasons. This has been fixed in f38 and f37 is going to be EOL. so closing this.
fonts-bugs@lists.fedoraproject.org