Bug 1226522

Summary: Fontconfig picks wrong pixelsize for bitmap fonts
Product: [Fedora] Fedora Reporter: Ralf Ertzinger <redhat-bugzilla>
Component: fontconfigAssignee: Akira TAGOH <tagoh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: bugs, fonts-bugs, i18n-bugs, pnemade, redhat-bugzilla, tagoh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fontconfig-2.11.94-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-05 23:53:53 UTC 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:
Attachments:
Description Flags
debug log for fc-match :pixelsize=14:scalable=false
none
debug log for fc-match Fixed-14 none

Description Ralf Ertzinger 2015-05-30 08:51:00 UTC
Description of problem:

Requesting a bitmap font of a certain pixelsize returns fonts of a different (smaller) pixelsize.

Version-Release number of selected component (if applicable):
fontconfig-2.11.93-2.fc22.x86_64

How reproducible:

$ fc-match :pixelsize=14:scalable=false -f "%{file}:%{family}-%{pixelsize}\n"
/usr/share/X11/fonts/misc/7x13-ISO8859-1.pcf.gz:Fixed-13


Note that a 14 pixelsize font was requested, but a 13 pixelsize font was returned.

14 pixelsize fonts _are_ present on the system:

$ fc-match Fixed-14 -f "%{file}:%{family}-%{pixelsize}\n"
/usr/share/fonts/ucs-miscfixed/7x14.bdf:Fixed-14

This does not happen for all queries, though:
$ fc-match :pixelsize=10:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n"
/usr/share/X11/fonts/misc/6x10-ISO8859-1.pcf.gz:Fixed-10

Comment 1 Akira TAGOH 2015-06-02 04:13:02 UTC
Please attach the log with FC_DEBUG=7

Comment 2 Fedora Update System 2015-06-02 09:38:13 UTC
fontconfig-2.11.94-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/fontconfig-2.11.94-1.fc22

Comment 3 Ralf Ertzinger 2015-06-02 17:14:35 UTC
Updating fontconfig definitely changed the behaviour, but it's still not consistent:

$ rpm -q fontconfig
fontconfig-2.11.94-1.fc22.x86_64
fontconfig-2.11.94-1.fc22.i686
$ fc-match :pixelsize=14:scalable=false -f "%{file}:%{family}-%{pixelsize}\n"
/usr/share/fonts/terminus/ter-114n.pcf.gz:Terminus-14
$ fc-match Fixed-14 -f "%{file}:%{family}-%{pixelsize}\n"
/usr/share/X11/fonts/misc/9x15-ISO8859-1.pcf.gz:Fixed-15
$ fc-match :pixelsize=10:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n"
/usr/share/X11/fonts/misc/6x10-ISO8859-1.pcf.gz:Fixed-10

debug logs for the first two queries attached below.

Comment 4 Ralf Ertzinger 2015-06-02 17:17:18 UTC
Created attachment 1033930 [details]
debug log for fc-match :pixelsize=14:scalable=false

Comment 5 Ralf Ertzinger 2015-06-02 17:18:00 UTC
Created attachment 1033931 [details]
debug log for fc-match Fixed-14

Comment 6 Akira TAGOH 2015-06-03 01:44:34 UTC
well, both queries isn't the same. fontconfig parses Fontname-number format to the family and the size, but the pixelsize. so I'm not that surprised even both result isn't the same.

Comment 7 Ralf Ertzinger 2015-06-03 08:29:39 UTC
Yes, I apologize, that's me being confused. I've tested the same on a F20 machine and the results are the same (Fixed-14 gives you a pixelsize=15 font).

This can be closed I believe.

Comment 8 Fedora Update System 2015-06-04 20:16:03 UTC
Package fontconfig-2.11.94-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fontconfig-2.11.94-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-9400/fontconfig-2.11.94-1.fc22
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-06-05 23:53:53 UTC
fontconfig-2.11.94-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Rex Dieter 2015-06-07 13:42:51 UTC
*** Bug 1224314 has been marked as a duplicate of this bug. ***

Comment 11 Akira TAGOH 2015-06-30 03:32:52 UTC
*** Bug 1226525 has been marked as a duplicate of this bug. ***