Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting urxvt font [SOLVED]
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
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1471
Location: Berlin, Germany

PostPosted: Fri Feb 07, 2025 2:46 pm    Post subject: Setting urxvt font [SOLVED] Reply with quote

I've followed this tutorial to set up my .Xresources file, which contains the following lines:

Code:
URxvt.font:           xft:Iosevka:style=Regular:pixelsize=10
URxvt.boldFont:       xft:Iosevka:style=Bold:pixelsize=10


However, when I start a new terminal, the font it uses is still the basic terminal font (ie, the same one I see when booting up). How do I fix that? fc-list reports the following Iosevka fonts available:
Code:
 $ fc-list | grep Iosevka
/usr/share/fonts/iosevka/Iosevka.ttc: Iosevka,Iosevka Extralight Oblique:style=Extralight Oblique,Regular
/usr/share/fonts/iosevka/Iosevka.ttc: Iosevka,Iosevka Extrabold Extended:style=Extrabold Extended,Regular
/usr/share/fonts/iosevka/Iosevka.ttc: Iosevka,Iosevka Extended:style=Bold Extended,Bold
/usr/share/fonts/iosevka/Iosevka.ttc: Iosevka Fixed,Iosevka Fixed Medium Extended:style=Medium Extended,Regular
/usr/share/fonts/iosevka/Iosevka.ttc: Iosevka Term:style=Bold Italic
(etc etc.)

Ideally, I'd have it set to use Iosevka Term, since I'm assuming that's optimized for use with terminal emulators.

Cheers,

EE


Last edited by ExecutorElassus on Fri Feb 07, 2025 8:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


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

PostPosted: Fri Feb 07, 2025 3:34 pm    Post subject: Reply with quote

I haven't used X in forever, but in the .X files left over I use urxvt* vs URxvt.*, don't remember why.

commented out:
Code:
! URxvt.font: 10x20,\
!             -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1, \
!             [codeset=JISX0208]xft:Kochi Gothic:antialias=false, \
!             xft:Code2000:antialias=false


used and working the last time I used X:
Code:
urxvt*font:     xft:dejavusansmono:size=14,\
                xft:dejavusansmono:style=Bold:size=14,\
                [codeset=JISX0208]xft:Kochi Gothic:antialias=false,\
                xft:Code2000:antialias=false


IIRC, the 1st line is regular text, the 2nd is bold, don't remember what 3rd and 4th line represent, probably in the man page.
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1471
Location: Berlin, Germany

PostPosted: Fri Feb 07, 2025 6:34 pm    Post subject: Reply with quote

hrm, nope, that doesn't seem to have helped. Could there be some system-level config file that would override it?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Fri Feb 07, 2025 6:56 pm    Post subject: Reply with quote

Perhaps an obvious question, but did you check the output of xrdb -query to confirm that your changes are visible to X applications?
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1471
Location: Berlin, Germany

PostPosted: Fri Feb 07, 2025 7:07 pm    Post subject: Reply with quote

I get this:
Quote:
$ xrdb -query
*background: rgb:10/10/10
*color0: rgb:20/20/20
*color1: rgb:CC/00/00
*color10: rgb:8a/e2/34
*color11: rgb:fc/e9/4f
*color12: rgb:72/9f/cf
*color13: rgb:ad/7f/a8
*color14: rgb:34/e2/e2
*color15: rgb:ee/ee/ec
*color2: rgb:4e/9a/06
*color3: rgb:c4/a0/00
*color4: rgb:34/65/a4
*color5: rgb:75/50/7b
*color6: rgb:06/98/9a
*color7: rgb:d3/d7/cf
*color8: rgb:75/77/73
*color9: rgb:ef/29/29
URxvt*buffered: true
URxvt*externalBorder: 8
URxvt*hold: false
URxvt*internalBorder: 8
URxvt*perl-lib: /usr/lib64/urxvt/perl/
URxvt.background: [78]#000000
URxvt.borderLess: false
URxvt.clipboard.autocopy: true
URxvt.cursorBlink: false
URxvt.depth: 32
URxvt.fading: 25%
URxvt.foreground: grey80
URxvt.geometry: 90x32
URxvt.imLocale: de_DE.UTF-8
URxvt.inheritPixmap: False
URxvt.keysym.Control-Shift-Left: perl:tabbedex:move_tab_left
URxvt.keysym.Control-Shift-R: perl:tabbedex:rename_tab
URxvt.keysym.Control-Shift-Right: perl:tabbedex:move_tab_right
URxvt.keysym.Control-Shift-T: perl:tabbedex:new_tab
URxvt.keysym.Control-Shift-Tab: perl:tabbedex:prev_tab
URxvt.keysym.Control-Shift-W: perl:tabbedex:kill_tab
URxvt.keysym.Control-Tab: perl:tabbedex:next_tab
URxvt.keysym.M-Escape: perl:keyboard-select:activate
URxvt.keysym.M-c: perl:clipboard: copy
URxvt.keysym.M-s: perl:keyboard-select:search
URxvt.keysym.M-v: perl:clipboard: paste
URxvt.lineSpace: 1
URxvt.perl-ext-common: default,clipboard,keyboard-select,tabbedex
URxvt.saveLines: 20000
URxvt.scrollBar: false
URxvt.scrollstyle: plain
URxvt.tabbedex.autohide: true
URxvt.tabbedex.new-button: false
URxvt.tabbedex.no-tabbedex-keys: true
URxvt.tabbedex.reopen-on-close: no
URxvt.tabbedex.tab-bg: 0
URxvt.tabbedex.tab-fg: 3
URxvt.tabbedex.tabbar-bg: 0
URxvt.tabbedex.tabbar-fg: 2
URxvt.termName: rxvt-unicode-256color
URxvt.tintColor: #262626
URxvt.underlineURLs: false
Xft.dpi: 100
Xft.rgba: rgba
urxvt*boldFont: xft:Iosevka:style=Bold:pixelsize=10
urxvt*font: xft:Iosevka:style=Regular:pixelsize=10


So … looks like it? Maybe my terminal is just so small I can't distinguish the font? How would I check?
ETA: no, it's definitely not using Iosevka; I looked closely and the glyphs are definitely something else. So where else would the vt's font be set?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


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

PostPosted: Fri Feb 07, 2025 7:43 pm    Post subject: Reply with quote

Does it show if you do this: (from a running terminal)
Code:
urxvt -fn "xft:Iosevka:style=Regular:pixelsize=10"


You can also look at the man page "man 7 urxvt" and look for "How does rxvt-unicode choose fonts?"
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1471
Location: Berlin, Germany

PostPosted: Fri Feb 07, 2025 8:19 pm    Post subject: Reply with quote

Sigh. Thank you for pointing out the blind spot. I was starting the terminal from a root menu that bound the menu item to a urxvt command that specified the font. Changing it in that config fixed the issue (starting urxvt from a command is what made me ask myself how I was starting urxvt in the first place).

Marked as solved. Cheers,

EE
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