Bug 1195652

Summary: Fixed font 6x13 fails to render in gnome-terminal after latest freetype update
Product: [Fedora] Fedora Reporter: Stephen Tweedie <sct>
Component: freetypeAssignee: Marek Kašík <mkasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: behdad, fonts-bugs, kevin, mkasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: freetype-2.5.0-10.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-04 10:25:04 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:

Description Stephen Tweedie 2015-02-24 09:15:38 UTC
Description of problem:
After upgrading to the latest freetype, my default terminal font "6x13" (an old fixed X font) will not render, rendering only empty squares in the terminal.

Downgrading only freetype to the older version restores rendering.

Version-Release number of selected component (if applicable):
freetype-2.5.3-15.fc21.x86_64


How reproducible:
100%

Steps to Reproduce:
TBH I've no idea how to set this font in gnome-terminal these days; on the face of it
gsettings set  org.gnome.Terminal.Legacy.Profile:/b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ font "6x13"
should do it (and this is what the key is set to on my own system already), but the preferences don't let you set this directly and I can't get gnome-terminal to honour changes to that setting.

"emacs -font 6x13" shows similar issues, though: the bulk of the buffer renders OK, but status line text sporadically fails to render with the new freetype.

Comment 1 Marek Kašík 2015-02-24 11:10:55 UTC
Hi Stephen,

I'm not able to reproduce it here. It would help me to know which font exactly causes the problem. I think that ftview could help to narrow it.
Could you try to look which font in "/usr/share/X11/fonts/misc/" renders wrong by running "ftview 13 /usr/share/X11/fonts/misc/a-6x13-font" for each of those 6x13 fonts (or another one if you have it in a custom directory (e.g. ~/.fonts/)) ?

Regards

Marek

Comment 2 Stephen Tweedie 2015-02-24 11:40:47 UTC
ftview helped narrow things down, thanks.  Curious.

So it turns out I did have a copy of 6x13.pcf in ~/.fonts/.  With downgraded freetype, I can ftview it fine.  With the latest freetype, I cannot:

$ ftview 13 6x13.pcf 
could not find/open any font file
  error = 0x0002
$ strace ftview 13 6x13.pcf 
...
open("6x13.pcf", O_RDONLY)              = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=470612, ...}) = 0
mmap(NULL, 470612, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0d0d772000
close(3)                                = 0
mmap(NULL, 282624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0d0d72d000
munmap(0x7f0d0d72d000, 282624)          = 0
open("._6x13.pcf", O_RDONLY)            = -1 ENOENT (No such file or directory)
open("%6x13.pcf", O_RDONLY)             = -1 ENOENT (No such file or directory)
open(".AppleDouble/6x13.pcf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("6x13.pcf/..namedfork/rsrc", O_RDONLY) = -1 ENOTDIR (Not a directory)
open("6x13.pcf/rsrc", O_RDONLY)         = -1 ENOTDIR (Not a directory)
open("resource.frk/6x13.pcf", O_RDONLY) = -1 ENOENT (No such file or directory)
open(".resource/6x13.pcf", O_RDONLY)    = -1 ENOENT (No such file or directory)
munmap(0x7f0d0d772000, 470612)          = 0
write(2, "could not find/open any font fil"..., 51could not find/open any font file

I tried symlinking the /usr/share/X11/fonts/misc/6x13.pcf.gz file into my ~/.fonts (removing the old 6x13.pcf)... it works fine.

Could the .gz be the difference?

And yes ---

$ ftview 13 6x13.pcf 
could not find/open any font file
  error = 0x0002
$ gzip -v9 6x13.pcf 
6x13.pcf:	 85.5% -- replaced with 6x13.pcf.gz
[sct@herobrine tmp]$ ftview 13 6x13.pcf.gz 

works fine.  The exact same font file works compressed, but fails to open uncompressed.  With downgraded freetype, both work fine.

Anyway, this workaround gets me back up and running now; but I'll leave the BZ open as there's clearly still an issue here.  Thanks!

Comment 3 Marek Kašík 2015-02-24 13:20:31 UTC
Thank you very much for all the information. I've been able to find the patch which unveiled the problem [1] thanks to that and also to backport fixes for it [2][3].
This should be fixed in freetype-2.5.3-16.fc21 and in freetype-2.5.0-10.fc20.

Regards

Marek


[1] http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=0e2f5d518c60e2978f26400d110eff178fa7e3c3

[2] http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=74af85c4b62b35e55b0ce9dec55ee10cbc4962a2

[3] http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=06842c7b49c21f13c0ab61201daab6ff5a358fcc

Comment 4 Fedora Update System 2015-02-24 13:24:38 UTC
freetype-2.5.3-16.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/freetype-2.5.3-16.fc21

Comment 5 Fedora Update System 2015-02-24 13:25:22 UTC
freetype-2.5.0-10.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/freetype-2.5.0-10.fc20

Comment 6 Stephen Tweedie 2015-02-24 13:52:30 UTC
Many thanks!  This is confirmed fixed in freetype-2.5.3-16.fc21 from koji.  Karma left.

Comment 7 Fedora Update System 2015-02-25 13:25:22 UTC
Package freetype-2.5.3-16.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing freetype-2.5.3-16.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2481/freetype-2.5.3-16.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-03-04 10:25:04 UTC
freetype-2.5.3-16.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-03-04 10:26:13 UTC
freetype-2.5.0-10.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.