Bug 1493481 - Setting a preferred Sans Serif font does not seem to work
Summary: Setting a preferred Sans Serif font does not seem to work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: fonts-tweak-tool
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-20 09:55 UTC by Mike FABIAN
Modified: 2017-09-20 10:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-20 10:20:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
generated ~/.config/fontconfig/conf.d/000-fontstweak-ezfc.conf (2.42 KB, text/plain)
2017-09-20 09:55 UTC, Mike FABIAN
no flags Details

Description Mike FABIAN 2017-09-20 09:55:12 UTC
Created attachment 1328361 [details]
generated ~/.config/fontconfig/conf.d/000-fontstweak-ezfc.conf

I am testing with Fedora-Workstation-netinst-x86_64-27-20170910.n.0.iso
installed in qemu using:


nice -n 19 ionice -c 3 qemu-kvm -machine pc-i440fx-2.4 -enable-kvm -global qxl.ram_size=1x1024 -m 2048M -smp 2 -drive file=./Fedora-Workstation-netinst-x86_64-27-20170910.n.0.iso.qcow2,index=0,media=disk,cache=unsafe -localtime -serial file:/tmp/qemu-Fedora-Workstation-netinst-x86_64-27-20170910.n.0.iso.qcow2-output.log -name Fedora-Workstation-netinst-x86_64-27-20170910.n.0.iso.qcow2 -cdrom /local/mfabian/iso/Fedora-27/Fedora-Workstation-netinst-x86_64-27-20170910.n.0.iso -boot c -spice port=6002,disable-ticketing,streaming-video=off -vga qxl -display vnc=:6 -net nic -net user,hostname=Fedora-Workstation-netinst-x86_64-27-20170910.n.0.iso.qcow2,hostfwd=tcp::5558-:22 -monitor stdio -usb -usbdevice mouse -soundhw all

Versions of fontconfig and fonts-tweak-tool are:

fontconfig-2.12.5-1.fc27.x86_64
fonts-tweak-tool-0.3.2-15.fc27.x86_64

In the first tab of fonts-tweak-tool I have added the languages German
(Germany) - Deutsch, Japanese - 日本語, English (Great Britain),
English (USA) and French (France) - Français.

For Japanese, I choose “VL Gothic” for “Sans Serif” in Aliases.

For German I choose “FreeSans” for “Sans Serif” and “FreeSerif” for
“Serif” in Aliases.

The generated ~/.config/fontconfig/conf.d/000-fontstweak-ezfc.conf
file is attached.

But that does not seem  to have any effect. I still get  this:



mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=ja_JP.UTF-8 fc-match  sans-serif
VL-PGothic-Regular.ttf: "VL Pゴシック" "regular"
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=ja_JP.UTF-8 fc-match  sans
VL-PGothic-Regular.ttf: "VL Pゴシック" "regular"
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$

So I still get “VL PGothic”, not “VL Gothic”. Choosing any other font instead
of  “VL Gothic” doesn’t work either, no matter what I choose I continue
to get “VL PGothic”.

And for German,  English, and French I always get “DejaVu Sans”, no matter
what I choose in fonts-tweak-tool:

[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=de_DE.UTF-8 fc-match  sans
DejaVuSans.ttf: "DejaVu Sans" "Book"
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=de_DE.UTF-8 fc-match  sans-serif
DejaVuSans.ttf: "DejaVu Sans" "Book"
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=de_DE.UTF-8 fc-match  serif
DejaVuSerif.ttf: "DejaVu Serif" "Book"
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$

Comment 1 Mike FABIAN 2017-09-20 10:17:37 UTC
Tagoh San told me that one has to set the :lang=.. parameter.

This does indeed work:

[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=de_DE.UTF-8 fc-match  sans:lang=de-DE
FreeSans.ttf: "FreeSans" "Mittel"
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=de_DE.UTF-8 fc-match  sans:lang=de
FreeSans.ttf: "FreeSans" "Mittel"
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ 

Running a test program like pango-view in de_DE.UTF-8 locale seems to work
as well:


[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ cat test-file.txt 
Hello
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ LC_ALL=de_DE.UTF-8 pango-view --font="Sans Serif" test-file.txt &
[6] 15307
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ grep fonts /proc/15307/maps 
7f8ca9b47000-7f8ca9cd4000 r--p 00000000 fd:00 1201299                    /usr/share/fonts/gnu-free/FreeSans.ttf
[mfabian@Fedora-Workstation-netinst-x86_6 ~]$ 


So it looks like I am just confused and that the locale does
not influence fc-match is not really a bug.

Comment 2 Mike FABIAN 2017-09-20 10:20:03 UTC
Closing as NOTABUG because it does seem to work as designed.


Note You need to log in before you can comment on or make changes to this bug.