Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Font issues with rxvt and i3
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
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Sat Mar 10, 2018 3:54 am    Post subject: [Solved] Font issues with rxvt and i3 Reply with quote

I am trying to get fonts working with rxvt-unicode and i3-gaps.

What is happening is when rxvt loads it displays squares probably due to bolded fonts not rendering correctly. When trying to set fonts in `.Xresources' for rxvt the terminal fails to load in i3 and I end up having to kill i3.

I have emerged fontawesome liberation-fonts and terminus while attempting various ways to get them to load. At first xfontsel did not list any fonts, but after adding the 15-fonts.conf xfontsel saw terminus and only terminus. I also attempted to try variations for loading the fonts for rxvt including xft notation and regular notation. I have also ran mkfontscale and mkfontdir in all font directories.

I preferably want to get a font working that supports unicode well.

Any support would be appreciated.

Thanks!

Code:
# export | egrep "(LANG|LC_)"
declare -x LANG="en_US.utf8"


Code:
# eselect fontconfig list
Available fontconfig .conf files (* is enabled):
  [1]   10-autohint.conf *
  [2]   10-hinting-full.conf
  [3]   10-hinting-medium.conf
  [4]   10-hinting-none.conf
  [5]   10-hinting-slight.conf *
  [6]   10-no-sub-pixel.conf
  [7]   10-scale-bitmap-fonts.conf *
  [8]   10-sub-pixel-bgr.conf
  [9]   10-sub-pixel-rgb.conf *
  [10]  10-sub-pixel-vbgr.conf
  [11]  10-sub-pixel-vrgb.conf
  [12]  10-unhinted.conf
  [13]  11-lcdfilter-default.conf
  [14]  11-lcdfilter-legacy.conf
  [15]  11-lcdfilter-light.conf
  [16]  20-unhint-small-vera.conf *
  [17]  25-unhint-nonlatin.conf *
  [18]  30-metric-aliases.conf *
  [19]  40-nonlatin.conf *
  [20]  45-generic.conf *
  [21]  45-latin.conf *
  [22]  49-sansserif.conf *
  [23]  50-user.conf *
  [24]  51-local.conf *
  [25]  60-generic.conf *
  [26]  60-latin.conf *
  [27]  60-liberation.conf
  [28]  65-fonts-persian.conf *
  [29]  65-khmer.conf
  [30]  65-nonlatin.conf *
  [31]  69-unifont.conf *
  [32]  70-no-bitmaps.conf
  [33]  70-yes-bitmaps.conf *
  [34]  75-yes-terminus.conf *
  [35]  80-delicious.conf *
  [36]  90-synthetic.conf *


Code:
# cat /etc/X11/xorg.conf.d/15-fonts.conf
Section "Files"
FontPath "/usr/share/fonts/terminus"
FontPath "/usr/share/fonts/fontawesome"
FontPath "/usr/share/fonts/liberation-fonts"
EndSection


Code:
# cat .xinitrc
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

exec urxvtd --quiet --opendisplay --fork &
exec i3


Code:
# cat .Xresources
Xft.dpi:        96
Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintslight
Xft.autohint:   false
Xft.lcdfilter:  lcddefault

URxvt.font:  *-Terminus-*-*-*-*-*-*-*-*-*-*-*-*-*
!URxvt.boldFont: xft:Terminus:bold:pixelsize=14:antialias=false


URxvt.scrollBar: false
URxvt.scrollBar_right: false
URxvt.scrollBar_floating: false
URxvt.scrollstyle: rxvt

URxvt.print-pipe: "cat > /dev/null"

!-*- Perl extensions -*-
URxvt.perl-ext-common: default,selection-to-clipboard,pasta,matcher,keyboard-select
URxvt.keysym.M-u:     perl:url-select:select_next
! URxvt.url-launcher:   /usr/bin/firefox
URxvt.underlineURLs:  True
URxvt.matcher.button: 1
URxvt.keysym.M-Escape:perl:keyboard-select:activate
URxvt.keysym.Control-Shift-V:     perl:pasta:paste
! Comment this if you dont want copy when text is selected
URxvt.clipboard.autocopy: true

! Colors
URxvt*background: #000000
URxvt*foreground: #B2B2B2
! black
URxvt*color0:  #000000
URxvt*color8:  #686868
! red
URxvt*color1:  #B21818
URxvt*color9:  #FF5454
! green
URxvt*color2:  #18B218
URxvt*color10: #54FF54
! yellow
URxvt*color3:  #B26818
URxvt*color11: #FFFF54
! blue
URxvt*color4:  #1818B2
URxvt*color12: #5454FF
! purple
URxvt*color5:  #B218B2
URxvt*color13: #FF54FF
! cyan
URxvt*color6:  #18B2B2
URxvt*color14: #54FFFF
! white
URxvt*color7:  #B2B2B2
URxvt*color15: #FFFFFF


Last edited by abduct on Sat Mar 10, 2018 6:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
kajzer
Guru
Guru


Joined: 27 Nov 2014
Posts: 368

PostPosted: Sat Mar 10, 2018 12:28 pm    Post subject: Reply with quote

This is wrong :
Code:
URxvt.font:  *-Terminus-*-*-*-*-*-*-*-*-*-*-*-*-*


replace that with :
Code:
URxvt.font: xft:xos4 Terminus:regular:pixelsize=16


you don't need to mess with /etc/X11/xorg.conf.d/15-fonts.conf
run in terminal
Code:
fc-list
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Sat Mar 10, 2018 5:52 pm    Post subject: Reply with quote

@kajzer

I've moved 15-fonts.conf out of the the xorg.conf.d directory to my home users directory and changed the .Xresources config to reflect the font change as you pasted, but rxvt fails to launch in i3. When using bindings to call either i3-sensible-terminal, or urxvtc since rxvt is running in daemon mode the mouse turns into a little clock and the ui doesn't respond to clicks.

Another error I see is

Code:
urxvt: unable to load base fontset, plase specift a valid one using -fn, aborting.


My font is now set to

Code:
URxvt.font: xft:xos4 Terminus:regular:pixelsize=16


as you specified.

Here is my fc-list

Code:
# fc-list
/usr/share/fonts/terminus/ter-x24b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/terminus/ter-x12b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/terminus/ter-x32b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/fontawesome/FontAwesome.otf: FontAwesome:style=Regular
/usr/share/fonts/terminus/ter-x22b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/liberation-fonts/LiberationSerif-BoldItalic.ttf: Liberation Serif:style=Bold Italic
/usr/share/fonts/terminus/ter-x18b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/terminus/ter-x28b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/terminus/ter-x20b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/liberation-fonts/LiberationSerif-Regular.ttf: Liberation Serif:style=Regular
/usr/share/fonts/liberation-fonts/LiberationSans-Italic.ttf: Liberation Sans:style=Italic
/usr/share/fonts/liberation-fonts/LiberationMono-Regular.ttf: Liberation Mono:style=Regular
/usr/share/fonts/liberation-fonts/LiberationSerif-Bold.ttf: Liberation Serif:style=Bold
/usr/share/fonts/liberation-fonts/LiberationMono-BoldItalic.ttf: Liberation Mono:style=Bold Italic
/usr/share/fonts/liberation-fonts/LiberationMono-Bold.ttf: Liberation Mono:style=Bold
/usr/share/fonts/liberation-fonts/LiberationSans-Bold.ttf: Liberation Sans:style=Bold
/usr/share/fonts/liberation-fonts/LiberationSans-BoldItalic.ttf: Liberation Sans:style=Bold Italic
/usr/share/fonts/terminus/ter-x18n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/terminus/ter-x28n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/liberation-fonts/LiberationSans-Regular.ttf: Liberation Sans:style=Regular
/usr/share/fonts/fontawesome/fontawesome-webfont.ttf: FontAwesome:style=Regular
/usr/share/fonts/terminus/ter-x20n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/terminus/ter-x12n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/terminus/ter-x32n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/terminus/ter-x22n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/terminus/ter-x14n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/terminus/ter-x24n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/terminus/ter-x16b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/terminus/ter-x16n.pcf.gz: xos4 Terminus:style=Regular
/usr/share/fonts/liberation-fonts/LiberationSerif-Italic.ttf: Liberation Serif:style=Italic
/usr/share/fonts/terminus/ter-x14b.pcf.gz: xos4 Terminus:style=Bold
/usr/share/fonts/liberation-fonts/LiberationMono-Italic.ttf: Liberation Mono:style=Italic


Edit:: Found the problem... the XFT use flag was not set during emerging rxvt. I could of sworn it was set.

To solve I ran:

Code:
 # eix rxvt-unicode
[I] x11-terms/rxvt-unicode
     Available versions:  9.21^t (~)9.22^t (~)9.22-r1^t{tbz2} **9999^t {256-color alt-font-width blink buffer-on-clear fading-colors +focused-urgency +font-styles iso14755 +mousewheel +perl pixbuf secondary-wheel startup-notification unicode3 +vanilla wcwidth xft}
     Installed versions:  9.22-r1^t{tbz2}(04:45:19 PM 03/08/2018)(256-color blink fading-colors font-styles mousewheel perl pixbuf unicode3 -iso14755 -startup-notification -xft)
     Homepage:            http://software.schmorp.de/pkg/rxvt-unicode.html
     Description:         rxvt clone with xft and unicode support


Realized I screwed up quite quickly and ran `euse -E xft', emerged rxvt-unicode again with --newuse --changed-use --update @world

And afterwards double checked that all was well with:

Code:
 # eix rxvt-unicode
[I] x11-terms/rxvt-unicode
     Available versions:  9.21^t (~)9.22^t (~)9.22-r1^t{tbz2} **9999^t {256-color alt-font-width blink buffer-on-clear fading-colors +focused-urgency +font-styles iso14755 +mousewheel +perl pixbuf secondary-wheel startup-notification unicode3 +vanilla wcwidth xft}
     Installed versions:  9.22-r1^t{tbz2}(09:59:14 AM 03/10/2018)(256-color blink fading-colors font-styles mousewheel perl pixbuf unicode3 xft -iso14755 -startup-notification)
     Homepage:            http://software.schmorp.de/pkg/rxvt-unicode.html
     Description:         rxvt clone with xft and unicode support


Terminus is loading now and there are no more unicode blocks in the terminal.

Thanks for the help
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 817
Location: The Village, Portmeirion

PostPosted: Sat Mar 10, 2018 7:44 pm    Post subject: Reply with quote

abduct wrote:
Edit:: Found the problem... the XFT use flag was not set during emerging rxvt. I could of sworn it was set.

Yeah, it isn't enabled by default, but somehow perl is. :lol:
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