Xterm -fa works, but not xterm*faceName
Asked Answered
U

5

7

I have the font (listed by fc-list):

/usr/share/fonts/misc/Inconsolata-dz for Powerline.otf: Inconsolata\-dz for Powerline:style=dz

that I am trying to get to display with xterm.

As it stands, running

xterm -fa "Inconsolata\-dz for Powerline"

works just fine, but putting

xterm*faceName: Inconsolata\-dz for Powerline

in my .Xdefaults results in the default, broken weird font you get when an invalid font is loaded.

What is the proper way to set this font using .Xdefaults?

Universalism answered 25/10, 2014 at 23:38 Comment(2)
hey, did you find a solution? i'm having this exact problem right now.Needlework
I'm having this exact problem too, and neither of the answers in this question actually solve the problemWas
B
2

Find the font name by run:

fc-list :fontformat=TrueType -f "%{family}\n" |grep Powerline

Configure font in ~/.Xresources

XTerm*faceName: <font name from previous output>
XTerm*faceSize: 12

Apply changes on .Xresources by run:

xrdb -merge ~/.Xresources
Botha answered 2/6, 2016 at 14:42 Comment(1)
This does not answer the question at all! The OP is saying that the -fa and -fs options work, but the facename and facesize options don't work, when given the same parametersWas
W
2

Here's another thread with the exact same question

From the answer on that thread, it turns out that that you can use faceName this way, however, you must be very careful to get the capitalization correct, as the labels are case sensitive. For example, the following .Xresources file works correctly for me on Arch Linux, assuming one remembers to xrdb it.

XTerm*renderFont: true
XTerm*faceName: monospace
XTerm*faceSize: 15
Was answered 17/3, 2018 at 20:43 Comment(0)
G
0

The "\-" looks suspicious: X resources know only a few special backslash sequences. Perhaps just removing the backslash would work.

Gutshall answered 7/2, 2015 at 17:45 Comment(1)
I can confirm that the issue is not caused by the backslash. I am having the same issue with a font name that doesn't have any backslashesWas
B
0

Use xterm*font: Inconsolata\-dz for Powerline instead.

Bug answered 7/5, 2021 at 6:57 Comment(0)
P
0

You need to escape the \. I had the same issue with the same font, this ended up working for me:

xterm*faceName: Inconsolata\\-dz for Powerline

Pressmark answered 2/9, 2022 at 21:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.