Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643562 - =sci-physics/root-6.12.04-r1 builtin fonts missing and does not use fontconfig => broken fonts
Summary: =sci-physics/root-6.12.04-r1 builtin fonts missing and does not use fontconfi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Guilherme Amadio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-05 15:35 UTC by Oliver Freyermuth
Modified: 2021-10-25 11:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2018-01-05 15:35:16 UTC
Using ROOT 6.12 with a most basic example such as executing:

TCanvas foo("foo", "foo", 800, 600); TH1D a("c2", "c2", 10, 1, 10); a.Draw()

on the interpreter commandline reveals broken fonts (italic, pretty large) on axises and title. 

It seems the new ebuild prunes the "fonts" directory shipped with ROOT and does not install it anymore, so $(ROOTSYS)/fonts which root attempts to use at runtime does not exist. 

Putting
*.*.Root.TTFontPath:        /some/path/to/roots/fonts/
in ~/.rootrc with the path pointing to the fonts directory in a root git checkout can be used as a temporary fix. 

Fedora has solved this with a ~1500 lines long patch adding fontconfig support to all places in ROOT which rely on the explicit presence of these fonts.
Comment 1 Oliver Freyermuth 2018-01-05 15:46:39 UTC
Installing
media-fonts/freefont
and specifying
*.*.Root.TTFontPath:        /usr/share/fonts/freefont/
in .rootrc (or system.rootrc) also appears to make basic font usage work. 

A real fix would be to either add the fonts directory back, or apply Fedoras fontconfig patch (or even better, ask them to try to upstream it).
Comment 2 Guilherme Amadio gentoo-dev 2018-01-11 12:30:02 UTC
Could you please link the fontconfig patch in question? I can make sure it makes its way upstream.
Comment 3 Oliver Freyermuth 2018-01-11 12:56:36 UTC
Hi,

all of Fedora's patches (of which several may be of interest) are here:
https://src.fedoraproject.org/cgit/rpms/root.git/tree/
The fontconfig patch is:
https://src.fedoraproject.org/cgit/rpms/root.git/tree/root-fontconfig.patch

The patching has been done by Mattias Ellert, who has also interacted a bit with upstream (and upstreamed some fontconfig patches earlier for ROOT 5). 
He also gave a talk at the last ROOT user's workshop ( https://indico.cern.ch/event/349459/contributions/822788/ ). It might also be a good idea to contact him and ask whether he has already attempted to upstream the patch / why he did not do it (just lack of time, or other issues).
Comment 4 Oliver Freyermuth 2018-07-06 01:51:39 UTC
Issue (expectedly) persists in 6.14.00.
Comment 5 Guilherme Amadio gentoo-dev 2018-07-06 06:41:36 UTC
Hi Oliver, I did look at this bug yesterday while updating ROOT to 6.14 in Gentoo. For now, I think I will do the easy thing to fix this and just keep the fonts directory since media-fonts/freefont does not have all fonts ROOT uses. Later I will pick up the Fedora patches and apply them upstream (I am part of upstream, BTW, I work on the ROOT team). After a quick look, they cannot be merged as is, but will need some improvements first. If you want to help, feel free to create a pull request on ROOT's GitHub repo and assign to me. Cheers,
Comment 6 Larry the Git Cow gentoo-dev 2018-07-06 09:28:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e086ed2cf2fb64ff9c9a56cf9d1cbc8eb744e543

commit e086ed2cf2fb64ff9c9a56cf9d1cbc8eb744e543
Author:     Guilherme Amadio <amadio@gentoo.org>
AuthorDate: 2018-07-06 06:48:06 +0000
Commit:     Guilherme Amadio <amadio@gentoo.org>
CommitDate: 2018-07-06 09:27:29 +0000

    sci-physics/root: keep fonts dir, bug 643562
    
    Keep fonts directory until ROOT supports fontconfig.
    
    Closes: https://bugs.gentoo.org/643562
    Package-Manager: Portage-2.3.41, Repoman-2.3.9

 sci-physics/root/{root-6.12.06-r3.ebuild => root-6.12.06-r4.ebuild} | 2 +-
 sci-physics/root/{root-6.14.00.ebuild => root-6.14.00-r1.ebuild}    | 2 +-
 sci-physics/root/root-9999.ebuild                                   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)