Created attachment 985938 [details] Screenshot for sample font 9x15-ISO8859-1.pcf Description of problem: After updating fontconfig from the latest stable version 2.11.1 to the development branch 2.11.9x in the Fedora development tree, PCF fonts appear blurred whereas they appear as expected in gnome-font-viewer. Moreover, the size seems to be incorrect. Version-Release number of selected component (if applicable): gnome-terminal-3.14.2-2.fc21.x86_64 How reproducible: Always Steps to Reproduce: 1. Choose PCF as terminal font. Actual results: Characters appear blurred and with a wrong size. Expected results: Characters are correctly. Additional info: Downgrading to fontconfig-2.11.1-5.fc22 allowed to restore normal rendering for some time before updates introduced library incompatibilities.
Created attachment 985939 [details] Sample font 9x15-ISO8859-1.pcf
Since the blurred font is visible also in the profile window opened in the screenshot, this is probably rather a gtk3 issue.
So, you diagnosed that the problem appeared with a fontconfig update, and disappears with a fontconfig downgrade. And you think it is a gtk issue, but you file it against gnome-terminal ?
(In reply to Matthias Clasen from comment #3) 1. I do not think that this is a fontconfig issue because gnome-font-viewer which is linked against fontconfig itself displays all fonts -correctly- as you see in the screenshot. 2. That a fontconfig update caused this issue does not necessarily imply that fontconfig itself is the culprit. Some change may simply exhibit a bug in a different component, e.g. gnome-terminal (see 1.) 3. When after posting the bug I got aware that the font preview in the preferences panel was also affected which is provided by some (other) gtk3 widget I was less convinced that it was a gnome-terminal issue and added comment 3. The screenshot and the attached PCF file should allow you anyway to reproduce this issue instantaneously. I preferred to leave it up to you to choose the best fitting component. 4. I have just verified that also gedit renders blurred characters when this PCF font is chosen. Thus, indeed, it is not a gnome-terminal issue.
If it looks good on gnome-font-viewer, the font actually used for rendering on apps where you are seeing a problem may be different to what you expected because gnome-font-viewer disables the fallback on selecting a better font in pango. What exactly a font used in pango is hard to see at this moment. just checking the result of fc-match isn't necessarily correct to report the details. The difference between f22's and f21's related to this I think is, there are the change in scoring a font for bitmap and outline which prefer an outline font rather than bitmap until then, which was a bug. though the behavior looks opposed to that. I'm not sure if it makes any difference, how about enabling 70-yes-bitmaps.conf?
(In reply to Akira TAGOH from comment #5) Enabling 70-yes-bitmaps.conf by setting <patelt name="scalable"><bool>true</bool></patelt> does not make any difference. I do not understand your reasoning on the handling of fonts: the chosen bitmap font is being used but the rendering is incorrect. There is no issue of erroneously giving preference of another font over the desired one. The reported issue appears to be related of a wrong scaling of the chosen bitmap font.
That config enforces the scalable font to choose which means you aren't using the attached font actually. you can see: $ fc-query /path/to/9x15-ISO8859-1.pcf | grep scalable scalable: False(s) Do you have any other "Fixed Regular" font in your box? what about fc-match -a "Fixed:style=Regular:lang=en" ?
Created attachment 987500 [details] Output of 'fc-match -a "Fixed:style=Regular:lang=en"' (In reply to Akira TAGOH from comment #7) I have copied /usr/share/X11/fonts/misc/cl* into $HOME/.fonts/ in order to make these fonts available to fontconfig. This set of bitmap fonts can be chosen through the font selector of gnome-terminal. The output of fc-match -a "Fixed:style=Regular:lang=en" can be found in the attachment.
You don't need to copy the fonts there because there should be /usr/share/fonts/X11 symlink to it. though I don't see any "Fixed" fonts in the list so Pango tries to fallback others then. do you see those fonts with fc-list say?
Created attachment 987983 [details] Output of 'fc-match -a "Fixed:style=Regular:lang=en"' Output of 'fc-match -a "Fixed:style=Regular:lang=en"' after copying all fonts 9x15* from /usr/share/X11/fonts/misc to an empty folder $HOME/.fonts
Created attachment 987985 [details] Output of 'fc-list' Output of 'fc-list' after copying all fonts 9x15* from /usr/share/X11/fonts/misc/ to an empty folder $HOME/.fonts. Nothe that /usr/share/X11/fonts/misc/ is -not- included in fontconfig's search path; from the various X11 font directories only /usr/share/X11/fonts/Type1/ is!
Apparently the result at comment#10 is different to comment#8. is it still reproducible even after copying all 9x15* fonts to $HOME/.fonts?
To be more precise: after adding 9x15-ISO8859-1.pcf to an -empty- folder $HOME/.fonts, fontconfig behaves correctly when chosing font "Fixed Regular". For a scaling factor 11 from the font selection panel, it looks exactly as when opened with gnome-font-viewer. Only after adding additional fixed fonts of decreasing size to $HOME/.fonts such as 6x13-ISO8859-1.pcf etc., the terminal font changes size and eventually becomes blurred. Only for some small scaling factors, it is possible to obtain a crisp terminal font albeit smaller than the original one. My remedy for the original issue is to use only a single PCF file of the desired font family which looks crisp at the right size.
That sounds like just you don't like the fallback font for "Fixed Regular". when no fonts available in the font path where fontconfig recognize, it tries to find out a fallback. if you like a bitmap font rather than outlined one, assuming you have something though, enabling 70-yes-bitmaps.conf would be the way to go for you as I suggested at comment#5. To make more clear, if you disable 10-scale-bitmap-fonts.conf and see any difference on the behavior, something might be wrong around it otherwise it may be not a bug and depends on how exactly the terminal requests a font.
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
*** Bug 1217686 has been marked as a duplicate of this bug. ***
I have the same problem with Terminus font. I tried adding 70-yes-bitmaps and disabling 10-scale-bitmap-fonts with no effect. The font is still the wrong size and/or blurry.
This is reproducible in the same way with gedit.
(In reply to Adam Goode from comment #18) > This is reproducible in the same way with gedit. Does it only happen with PCF fonts?
Yes, using terminus-fonts (PCF).
meant to see if it works fine with TrueType/OpenType fonts say.
(In reply to Adam Goode from comment #20) Do not install package terminus-fonts system-wide but extract the PCF files and copy one file alone to $HOME/.fonts in increasing order removing the previous one. The right one will looks crisp at the desired size. This enabled me to use my favourite terminal (bitmap) font even under fedora 22.
The above result might explains this weird issue: $ fc-match :pixelsize=10:scalable=false:lang=en helvR10-ISO8859-1.pcf.gz: "Helvetica" "Regular" $ fc-match :pixelsize=12:scalable=false:lang=en helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular" $ fc-match :pixelsize=14:scalable=false:lang=en helvR10-ISO8859-1.pcf.gz: "Helvetica" "Regular" $ fc-match :pixelsize=16:scalable=false:lang=en helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular" $ fc-match :pixelsize=18:scalable=false:lang=en helvR18-ISO8859-1.pcf.gz: "Helvetica" "Regular" So if there are no requested sizes in fonts, it doesn't return the desired size of bitmap fonts here. though if applications doesn't restrict non-scalable fonts, it should fallback to the scalable fonts. that said if you say it is blurred, you may need to customize your config with hinting etc perhaps. I'll take a look for that though, maybe good to check /proc/<pid>/maps to see what fonts are used for apps.
erm, false alarm. they were picking up in different dpi: $ fc-match :pixelsize=10:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n" /usr/share/fonts/X11/75dpi/helvR10-ISO8859-1.pcf.gz:Helvetica-10 $ fc-match :pixelsize=12:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n" /usr/share/fonts/X11/75dpi/helvR12-ISO8859-1.pcf.gz:Helvetica-12 $ fc-match :pixelsize=14:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n" /usr/share/fonts/X11/100dpi/helvR10-ISO8859-1.pcf.gz:Helvetica-14 $ fc-match :pixelsize=16:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n" /usr/share/fonts/X11/100dpi/helvR12-ISO8859-1.pcf.gz:Helvetica-17 $ fc-match :pixelsize=18:scalable=false:lang=en -f "%{file}:%{family}-%{pixelsize}\n" /usr/share/fonts/X11/75dpi/helvR18-ISO8859-1.pcf.gz:Helvetica-18
Created attachment 1031353 [details] Terminus font in Leafpad editor also blurred (MATE desktop). Zoom level 400% Terminus font in Leafpad editor (and other applications) also blurred (MATE desktop)
(In reply to Joachim Frieben from comment #22) > Do not install package terminus-fonts system-wide but extract the PCF files > and copy one file alone to $HOME/.fonts in increasing order removing the > previous one. The right one will looks crisp at the desired size. This > enabled me to use my favourite terminal (bitmap) font even under fedora 22. Same problem here, after F22 upgrade: I'm using Terminus fonts and with Joachim Frieben's trick now I'm able to use it with 'gnome-terminal' and 'gedit'
(In reply to Marco Giunta from comment #26) > (In reply to Joachim Frieben from comment #22) > > Do not install package terminus-fonts system-wide but extract the PCF files > > and copy one file alone to $HOME/.fonts in increasing order removing the > > previous one. The right one will looks crisp at the desired size. This > > enabled me to use my favourite terminal (bitmap) font even under fedora 22. > > Same problem here, after F22 upgrade: I'm using Terminus fonts and with > Joachim Frieben's trick now I'm able to use it with 'gnome-terminal' and > 'gedit' It works for me too. But instead, I copyied 2 files with same size (ter-116n & ter-116b) to /usr/share/fonts/terminus. If I copied ter-x??? fonts too, it still works, but if I copied ter-1?? fonts of other sizes, it will blur again. so weird... Btw, terminus fonts in Fedora 22 only displayed as bitmap style only if the font-size is between 8pt to 10pt, other sizes will displayed blurred (using greyscale antialiasing).
(In reply to LiuYan from comment #27) It seems to me that you have to provide the font files which correspond to the desired size such that fontconfig does not scale them up. Typical sizes of bitmap fonts in a terminal window are 14 px to 16 px high which corresponds to ter-116n. It seems that fontconfig will use a smaller font size if available and erroneously scale it up resulting in a blurred image instead of looking for the closest match. Btw, I did not need to provide the bold version; the normal font was sufficient.
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
Thanks, fontconfig-2.11.94-1.fc22 fixed this bug. karma +1.
(In reply to Fedora Update System from comment #29) > 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 Yes, it works. Terminus font is back !!!
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).
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.