Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
media-fonts/dejavu + fontforge = garbage
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Tue Mar 02, 2021 5:30 pm    Post subject: media-fonts/dejavu + fontforge = garbage Reply with quote

Something Bad™ happens if I
Code:
USE=fontforge emerge dejavu

This is DejaVu Serif Italic at 16 points, normal and then bold, in LibreOffice:
Installed directly as TTF files
Compiled by fontforge from SFD files
Sometimes ligatures are also wrecked in DejaVu Sans. At least ff, fi, fj, and fl are replaced by the wrong glyph-- from a south Asian or Indonesian script, I think. (edit: probably Arabic, I don't know!)
fi, fl, ff, etc
Has anyone ever seen nonsense like this? Perhaps I am merely not good enough at coming up with search terms.
I first saw this a few years ago when I had the idea to fix some things using local patches. Pretty soon I noticed some of this corruption and first assumed I broke something but things were still wrong after I removed the patches. Eventually I **think** I figured out I could just mask a more recent fontforge and it would be good again. Now I don't have those things, and the TTFs I made might be in some backup but this is bothering me. I have tried to find an old fontforge that works just for the sake of knowing where to begin a git bisect-- and that's just another pain, partly because at some point they switched from autotools to CMake. An old-ish but semi-recent fontforge still reveals the problem, and I don't even know if it IS fontforge's problem. So I'll just manually edit, manually install, and save some good TTFs in ~/ in the meantime-- if that even works.

edit: the bad news is that changing the FREETYPE_PROPERTIES so truetype interpreter was anything other than 35 immediately fixes it. This is bad because version 35 is the one that makes everything look familiar and more or less pleasant (as this person knows: https://bbs.archlinux.org/viewtopic.php?id=243775). Version 40 is on right now and it is fairly crap. But the ligatures work, oh boy. Now I remember that the first time I ever had to worry about the interpreter version was after they changed the default and I needed to change it back-- back to what it must have been when I first saw this kind of corruption.

The good news is that hopefully I can bisect freetype and see what changed while nobody or almost nobody except me even noticed that something broke. Or else fontforge really IS messed up, and it's only some old bytecode interpreter that chokes on some isolated examples of its output...

edit: I found an old package.mask indicating fontforge-20170731-r4 was a good version. So I went to /usr/local/portage and reverse-applied this patch:
https://gitweb.gentoo.org/repo/gentoo.git/commit/media-gfx/fontforge?id=e4daed4fe031fd865aff115e76de58e411985273
First I had to change PYTHON_COMPAT to 3.7. Then it wouldn't finish a build because freetype no longer comes with <internal/internal.h> ...but I can guess from
https://github.com/fontforge/fontforge/blob/master/fontforge/fffreetype.h#L42
that it's not needed for newer freetype versions.

Anyway I reemerged dejavu and reset my interpreter version variable and logged out and in and reopened my libreoffice test doc and everything is beautiful. OK, it's not beautiful but it's correct. Now I only need to find out why (after I make a local patch for missing internal.h).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum