You are not logged in.

#1 2014-05-21 15:38:13

moisespedro
Member
Registered: 2013-11-07
Posts: 25

Xterm becoming gigantic when I change the font

Hi, I am running xterm on a cwm session and I am trying to set "termsyn" as my xterm font. I've added the following line to my ~/.Xresources file:

XTerm*faceName:          -*-termsynu-medium-r-normal--14-*-*-*-*-*-*-*

However, for some reason, the xterm becomes gigantic after that.

Here is a screenshot (default font on the right, termsyn font on the left).

What am I doing wrong?

Offline

#2 2014-05-21 15:40:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Xterm becoming gigantic when I change the font

Use a smaller font size.

Offline

#3 2014-05-21 16:17:33

moisespedro
Member
Registered: 2013-11-07
Posts: 25

Re: Xterm becoming gigantic when I change the font

tomk wrote:

Use a smaller font size.

It didn't work (I tried it with 11) and considering the same line works under other Linux boxes I don't think the font size is the issue.

EDIT: See? http://i.imgur.com/iYilqdI.png

Last edited by moisespedro (2014-05-21 16:27:07)

Offline

#4 2014-05-21 17:01:36

teckk
Member
Registered: 2013-02-21
Posts: 565

Re: Xterm becoming gigantic when I change the font

Make xterm the size you want XTerm*geometry. When you increase the font size xterm will get larger. I think that the default is 80 char wide.
~/.Xdefaults

XTerm*background: black
XTerm*foreground: white
Xterm*curserColor: white
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*geometry: 86x25
XTerm*saveLines: 1000
XTerm*font: -*-fixed-medium-r-*-*-20-*-*-*-*-*-iso8859-*

Offline

#5 2014-05-21 17:12:52

moisespedro
Member
Registered: 2013-11-07
Posts: 25

Re: Xterm becoming gigantic when I change the font

teckk wrote:

Make xterm the size you want XTerm*geometry. When you increase the font size xterm will get larger. I think that the default is 80 char wide.
~/.Xdefaults

XTerm*background: black
XTerm*foreground: white
Xterm*curserColor: white
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*geometry: 86x25
XTerm*saveLines: 1000
XTerm*font: -*-fixed-medium-r-*-*-20-*-*-*-*-*-iso8859-*

Geometry is not the problem

This is with:

XTerm*geometry: 80x24
XTerm*faceName: -misc-termsyn-bold-r-normal--11-79-100-100-c-60-iso8859-1

And if I try with:

XTerm*geometry: 80x24
XTerm*font: -misc-termsyn-bold-r-normal--11-79-100-100-c-60-iso8859-1

The font goes back to the default one

Last edited by moisespedro (2014-05-21 17:14:49)

Offline

#6 2014-05-21 17:28:53

teckk
Member
Registered: 2013-02-21
Posts: 565

Re: Xterm becoming gigantic when I change the font

And you don't get a change with something like

XTerm*geometry: 60x18

Offline

#7 2014-05-21 17:41:13

moisespedro
Member
Registered: 2013-11-07
Posts: 25

Re: Xterm becoming gigantic when I change the font

Nope, http://i.imgur.com/EUqWXZg.png
Hardly think that is a "11 size" font

XTerm*geometry: 60x18
XTerm*faceName: -misc-termsyn-bold-r-normal--11-79-100-100-c-60-iso8859-1

Offline

#8 2014-05-21 17:43:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,446
Website

Re: Xterm becoming gigantic when I change the font

How is that not a change?  The terminal in your image from post 7 is clearly smaller than the terminal in the image from post 5.

Also, have you added /usr/share/fonts/local to your font paths in your xorg config?

Last edited by Trilby (2014-05-21 17:47:27)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2014-05-21 17:52:03

moisespedro
Member
Registered: 2013-11-07
Posts: 25

Re: Xterm becoming gigantic when I change the font

Trilby wrote:

How is that not a change?  The terminal in your image from post 7 is clearly smaller than the terminal in the image from post 5.

Also, have you added /usr/share/fonts/local to your font paths in your xorg config?

It just changed the window size, the font is still gigantic.

[pedro@arch ~]$ fc-list : file | grep termsyn
/usr/share/fonts/local/termsynu7x14b.pcf: 
/usr/share/fonts/local/termsynu7x14r.pcf: 
/usr/share/fonts/local/termsynu7x12r.pcf: 
/usr/share/fonts/local/termsynu7x12b.pcf: 
/usr/share/fonts/local/termsyn7x12r.icons.pcf: 
/usr/share/fonts/local/termsyn6x11b.icons.pcf: 
/usr/share/fonts/local/termsyn6x13r.icons.pcf: 
/usr/share/fonts/local/termsyn7x12b.icons.pcf: 
/usr/share/fonts/local/termsyn6x11b.pcf: 
/usr/share/fonts/local/termsyn6x13r.pcf: 
/usr/share/fonts/local/termsyn6x11r.pcf: 
/usr/share/fonts/local/termsyn6x13b.pcf: 
/usr/share/fonts/local/termsyn7x12r.pcf: 
/usr/share/fonts/local/termsyn7x12b.pcf: 
/usr/share/fonts/local/termsyn7x14b.pcf: 
/usr/share/fonts/local/termsyn7x14r.pcf: 
/usr/share/fonts/local/termsyn7x14b.icons.pcf: 
/usr/share/fonts/local/termsyn6x11r.icons.pcf: 
/usr/share/fonts/local/termsyn6x13b.icons.pcf: 
/usr/share/fonts/local/termsyn7x14r.icons.pcf: 
/usr/share/fonts/local/termsynu6x11b.pcf: 
/usr/share/fonts/local/termsynu6x13r.pcf: 
/usr/share/fonts/local/termsynu6x11r.pcf: 
/usr/share/fonts/local/termsynu6x13b.pcf: 

Yes, it is part of my font path. As the image on #7 you can see the termsyn is being used but for some reason it is on a gigantic size (instead of 11 or 14)

Offline

#10 2014-05-21 18:02:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,446
Website

Re: Xterm becoming gigantic when I change the font

*confused*

Throughout this thread you seemed to be saying that it wasn't an issue with the font size, but that the xterm itself just got too big.  So it's really just the font?

I don't use xterm, but according to the man page, faceName is used for true-type font names - this also requires the faceSize to  be separately specified or a default of 14 is used for the size.

But there may be a further problem here in that termsyn is not a truetype font, it is a bitmapped font - and I believe these should be specified with the *font: resource instead.

Also, fc-list output can be misleading as it can change while X is running.  So is /usr/share/fonts/local specified in your xorg config or not?

Last edited by Trilby (2014-05-21 18:03:52)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2014-05-21 18:06:52

moisespedro
Member
Registered: 2013-11-07
Posts: 25

Re: Xterm becoming gigantic when I change the font

Trilby wrote:

*confused*

Throughout this thread you seemed to be saying that it wasn't an issue with the font size, but that the xterm itself just got too big.  So it's really just the font?

Yes, it is the font. I was using urxt-unicode before and I thought it would look the same on xterm.

Trilby wrote:

I don't use xterm, but according to the man page, faceName is used for true-type font names - this also requires the faceSize to  be separately specified or a default of 14 is used for the size.

Oh, so that explains the fact that both fonts (11 or 14) looks the same size, because faceSize wasn't being set.

Trilby wrote:

But there may be a further problem here in that termsyn is not a truetype font, it is a bitmapped font - and I believe these should be specified with the *font: resource instead.

It didn't work with "*font", it reverted to the default font.

Last edited by moisespedro (2014-05-21 18:07:03)

Offline

#12 2014-05-21 18:10:05

teckk
Member
Registered: 2013-02-21
Posts: 565

Re: Xterm becoming gigantic when I change the font

How about something like

XTerm*font: -*-termsyn-medium-r-normal-*-11-*-*-*-*-*-*-*

XTerm*font: -*-termsyn-bold-r-normal-*-11-*-*-*-*-*-*-*

Offline

#13 2014-05-21 18:11:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,446
Website

Re: Xterm becoming gigantic when I change the font

If the 'local' directory is not listed in your xorg config, then putting the font specifier in for the *font: resource would be expected to cause it to fall back on the default font.

Are you sure what you are currently getting is tamsyn but just in the wrong size - could it be a different default TT font?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2014-05-21 18:16:18

moisespedro
Member
Registered: 2013-11-07
Posts: 25

Re: Xterm becoming gigantic when I change the font

teckk wrote:

How about something like

XTerm*font: -*-termsyn-medium-r-normal-*-11-*-*-*-*-*-*-*

XTerm*font: -*-termsyn-bold-r-normal-*-11-*-*-*-*-*-*-*

None of them worked

Trilby wrote:

If the 'local' directory is not listed in your xorg config, then putting the font specifier in for the *font: resource would be expected to cause it to fall back on the default font.

Are you sure what you are currently getting is tamsyn but just in the wrong size - could it be a different default TT font?

Well, I also have the "terminus" font installed and, without modifying any file, it seems the terminus font works. I am a bit confused to be honest.

http://i.imgur.com/yqQqlfF.png

Offline

#15 2014-05-22 03:01:02

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Xterm becoming gigantic when I change the font

I'll assume you wish to use a termsyn font.  Using tamsyn with the following instructions would only require minor changes.

Check the font paths with both of these commands.  The outputs of both should include '/usr/share/fonts/local'.

$ xset q | grep -A1 'Font'
$ grep /fonts /var/log/Xorg.0.log

For the XLFD versions of termsyn or termsynu to be used, the font files should be listed in the file '/usr/share/fonts/local/fonts.dir'.  The availability of the Xft versions can also be checked.

$ grep termsyn /usr/share/fonts/local/fonts.dir
$ fc-list | grep termsyn

If everything checks out OK, you should probably refresh the XLFD font list with the command:

$ xset fp rehash

You can specify the font in your resource file using either 'faceName' or 'font'.  You can't use both resource classes in your configuration, it's one or the other.  With termsyn it doesn't much matter, but fonts specified using the 'font' resource class are never anti-aliased.

To use the Xft (think TrueType) versions of the font(s), try a variation of the following in your X resources file.  You can specify either 'Termsyn' or 'Termsynu'.  Font size can be specifed within the faceName resource or separately, using the faceSize resource.  Be careful with upper and lower cases, case is significant.

! Change size to your preference.
xterm*faceName: Termsyn:style=Regular:size=8

Best character display when using XLFD named fonts are often the fonts exactly as listed in the 'fonts.dir' file.  The asterisks are wild cards in the font name.  With termsyn, setting the point size will set the other fields.  In an XLFD name, the point size is written as ten times the actual point size.  You can also replace 'termsyn' with 'termsynu'.

! Good Point_Sizes to try are 79, 87, 101 and 120.
xterm*font: -*-termsyn-medium-*-*--*-79-*-*-*-*-iso8859-1

Offline

Board footer

Powered by FluxBB