Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 475488

Summary: font.eclass add non-standard Xorg FontPath elements (WAS: media-fonts/termsyn should install a fontconfig file)
Product: Gentoo Linux Reporter: Ondrej Grover <ondrej.grover>
Component: EclassesAssignee: Gentoo Fonts Team <fonts>
Status: CONFIRMED ---    
Severity: normal CC: xmw
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://article.gmane.org/gmane.linux.gentoo.devel/86551
See Also: https://bugs.gentoo.org/show_bug.cgi?id=185264
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: /etc/X11/xorg.conf.d/99-termsyn-font.conf
bad hack in user .xinitrc
font.eclass patch

Description Ondrej Grover 2013-07-02 11:42:15 UTC
the termsyn font is installed into /usr/share/fonts/termsyn/
which is not a default font directory for X

This results in applications not using fontconfig like xfontsel, dzen2 to not know of this font.

This can be easily fixed by 
xset fp+ /usr/share/fonts/termsyn/
xset fp rehash

or more conveniently by making a file /etc/X11/xorg.conf.d/99-termsyn-font.conf
containing 
Section "Files"
    FontPath "/usr/share/fonts/termsyn/"
EndSection
(attached)

I suggest such a file should be added for each font in a non-default directory.
Possibly this could be an eclass function.

Re-logging in will not help.

Reproducible: Always
Comment 1 Ondrej Grover 2013-07-02 11:44:04 UTC
Created attachment 352442 [details]
/etc/X11/xorg.conf.d/99-termsyn-font.conf
Comment 2 Michael Weber (RETIRED) gentoo-dev 2013-07-03 10:21:09 UTC
Hello fonts team,

I've identified following packages exhibiting the same situation
(These are just the fonts installed on my laptop, and it's non exhausive)

media-fonts/libertine-ttf
media-fonts/corefonts
media-fonts/dejavu
media-fonts/dina
media-fonts/droid
media-fonts/liberation-fonts
media-fonts/libertine-ttf
media-fonts/terminus-font
media-fonts/urw-fonts

What do you think about it?
I don't know what the fancy X11 window managers do about it, but I think this has to be addressed on a X11 server level. Esp. for users w/o any window manager or simple ones, these should not be forced to fix fp path in their user profile. My x11-base/xorg-server-1.14.2 (latest ~amd64) has these paths included by compilation

[    56.547] (WW) The directory "/usr/share/fonts/TTF/" does not exist.
[    56.547]    Entry deleted from font path.
[    56.547] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[    56.547]    Entry deleted from font path.
[    56.547] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[    56.547]    Entry deleted from font path.
[    56.551] (==) FontPath set to:
        /usr/share/fonts/misc/,
        /usr/share/fonts/100dpi/,
        /usr/share/fonts/75dpi/
Comment 3 Michael Weber (RETIRED) gentoo-dev 2013-07-03 10:37:15 UTC
Created attachment 352506 [details]
bad hack in user .xinitrc
Comment 4 Michael Weber (RETIRED) gentoo-dev 2013-07-03 11:57:02 UTC
Created attachment 352512 [details, diff]
font.eclass patch

Add /etc/X11/xorg.conf.d/90-${FONT_PN}-${SLOT}.conf file and
inform the admin about changes in the fontpath elements.
Comment 5 Ben de Groot (RETIRED) gentoo-dev 2013-07-03 14:21:36 UTC
No objections from me
Comment 6 Ondrej Grover 2013-07-03 14:29:29 UTC
Wow, thank you very much for this quick reaction. I'm glad it was recognized and that my eclass proposition was heard out.
I believe this fix will benefit many users, especially the inexperienced ones that wonder why their fonts aren't showing up.

As a for WMs taking care of this, IMHO it's not what a WM is supposed to do, so I don't think it should be relied upon the WM to make the fonts accessible. 

I just hope that a bunch of /etc/X11/xorg.conf.d/90-${FONT_PN}-${SLOT}.conf files won't slow down X server initialization. Could anybody with lots of files in /etc/X11/xorg.conf.d/ share their experience?
Comment 7 Michael Weber (RETIRED) gentoo-dev 2013-07-06 11:57:19 UTC
There is/was a discussion about this on gentoo-dev-ml
http://article.gmane.org/gmane.linux.gentoo.devel/86551
Comment 8 Ben de Groot (RETIRED) gentoo-dev 2013-08-21 08:29:47 UTC
(In reply to Michael Weber from comment #7)
> There is/was a discussion about this on gentoo-dev-ml
> http://article.gmane.org/gmane.linux.gentoo.devel/86551

How do you think we should proceed now?
Comment 9 Dimitrios Semitsoglou-Tsiapos 2015-04-26 12:03:30 UTC
Have any decisions been taken about this issue since?
Comment 10 Ben de Groot (RETIRED) gentoo-dev 2015-05-07 09:14:56 UTC
Michael, do you still want to pursue this?

I for one don't think it is necessary, as most software uses fontconfig these days. If you're using something more ancient, then it is easy enough to configure manually. 

But we're not against an opt-in solution, not enabled by default, to not slow down X startup unnecessarily for the majority of users who don't need this.