# Xterm fonts



## rocky (Jun 11, 2009)

Dear all,

How to use .Xdefaults to change my Xterm font size and font face? My current setting is


```
XTerm*faceName: Platino Linotype
XTerm*faceSize: 12
```

but I can read some UTF8 file correctly.

I searched but couldn't find a suitable solution for my problem. I need a big font size and that xterm displays my file smoothly...

Thank you.


----------



## graudeejs (Jun 11, 2009)

Install x11/rxvt-unicode
and read it's man page to change fonts.
It's much, much better than xterm

here's my ~/.Xdefaults

```
*background:    #1f3049
*foreground:    #ffffff

*color0:  #000000
*color1:  #FF0000
*color2:  #00800A
*color3:  #A8A100
*color4:  #006FDD
*color5:  #AA00AA
*color6:  #00FFFF
*color7:  #CECECE
*color8:  #909090
*color9:  #FF6464
*color10: #64FF64
*color11: #FFFF64
*color12: #61B1FF
*color13: #FF00AA
*color14: #00C1FF
*color15: #ffffff
XTerm*background:	#000000
URxvt*background:	#000000
URxvt*foreground:	#ffffff

XClock*hourColor:       #ff0000
XClock*minuteColor:     #00ffff
XClock*secondColor:     #ffffff
XClock*majorColor:      #ff0000
XClock*minorColor:      #ffffff

XLoad*background: #0000a3

Xman*geometry:    954x600
Xman*topBox:    false


URxvt*transparent: true
URxvt*shading: 20
URxvt*buffered: false
URxvt*cursorColor: #ffff00
URxvt*loginShell: true
URxvt*scrollstyle: plain
URxvt*scrollBar: false
URxvt*scrollBar_right: true
URxvt*scrollTtyOutput: false
URxvt*scrollWithBuffer: true
URxvt*scrollTtyKeypress: true
URxvt*saveLines: 700
URxvt*mouseWheelScrollPage: true
URxvt*cursorBlink: true
URxvt*pointerColor: 3
URxvt*tripleclickwords: true
URxvt*hold: false
URxvt*urlLauncher: firefox3
URxvt*font: -misc-fixed-medium-r-normal-*-14-*-*-*-*-*-iso10646-1
URxvt*boldFont: -misc-fixed-bold-r-normal-*-14-*-*-*-*-*-iso10646-1
URxvt*italicFont: -misc-fixed-medium-o-*-*-13-*-*-*-*-*-iso10646-1
URxvt*boldItalicFont: -misc-fixed-medium-r-*-*-13-*-*-*-*-*-iso10646-1

XLock.mode: galaxy
XLock.erasetime: 0
XLock.erasedelay: 0
XLock.mousemotion: off
```


----------



## blah (Jun 11, 2009)

rocky said:
			
		

> ```
> XTerm*faceName: Platino Linotype
> XTerm*faceSize: 12
> ```


Hmm, my fc-list(1) output shows it's P*a*latino Linotype





			
				rocky said:
			
		

> but I can read some UTF8 file correctly.


Some UTF8? Not all? In what language your file written?


----------



## rocky (Jun 11, 2009)

@blah: If I use "Palatino" I get 







(string is readable but there are so many extra spaces)

If I use "Platino" I get






(very fancy but I can't read the text due to wrong characters )


I use Vietnamese and the first image shows correctly my file.

@killasmurf86: your configuration is very good but how can I have a bigger font size?


----------



## graudeejs (Jun 11, 2009)

rocky said:
			
		

> @killasmurf86: your configuration is very good but how can I have a bigger font size?



URxvt*font: -misc-fixed-medium-r-normal-*-14-*-*-*-*-*-iso10646-1
URxvt*boldFont: -misc-fixed-bold-r-normal-*-14-*-*-*-*-*-iso10646-1
URxvt*italicFont: -misc-fixed-medium-o-*-*-13-*-*-*-*-*-iso10646-1
URxvt*boldItalicFont: -misc-fixed-medium-r-*-*-13-*-*-*-*-*-iso10646-1

change -14- and -13- to something bigger and vailid

also are you using Unicode fonts? (doesn't look so)


----------



## blah (Jun 11, 2009)

rocky said:
			
		

> (string is readable but there are so many extra spaces)


That's correct. Palatino Linotype is NOT monospace font, i.e. not suitable for terminal emulators.





			
				rocky said:
			
		

> If I use "Platino" I get


... you get whatever "default" font is defined in /usr/local/etc/fonts/conf.d/ (cf. fonts-conf(5)).

`$ fc-match "Palatino Linotype"
Palatino Linotype (2).ttf: "Palatino Linotype" "Normal"`
`$  fc-match "Platino Linotype"
Vera.ttf: "Bitstream Vera Sans" "Roman"`


			
				rocky said:
			
		

> (very fancy but I can't read the text due to wrong characters )


x11-fonts/dejavu supports Vietnamese, too. But for some reason combining chars are not rendered in xterm with monospace fonts. However, these chars render fine with sans-serif fonts in xterm and with monospace fonts in emacs and rxvt-unicode, e.g.
`$ urxvt -fn xft:"DejaVu Sans Mono:size=18"`


----------



## tangram (Jun 15, 2009)

rocky said:
			
		

> Dear all,
> 
> How to use .Xdefaults to change my Xterm font size and font face? My current setting is
> 
> ...



I use x11-fonts/xfontsel to get the font names for the fonts available in my system.

Then I edit .Xdefaults and past the font name as xfontsel outputs.

Afterwards don't forget to reload .Xdefaults by running `% xrdb -load ~/.Xdefaults`.


----------



## sidetone (Mar 22, 2015)

Summarizing:
.Xdefaults

```
XTerm*faceName:
XTerm*faceSize:
```
faceName is obtained by fc-list(1)


----------

