You are not logged in.

#1 2015-04-03 07:20:16

aport
Member
From: San Diego
Registered: 2008-02-20
Posts: 99

Font rendering very different in some applications

I've had this problem for a long time, on all my machines, and I'd like to know if there's a way to fix it.

Basically, fonts look *great* in gnome-terminal. Like, really nice (IMO). But fonts in some other applications, like Emacs, are stretched. Same font used, same size.

Here's an example:
http://i.imgur.com/BvRN7pn.png

You can see on the left that the font in Emacs is taller.

Anyone know why there's a big difference in how these applications render fonts and/or how to fix it?

Thank you!

Offline

#2 2015-04-03 08:25:40

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,962
Website

Re: Font rendering very different in some applications

I had a situation where chromium and firefox were rendering fonts differently. I solved it by deleting ~/.config/fontconfig/fonts.conf

Offline

#3 2015-04-03 16:01:42

aport
Member
From: San Diego
Registered: 2008-02-20
Posts: 99

Re: Font rendering very different in some applications

That file does not exist on my machines.

Some more details:

Setting font hinting to "none" corrects the font stretching, however it also makes fonts look like garbage.
With font hinting to "slight", DejaVu Sans Mono 11 is stretched in emacs, but looks great in gnome-terminal and GVim.

I assume these programs are using different font rendering backends? Anyone know?

Last edited by aport (2015-04-03 16:02:08)

Offline

#4 2015-04-03 19:09:56

aport
Member
From: San Diego
Registered: 2008-02-20
Posts: 99

Re: Font rendering very different in some applications

Okay... using M-x describe-font

DejaVu Sans Mono-11 with font hinting set to "slight":

name (opened by): -unknown-DejaVu Sans Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1
       full name: DejaVu Sans Mono:pixelsize=15:foundry=unknown:weight=normal:slant=normal:width=normal:spacing=100:scalable=true
       file name: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
            size: 15
          height: 19
 baseline-offset:  0
relative-compose:  0
  default-ascent:  0
          ascent: 14
         descent:  5
   average-width:  9
     space-width:  9
       max-width:  9

And with font hinting set to "none"

name (opened by): -unknown-DejaVu Sans Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1
       full name: DejaVu Sans Mono:pixelsize=15:foundry=unknown:weight=normal:slant=normal:width=normal:spacing=100:scalable=true
       file name: /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
            size: 15
          height: 18
 baseline-offset:  0
relative-compose:  0
  default-ascent:  0
          ascent: 14
         descent:  4
   average-width:  9
     space-width:  9
       max-width:  9

So... changing the font hinting makes the font taller in emacs. Other applications (like gnome-terminal) don't do this. What's going on?

Offline

Board footer

Powered by FluxBB