Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
URW Fonts: xfontsel and xlsfonts do NOT find these? (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
lundril
n00b
n00b


Joined: 30 Dec 2018
Posts: 3

PostPosted: Sun Dec 30, 2018 4:48 pm    Post subject: URW Fonts: xfontsel and xlsfonts do NOT find these? (SOLVED) Reply with quote

Hi,

It seems urw fonts (media-fonts/urw-fonts-2.4.9) are NOT found by xfontsel or xlsfonts.

I tried creating fonts.scale, fonts.dir with
Code:

su -
mkfontscale /usr/share/fonts/urw-fonts
mkfontdir /usr/share/fonts/urw-fonts

Then as regular user
Code:

xset fp+ /usr/share/fonts/urw-fonts
xset fp rehash


But
Code:

xlsfonts | fgrep -i urw

yields nothing.
xfontsel also does not display any of the URW fonts.

But
Code:

fc-list | fgrep -i urw

finds the URW fonts.

Any idea what I am doing wrong ?

with best regards
lundril


Last edited by lundril on Mon Dec 31, 2018 2:34 am; edited 1 time in total
Back to top
View user's profile Send private message
lundril
n00b
n00b


Joined: 30 Dec 2018
Posts: 3

PostPosted: Sun Dec 30, 2018 8:22 pm    Post subject: TrueType fonts: xfontsel, xlsfonts fail Reply with quote

Hi,

It now turns out that it seems none of the TrueType fonts can be found by xfontsel, xlsfonts.

Any ideas ??

so long
lundril
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 993
Location: Frankfurt, Germany

PostPosted: Sun Dec 30, 2018 9:03 pm    Post subject: Reply with quote

lundril,

welcome to the Gentoo forums!

Linux comes with more than one font system:
  • Most programs use Fontconfig nowadays. Fontconfig recursively scans all subdirectories of /usr/share/fonts. Programs like LibreOffice or Firefox will be able to use URW fonts directly after you installed media-fonts/urw-fonts.

  • The X font system (xlsfonts, xfontsel, etc.) won't see URW fonts after you installed them, because they do not recursively scan all subdirectories of /usr/share/fonts. Try the statements below:
    Code:
    xset -q fp                              # Look at "Font Path". /usr/share/fonts/urw-fonts is probably not part of Font Path
    xset +fp /usr/share/fonts/urw-fonts     # add URW font path
    xset -q fp                              # Look at "Font Path". /usr/share/fonts/urw-fonts should be part of Font Path
    xfontsel | grep -i urw                  # Do you see the URW fonts?
    xset -fp /usr/share/fonts/urw-fonts     # Remove URW font path
    xfontsel | grep -i urw                  # URW fonts should be gone...

    To make the change permanent, you could add the lines below to your xorg.conf:
    Code:
    Section "Files"
        FontPath     "/usr/share/fonts/urw-fonts"
    EndSection

For additional information, look at https://wiki.archlinux.org/index.php/font_configuration, section 'Font paths'.

Mike
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3690
Location: Dallas area

PostPosted: Sun Dec 30, 2018 9:14 pm    Post subject: Reply with quote

xfontsel should see them if you have a Files section of xorg.conf and list the path. (they show up for me)

Code:
Section "Files"
    ModulePath      "/usr/lib64/xorg/modules"
    FontPath        "/usr/share/fonts/misc"
#    FontPath        "/usr/share/fonts/OTF"
    FontPath        "/usr/share/fonts/TTF"
    FontPath        "/usr/share/fonts/Type1"
    FontPath        "/usr/share/fonts/100dpi"
    FontPath        "/usr/share/fonts/75dpi"
    FontPath        "/usr/share/fonts/Speedo"
    FontPath        "/usr/share/fonts/util"
    FontPath        "/usr/share/fonts/encodings"
#    FontPath        "/usr/share/fonts/default"
    FontPath        "/usr/share/fonts/dejavu"
    FontPath        "/usr/share/fonts/corefonts"
    FontPath        "/usr/share/fonts/terminus"
#    FontPath        "/usr/share/fonts/freefont-ttf"
    FontPath        "/usr/share/fonts/urw-fonts"
    FontPath        "/usr/share/fonts/unifont"
EndSection


as mike155 said fontconfig does things one way, other programs do it a different way.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
lundril
n00b
n00b


Joined: 30 Dec 2018
Posts: 3

PostPosted: Mon Dec 31, 2018 2:46 am    Post subject: Fix... for truetype xfontsel/xlsfonts Reply with quote

Hello,

I found the problem. I had to re-compile my gentoo system and make sure that the "truetype" USE flag is set system wide.
I added "truetype" to the USE flags in /etc/portage/make.conf.

I still have no clue at all why this has had any effect:

Code:

equery hasuse truetype
[IP-] [  ] dev-lang/tk-8.6.8:0/8.6
[IP-] [  ] dev-python/pillow-5.2.0:0
[IP-] [  ] media-libs/gd-2.2.5-r1:2/3
[IP-] [  ] media-libs/harfbuzz-2.0.2:0/0.9.18
[IP-] [  ] media-libs/xine-lib-1.2.9-r2:1
[IP-] [  ] media-video/ffmpeg-3.3.6:0/55.57.57
[IP-] [  ] media-video/vlc-3.0.4:0/5-9
[IP-] [  ] sys-boot/grub-2.02-r1:2/2.02-r1
[IP-] [  ] x11-libs/libXfont2-2.0.3-r1:0
[IP-] [  ] x11-terms/xterm-327:0


Maybe re-emerging x11-libs/libXfont2 with truetype did something ?

Notes (some rants):
Current gentoo very often does not have /etc/xorg.conf so any hints setting fontpaths here etc do not help.
Instead I guess /usr/share/X11/xorg.conf.d might be the right place... or not.
It seems the internet is rather full of nowadays obsolete hints to what you should to in /etc/xorg.conf, while
at the same time I cannot find a comprehensive tutorial how to use /usr/share/X11/xorg.conf.d
(only hints, that all of this nowadays is so much better... not.)

I tried with various "xset +fp", "mkfontdir", "mkfontscale", "xset fp rehash" as I wrote in the original post.
None of this helped.
It still is rather mysterious what exactly did the trick...

so long
lundril
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3690
Location: Dallas area

PostPosted: Mon Dec 31, 2018 10:42 am    Post subject: Re: Fix... for truetype xfontsel/xlsfonts Reply with quote

lundril wrote:

Notes (some rants):
Current gentoo very often does not have /etc/xorg.conf so any hints setting fontpaths here etc do not help.
Instead I guess /usr/share/X11/xorg.conf.d might be the right place... or not.
It seems the internet is rather full of nowadays obsolete hints to what you should to in /etc/xorg.conf, while
at the same time I cannot find a comprehensive tutorial how to use /usr/share/X11/xorg.conf.d


The hints aren't obsolete.
All xorg.conf.d is is xorg.conf cut into pieces, ie you can have a "files" file that only contains the Files Section of xorg.conf.
a lot of times, it's used for the video card section.

man xorg.conf gives you plenty of explanation.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
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