You are not logged in.
I set up URxvt font in .Xresources like this:
URxvt.font: xft:Monaco for Powerline:size=10:antialias=true
URxvt.boldFont: xft:Monaco for Powerline:bold:size=10:antialias=trueIt works and sets the correct font for URxvt. But it also changes all fonts.
I am using i3.
P.S. URxvt cannot display this character: ↵
But that is a completely unrelated problem.
Last edited by kureta (2015-02-28 23:27:29)
Offline
How are you setting your other fonts?
You could put the rxvt-unicode settings in ~/.Xdefaults instead -- this is parsed by urxvt automatically on startup (no need to `xrdb -merge` it).
Jin, Jîyan, Azadî
Offline
I don't do anything to set up any other fonts. I just want other applications to use whatever their default fonts are. Shouldn't "URxvt.font:" setting affect only URxvt and nothing else? Do I have to setup a default font for all applications?
I can move URxvt related settings from .Xresources into .Xdefaults but I setup this box to learn Linux in-depth, so I would like to know the cause of this problem before doing anything.
I don't install anything I don't need. I don't change any configuration files unless I know what I am doing, as opposed to just copy/pasting from the web.
Thanks for the quick response ![]()
Offline
Changes all fonts where? In GTK/Qt applications?
Offline
The applications don't have "default fonts" -- the font needs to be set via (for example) ~/.gtkrc-2.0
https://bbs.archlinux.org/viewtopic.php?id=194250
I like your attitude.
Jin, Jîyan, Azadî
Offline
It changes fonts in Chromium and QJackCtl. I don't have any other GUI applications.
Chromium had a different font before I changed URxvt's font. That is what I meant by "default fonts".
Edit: I don't have any desktop environments installed. Just Xserver and i3 wm.
Last edited by kureta (2015-02-28 21:37:38)
Offline
I like your attitude.
Thanks ![]()
Offline
I have found the cause of my problems.
% fc-match sans-serif -s
Monaco for Powerline.otf: "Monaco for Powerline" "標準體"
DroidSansFallbackFull.ttf: "Droid Sans Fallback" "Regular"
DroidSansFallbackLegacy.ttf: "Droid Sans Fallback" "Regular"
...
fc-match cursive -s
Monaco for Powerline.otf: "Monaco for Powerline" "標準體"
DroidSansFallbackFull.ttf: "Droid Sans Fallback" "Regular"
DroidSansFallbackLegacy.ttf: "Droid Sans Fallback" "Regular"
...Monaco for Powerline is the top match for all font families. So all the applications select this font for everything. I don't know how to fix that but I am sure I can find the answer around the forum/wiki. Thanks for your help.
Also does anyone know how to make URxvt display this character: ↵ ?
Offline
For the posterity, tih is how I solved my problem:
I have created ~/.config/fontconfig/fonts.conf file with following content.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Droid Serif</family>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Droid Sans</family>
<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>Verdana</family>
<family>Arial</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Monaco for Powerline</family>
<family>Inconsolata</family>
<family>Bitstream Vera Sans Mono</family>
</prefer>
</alias>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintmedium</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>Now I have another problem. URxvt uses Monaco for Powerline but everything else uses Inconsolata as default monospace font. For example the "code" sections in this forum in Chromium are all Inconsolata, despite the fact that the preferred monospace font is "Monaco for Powerline" in my user font.config
Offline
I have solved my final problem by adding the following into /etc/fonts/conf.d/45-latin.conf
<alias>
<family>Monaco for Powerline</family>
<default><family>monospace</family></default>
</alias>It seems that the system did not know that "Monaco for Powerline" is a monospace font.
I will mark this thread as solved and look to elsewhere to solve my other " ↵ " problem.
Thank you guys!
Offline
I like your attitude.
Yes, he seems to be one of us. Care to teach him the secret handshake?
Also does anyone know how to make URxvt display this character: ↵ ?
It works fine here, but I use terminus font. Are you sure that glyph is available with the font you selected? If it is, I'd look into your locale settings (output of localectl for starters) to see if you have a utf-8 locale/LANG.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Head_on_a_Stick wrote:I like your attitude.
Yes, he seems to be one of us. Care to teach him the secret handshake?
kureta wrote:Also does anyone know how to make URxvt display this character: ↵ ?
It works fine here, but I use terminus font. Are you sure that glyph is available with the font you selected? If it is, I'd look into your locale settings (output of localectl for starters) to see if you have a utf-8 locale/LANG.
Secret handshake!!! Please do teach ![]()
Actually I am pretty sure my font does not have that glyph. I will try different fonts. Is there a way to test different fonts in URxvt without stopping and restarting the Xserver?
Offline
^ I wrote a shabby script to do just that:
https://github.com/AladW/scripts/blob/m … xvt-ttfont
Of course you'll have to adjust the lorem ipsum. ![]()
edit: I see it uses ls to populate the array.
edit2: fixed.
Last edited by Alad (2015-02-28 23:55:01)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
You definitely don't need to restart X. You can edit the Xresources file, then just re-merge it (xrdb -merge ...). Or even better for testing, just use the -fn command line option for urxvt which will override and xrdb settings.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
^ I wrote a shabby script to do just that:
https://github.com/AladW/scripts/blob/m … xvt-ttfont
Of course you'll have to adjust the lorem ipsum.
edit: I see it uses ls to populate the array.
The script is nice, thank you, but it did not list any of the fonts I wanted to test. I changed the FONTPATH="/usr/share/fonts/TTF" to FONTPATH="/usr/share/fonts/OTF", then I was able to test Inconsolata and Monaco for Powerline. They both did not have the glyph for ↵. So I tried to test terminus too. but it is in "/usr/share/fonts/misc" folder and saved as many ter-***.psf.gz files. I tried to change FONTPATH to "/usr/share/fonts/misc" but the script loaded all ter-***.psf.gz files and when I selected any one of them Everything just went crazy ![]()
Offline
Everything just went crazy
Yeah, standard disclaimer for code of mine. Glad it somewhat helped anyway.
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
I looked trough your script and understood what it did. Just manually did it for terminus font. It also did not have that glyph
So I installed DejaVu fonts. It has many of the missing glyphs. So this is my final .Xresources file
URxvt.font: xft:Monaco for Powerline:size=10:antialias=true, \
xft:Droid Sans Mono:size=10:antialias=true, \
xft:DejaVu Sans Mono:style=Book:antialias=true:size=10
URxvt.boldFont: xft:Monaco for Powerline:bold:size=10:antialias=true, \
xft:Droid Sans Mono:bold:size=10:antialias=true
xft:DejaVu Sans Mono:bold:style=Book:size=10:antialias=trueif URxvt cannot find a glyph in the first font it looks trough the listed fonts, and finally finds it in DeJavu. So I am able to use Monaco and only glyphs that do not exist in Monaco are rendered using different fonts.
Yay! ![]()
Thank you Alad!
Offline
You definitely don't need to restart X. You can edit the Xresources file, then just re-merge it (xrdb -merge ...). Or even better for testing, just use the -fn command line option for urxvt which will override and xrdb settings.
Thanks! I totally forgot "xrdb -merge"
Offline
Trilby wrote:You definitely don't need to restart X. You can edit the Xresources file, then just re-merge it (xrdb -merge ...). Or even better for testing, just use the -fn command line option for urxvt which will override and xrdb settings.
Thanks! I totally forgot "xrdb -merge"
I don't use urxvt in server/client mode, so when I am playing with fonts, you can just leave the Xresources or Xdefault file up in a term window, save it, and then simply open another urxvt window. The changes that you make are then applied.
Knute
Offline