Solved Fonts in terminal

michael_hackson

Active Member

Thanks: 80
Messages: 147

#1
Hello! I have been lucky when it comes to fonting. There is just thing I wonder that I haven't been able to figure out and that is why some fonts in terminal look like an alphabet soup when used:
fonterenos.jpg

That is me trying the rumored 'Helvetica' and that is just an example of some fonts putting the characters out of place.

Is this how they should/ordinarily behave in terminal? Seems to be no problem with Xorg since it can find the paths for the fonts, making me able to switch in the first place.

This holds true for both x11/lilyterm and x11/xfce4-terminal.

So say I really really would want to use one of those fonts. What is to tinker with?

Cheers!

- - - michael_hackson
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,426
Messages: 27,742

#2
That looks like a proportional font being used in a monospaced way. Terminals typically use fixed-width/monospaced fonts and I definitely recommend keeping it that way. I'm personally quite fond of the x11-fonts/terminus-font for terminal sessions. It's monospaced and very clear. There's also a distinct difference between 1 (one), l (lower-case L) and 0 (zero), O (uppercase O) for example.
 
OP
OP
michael_hackson

michael_hackson

Active Member

Thanks: 80
Messages: 147

#3
I actually tried terminus as of today and I will really not going for any other. Terminus is both sharp, splendid and rests easy on the eyes.

Although I have another non-fixed width I'd like to use so I was keen on checking the possiblities:
fontereno2.jpg

As you can see, the spacing and width is not perfect but having it better maybe counts as greed.

So can this be done in any config? XML?

Thanks!

Edit: Hell that picture is poorely cut.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,426
Messages: 27,742

#4
I'm not familiar with those terminal applications but most X applications can be tweaked using ~/.Xdefaults or ~/.Xresources. Here are my settings for xterm for example:

Code:
!xterm settings
xterm*geometry:         132x43
xterm*dynamicColors:    true
xterm*utf8:             2
xterm*eightBitInput:    true
!xterm*saveLines:        32767 ! uses shitloads of mem
xterm*scrollTtyKeypress:true
xterm*scrollTtyOutput:  false
xterm*scrollBar:        false
xterm*loginShell:       true
xterm*faceName:         Terminus:pixelsize=14
xterm*jumpScroll:       true
xterm*multiScroll:      true
xterm*toolBar:          false
xterm*charClass:        33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48

Xcursor*theme:          Neutral
 
OP
OP
michael_hackson

michael_hackson

Active Member

Thanks: 80
Messages: 147

#7
Here is my post about fonts, that I use (you already saw it, michael_hackson), which was posted in "HOWTO: Nice fonts" topic.
Yap. I'll be digging from there. Some quick searches gives me the clue that there are terminal emulators supporting non-monospace. One other thing would be to force a font to monospace. Could work, could be ugly.

Will see if your settings give any improvements!

Thanks!
 
OP
OP
michael_hackson

michael_hackson

Active Member

Thanks: 80
Messages: 147

#8
Conclusion:

The topic can be solved through:

1. Stick with terminus and be happy
2. Find out if settings in the terminal emulator or ~/.Xdefaults~/.Xresources to allow non-monospaced fonts.
3. Pick a terminal with support, example: http://mlterm.sourceforge.net/
- directed from -
https://vi.stackexchange.com/questions/588/can-i-use-a-non-monospaced-font-in-either-vim-or-gvim
4. Force font to monospace with often very bad results. Best results is either mixing some symbols (non-monospace) with a monospacefont, more found in this project:
https://github.com/cpitclaudel/monospacifier
5. Manually change the looks of how the trickiest characters in the font is displayed. This will give the best result but is also the more time-consuming one with no guaranteed success until done.

When time at hand 5 will most likely give the best result.

SIGTERM
 

ILUXA

Aspiring Daemon

Thanks: 361
Messages: 595

#9
3. Pick a terminal with support
You may also try my xterm or urxvt settings, it should be added to ~/.Xresources,
also % xrdb -merge ~/.Xresources command should be added to your WM autostart script,
or to ~/.xinitrc, if you use startx.
Code:
! XTerm ------------------------------------------------
XTerm*utf8:                             1
XTerm*termName:                         xterm-256color
XTerm*loginShell:                       true
XTerm*activeIcon:                       false
XTerm*faceName:                         DejaVu Sans Mono:size=9
XTerm*font:                             -b&h-lucida-medium-r-normal-sans-12-*-*-*-*-*-*
XTerm*Foreground:                       #ffffff
XTerm*Background:                       #0D0D0D
XTerm*vt100*geometry:                   80x22
XTerm*saveLines:                        10000
XTerm*visualBell:                       true
XTerm*cursorBlink:                      false
XTerm*scrollBar:                        false
XTerm*scrollKey:                        true
XTerm*multiScroll:                      true
XTerm*scrollTtyOutput:                  false
XTerm*internalBorder:                   2
XTerm*borderWidth:                      1
XTerm*borderColor:                      #000000
XTerm*metaSendsEscape:                  true
XTerm*charClass:                        33:48,35:48,37:48,42:48,45-47:48,64:48,95:48,126:48
! disable alt+enter, use F11 to toggle fullscreen
! and use ctrl+shift+c/ctrl+shift+v to copy/paste
XTerm*VT100*translations:    #override \
        Alt <Key>Return: ignore() \n\
        <Key>F11: fullscreen(toggle) \n\
        Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
        Ctrl Shift <Key>V: insert-selection(CLIPBOARD)
Code:
! URxvt ------------------------------------------------
URxvt.loginShell:			true
URxvt.font:					xft:DejaVu\ Sans\ Mono:size=9
URxvt.depth:				32
URxvt.background:			[85]#0D0D0D
URxvt.foreground:			#ffffff
URxvt.borderColor:			[85]#0D0D0D
URxvt.cursorBlink:			false
URxvt.cursorUnderline:		false
URxvt.visualBell:			true
URxvt.geometry:				82x23
URxvt.saveLines:			15000
URxvt.internalBorder:		2
URxvt.letterSpace:			-2
URxvt.cutchars:				'"'()<>[]{}|=,;:&?*@^«»"'"
URxvt.tripleclickwords:		false
URxvt.skipBuiltinGlyphs:	false
URxvt.scrollTtyOutput:		false
URxvt.jumpScroll:			true
URxvt.scrollTtyKeypress:	true
URxvt.scrollWithBuffer:		true
URxvt.scrollBar:			false
URxvt.scrollBar_right:		false
URxvt.scrollBar_floating:	false
URxvt.scrollstyle:			next
URxvt.thickness:			10
! disable ctrl+shift key binding
URxvt.iso14755:				false
URxvt.perl-ext-common:		eval,selection-popup,option-popup
! map ctrl+shift+c/ctrl+shift+v to copy/paste and F11 to toggle fullscreen
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
URxvt.keysym.F11:			perl:fullscreen:switch
! emulate some XTerm key sequences
URxvt.keysym.Home:			\033[H
URxvt.keysym.End:			\033[F
URxvt.keysym.M-Home:		\033[1;3H
URxvt.keysym.M-End:			\033[1;3F
URxvt.keysym.M-Delete:		\033[3;3~
URxvt.keysym.M-Up:			\033[1;3A
URxvt.keysym.M-Down:		\033[1;3B
URxvt.keysym.M-Left:		\033[1;3D
URxvt.keysym.M-Right:		\033[1;3C
URxvt.keysym.C-Up:			\033[1;5A
URxvt.keysym.C-Down:		\033[1;5B
URxvt.keysym.C-Left:		\033[1;5D
URxvt.keysym.C-Right:		\033[1;5C
URxvt.keysym.S-Up:			\033[1;2A
URxvt.keysym.S-Down:		\033[1;2B
URxvt.keysym.S-Left:		\033[1;2D
URxvt.keysym.S-Right:		\033[1;2C
URxvt.keysym.C-S-Up:		\033[1;6A
URxvt.keysym.C-S-Down:		\033[1;6B
URxvt.keysym.C-S-Left:		\033[1;6D
URxvt.keysym.C-S-Right:		\033[1;6C
URxvt.keysym.S-M-Up:		\033[1;4A
URxvt.keysym.S-M-Down:		\033[1;4B
URxvt.keysym.S-M-Left:		\033[1;4D
URxvt.keysym.S-M-Right:		\033[1;4C
URxvt.keysym.C-M-Up:		\033[1;7A
URxvt.keysym.C-M-Down:		\033[1;7B
URxvt.keysym.C-M-Left:		\033[1;7D
URxvt.keysym.C-M-Right:		\033[1;7C
Note, I don't use scrollbar, because I use sysutils/tmux (my ~/.tmux.conf),
so if you need it, set XTerm/URxvt*scrollBar lines to "true".
 
Top