f



xterm: query font used after larger-vt-font() calls

I have used Debian for years, but decided to try Ubuntu on a
new desktop to get more up to date packages. I got most things
to where I like them, but there are still a few annoying issues.

The current one is the xterm font. If I start the xterm with
a "fixed" font and increase it a few times (by larger-vt-font()
feature) I get the font I like. However, I cannot find what
exactly font it is to add to my Fvwm menu, etc. and spending an
hour with xfontsel did not help (too many variants).

Is there a way to find out what is the current font the xterm
uses (i.e. the font after larger-vt-font() calls, not the one
xterm was started with)?

Any advice is greatly appreciated!

-Alex
0
alex_m (1)
7/4/2011 4:47:45 PM
comp.os.linux.misc 33599 articles. 1 followers. amosa69 (78) is leader. Post Follow

2 Replies
687 Views

Similar Articles

[PageSpeed] 33

Alex <alex_m@localhost.localdomain> writes:

> I have used Debian for years, but decided to try Ubuntu on a
> new desktop to get more up to date packages. I got most things
> to where I like them, but there are still a few annoying issues.
>
> The current one is the xterm font. If I start the xterm with
> a "fixed" font and increase it a few times (by larger-vt-font()
> feature) I get the font I like. However, I cannot find what
> exactly font it is to add to my Fvwm menu, etc. and spending an
> hour with xfontsel did not help (too many variants).
>
> Is there a way to find out what is the current font the xterm
> uses (i.e. the font after larger-vt-font() calls, not the one
> xterm was started with)?

If it's set with xresources, this will turn it up:

Home> appres XTerm
*VT100.font3:   6x10
*VT100.font4:   7x13
*VT100.font1:   nil2
*VT100.font5:   9x15
*VT100.font6:   10x20
*VT100.font2:   5x7

Otherwise, you're using the builtins, you may need to
look at the source or man page.


-- 
Dan Espen
0
despen2 (232)
7/5/2011 6:11:53 PM
Alex <alex_m@localhost.localdomain> wrote:
> I have used Debian for years, but decided to try Ubuntu on a
> new desktop to get more up to date packages. I got most things
> to where I like them, but there are still a few annoying issues.
> 
> The current one is the xterm font. If I start the xterm with
> a "fixed" font and increase it a few times (by larger-vt-font()
> feature) I get the font I like. However, I cannot find what
> exactly font it is to add to my Fvwm menu, etc. and spending an
> hour with xfontsel did not help (too many variants).
> 
> Is there a way to find out what is the current font the xterm
> uses (i.e. the font after larger-vt-font() calls, not the one
> xterm was started with)?

Quick and dirty:

 printf '\033]50;?\007'

The returned string, which will probably be taken by the shell as input
from the keyboard, will be the above control sequence with the '?'
replaced with a font name or alias.

If the returned font name is an alias, look it up with xprop:

 xprop -font 7x13

See /usr/share/doc/xterm*/ctlseqs.txt for details.

This site may be of interest:

<http://home.comcast.net/~urbanjost/CLONE/UNIX_SCRIPTS/scripts_xterm/index.html>

[ Followup-To: set to comp.os.linux.misc ]
0
news002 (135)
7/5/2011 6:16:51 PM
Reply: