LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-10-2017, 05:51 PM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
font rendering in different terminals


I've noticed that some times the same font will render differently depending on the terminal being used.

I've uploaded a picture here: https://prnt.sc/gjkfrg

In the linked picture, I have xfce4-terminal and urxvt. I've had trouble getting that font (Bitstream Vera Sans Mono) to render in previous distros, but setting font hinting fixed it. Not this time, at least in xterm and urxvt. I use the same font in a text editor and it renders correctly there.

I guess my question is, why do some terminals handle fonts differently?

Last edited by jr_bob_dobbs; 09-10-2017 at 05:53 PM.
 
Old 09-10-2017, 10:37 PM   #2
Myk267
Member
 
Registered: Apr 2012
Location: California
Posts: 422
Blog Entries: 16

Rep: Reputation: Disabled
It looks like xfce4-terminal is rendering with full hinting and urxvt is using slight hinting. It seems that a few programs like URxvt just don't use fontconfig like most programs: https://wiki.archlinux.org/index.php...config_support

Edit: Even after you get that sorted out, I suspect you might even find that URxvt renders fonts with slightly different spacing than a lot of other terminals. There's some polite disagreement about this on the URxvt mailing lists. There's also patches to "fix" it, but you'll have to hunt around for them, if you dare going down that route.

Last edited by Myk267; 09-10-2017 at 10:41 PM.
 
Old 09-11-2017, 11:21 AM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by Myk267 View Post
Even after you get that sorted out, I suspect you might even find that URxvt renders fonts with slightly different spacing than a lot of other terminals. There's some polite disagreement about this on the URxvt mailing lists. There's also patches to "fix" it, but you'll have to hunt around for them, if you dare going down that route.
I stopped using urxvt ages ago due to that kerning issue.

xterm renders fonts differently because it relies more on your X resource settings. You probably want an .Xresources file with the following:

Code:
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
If you use a GTK or Qt-based terminal (I like either termite, or terminator 1.91), its font rendering should be more consistent with what GTK and Qt-based apps are showing.

Last edited by dugan; 09-11-2017 at 11:25 AM.
 
Old 09-25-2017, 10:37 PM   #4
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Thank you, everyone, for the replies. Between those, plus much googling and a great deal of Trial And Error, I've actually got both xterm and uxvrt to render that font the way I like.

This parameter was crucial in xterm command line:
Code:
-fa "xft:DejaVu Sans Mono:pixelsize=16:hinting=true:hintstyle=hintfull"
and for urxvt:
Code:
-fn "xft:Bitstream Vera Sans Mono:pixelsize=16:hinting=true:hintstyle=hintfull"
Note: neither one of those is the complete command line: lots of things for setting colors & stuff omitted for clarity.

note: I've also got settings in several files, but the font would not render until I added those parameters to the call of xterm and urxvt. Files created/modified: XTerm, .Xresource and .Xdefaults. The point is, between all of the interactions, maybe those parameters won't work on every system?

Last edited by jr_bob_dobbs; 09-25-2017 at 10:42 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone that understand about font rendering please moisespedro Slackware 2 12-07-2014 11:26 AM
crunchbang font rendering? tknpz Linux - Newbie 0 05-20-2013 05:44 PM
Font rendering in Linux sidecarmike Linux - Newbie 5 02-05-2010 11:03 AM
Again Font Rendering snitko Linux - Desktop 1 02-24-2007 01:34 AM
Font rendering (again) fasta Slackware 5 11-12-2003 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration