WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Font improvements in ~/.Xdefaults  (Read 580 times)

Offline PDP-8

  • Full Member
  • ***
  • Posts: 126
Font improvements in ~/.Xdefaults
« on: May 17, 2017, 03:49:45 PM »
I'm no font expert, but wondered if the following additions to my own .Xdefaults has any glaring issues.  This is mainly for the standard TC fltk interface/utils.

It seems to have made a nice difference, but I don't want to fool myself especially after staring at the screen for 6 hours with these tired eyes. :)

Appended to ~/.Xdefaults:

fltk*scheme: gleam   <--my favorite eye candy theme

Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

Again, I *think* I have made improvements, but after too many hours, with these tired eyes, I don't want to fool myself.

cat -v Considered Harmful  -- Rob Pike

Offline PDP-8

  • Full Member
  • ***
  • Posts: 126
Re: Font improvements in ~/.Xdefaults
« Reply #1 on: December 11, 2017, 06:16:48 PM »
Update:  found a solution with scaled fonts instead.

Even though my go-to quickies of using

aterm -fn 10x20
or
aterm -fn 12x24

got me up and running, I wanted even larger grandpa-sized fonts. :)  Sacrificing just a little bit of size vs scaling jaggies, the font line in .Xdefaults now looks like this:

Code: [Select]
aterm*font:*-*-fixed-medium-r-normal--*-280-*-*-*-*-iso8859-1
This is adjusting the font's via the point size option.  Alternatively one could use the pixel-size specificity order something like this:

Code: [Select]
aterm*font:*-*-fixed-medium-r-normal--42-*-*-*-*-*-iso8859-1
For me, with a default stock install of TC64, using the 280 point size option is pleasant enough to use for me.  Need to eat more carrots. :)

cat -v Considered Harmful  -- Rob Pike

Offline PDP-8

  • Full Member
  • ***
  • Posts: 126
Re: Font improvements in ~/.Xdefaults
« Reply #2 on: December 12, 2017, 11:33:13 PM »
Stoked!  Just found out about rxvt / urxvt (didn't want to load up with lxterminal or xfce4 terminal and the like).

Also downloaded a truetype ttf font like DejaVu.   Easily configured just like aterm in ~.Xdefaults.

Some of my relevant ~.Xdefaults lines:

Code: [Select]
urxvt*font:xft:DejaVu Sans Mono: size=14
urxvt*background: black
urxvt*foreground: white
urxvt*scrollBar: false    <----- note the capital "B"!
Xft*antialias: true
Xft*hinting: true
Xft*hintstyle: hintfull

Many more options but I won't go any further.  I didn't want to load up on things like lxterminal or xfce-4 terminal and think I found my home with urxvt.

Sorry to seem like I'm blogging - I was just banging my head against the wall trying to keep things ultra-light yet still looking good for my eyes on a variety of hardware.  TC is now here to stay with me for a loooong time!

« Last Edit: December 12, 2017, 11:41:22 PM by PDP-8 »
cat -v Considered Harmful  -- Rob Pike

Offline PDP-8

  • Full Member
  • ***
  • Posts: 126
Re: Font improvements in ~/.Xdefaults
« Reply #3 on: December 13, 2017, 03:33:45 AM »
Update:
If you try opening *some* programs with urxvt like I did with a 32 bit install from CorePlus and a subsequent download and install of urxvt / rxvt, you may get the error:

Error opening terminal: rxvt-unicode

If that happens, append this to your ~/.ashrc file:
Code: [Select]
TERM=rxvt
I was trying to open programs like nano, htop, sc etc yet things like busybox and even the bc calculator had no problem.  Modifying the .ashrc file fixed it.

« Last Edit: December 13, 2017, 03:39:56 AM by PDP-8 »
cat -v Considered Harmful  -- Rob Pike

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1600
Re: Font improvements in ~/.Xdefaults
« Reply #4 on: December 13, 2017, 07:52:05 AM »
I prefer rxvt-unicode / urxvt, too, but it has its flaws.
I came up with this addition to .ashrc to fix startup of certain programs
Code: [Select]
case $- in *i*) ### Interactive shell.
        case "$TERM" in
                xterm*|rxvt*)
                        [ "$TERM" == "rxvt-unicode" ] && { export LC_CTYPE="de_DE.UTF-8" ; printf "\33]701;$LC_CTYPE\007" ; }  ### URxvt Stuff
                        PS1='blabla my prompt'
                ;;
                *) ### Any other terminal
                        PS1='blabla my simpler prompt'
                ;;
        esac
        export PS1
;;
esac

Download a copy and keep it handy: Core book ;)

Offline andyj

  • Hero Member
  • *****
  • Posts: 537
Re: Font improvements in ~/.Xdefaults
« Reply #5 on: December 15, 2017, 10:47:06 AM »
I'm currently testing some patches to rxvt from ArchLinux for font rendering. Along with an updated DejaVu Mono fonts it looks a lot better than the unifont, and appears to have the same languages supported. Unifont 10 is on the left, DejaVu is on the right. You'll need to look at the image full size to see the difference.


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9665
Re: Font improvements in ~/.Xdefaults
« Reply #6 on: December 15, 2017, 12:04:27 PM »
X fonts fall back (in the more advanced APIs), if the current font does not have a glyph then other fonts are searched.
The only barriers that can stop you are the ones you create yourself.