Bug 1226522 - Fontconfig picks wrong pixelsize for bitmap fonts
Summary: Fontconfig picks wrong pixelsize for bitmap fonts
Alias: None
Product: Fedora
Classification: Fedora
Component: fontconfig
Version: 22
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
: 1224314 1226525 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2015-05-30 08:51 UTC by Ralf Ertzinger
Modified: 2015-06-30 03:32 UTC (History)
6 users (show)

Fixed In Version: fontconfig-2.11.94-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-06-05 23:53:53 UTC
Type: Bug

Attachments (Terms of Use)
debug log for fc-match :pixelsize=14:scalable=false (2.58 MB, text/plain)
2015-06-02 17:17 UTC, Ralf Ertzinger
no flags Details
debug log for fc-match Fixed-14 (2.72 MB, text/plain)
2015-06-02 17:18 UTC, Ralf Ertzinger
no flags Details

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):

How reproducible:

$ fc-match :pixelsize=14:scalable=false -f "%{file}:%{family}-%{pixelsize}\n"

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"

This does not happen for all queries, though:
$ fc-match :pixelsize=10:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n"

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.

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
$ fc-match :pixelsize=14:scalable=false -f "%{file}:%{family}-%{pixelsize}\n"
$ fc-match Fixed-14 -f "%{file}:%{family}-%{pixelsize}\n"
$ fc-match :pixelsize=10:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n"

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:
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. ***

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