You are not logged in.

#1 2012-01-09 15:02:49

fm
Member
Registered: 2012-01-04
Posts: 12

[SOLVED] Bold monospace fonts and rendering

Hi everybody,

I chose to use the Inconsolata font (http://www.levien.com/type/myfonts/inconsolata.html) everywhere I need a monospace font.
However I have an issue with this setup. Since Inconsolata font doesn't have a bold variant, when "bolding" it, it gets rendered with a different width (it's not monospace anymore)

This happens, for example, inside an Eclipse editor or even in gEdit.

I've also noticed that in some applications (e.g., gnome-terminal or x-chat), bold is correctly displayed using the same width of the normal variant.

I've read the https://wiki.archlinux.org/index.php/Font_Configuration page and, in particular, the "disable autohinter for bold fonts". I actually don't use the auto-hinter so I tried different configuration but without luck.

Does anyone have an hint for solving this inconsistency?

Thanks.

P.S.: To better understand what I am talking about you can have a look at this image: http://imageshack.us/photo/my-images/85 … olata.png/

Last edited by fm (2012-01-14 21:41:36)

Offline

#2 2012-01-09 15:22:17

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] Bold monospace fonts and rendering

In your /etc/fonts/conf.avail, you should have a file called 90-synthetic.conf. Create a symbolic link to it in /etc/fonts/conf.d and check the result.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2012-01-09 16:05:24

fm
Member
Registered: 2012-01-04
Posts: 12

Re: [SOLVED] Bold monospace fonts and rendering

bohoomil wrote:

In your /etc/fonts/conf.avail, you should have a file called 90-synthetic.conf. Create a symbolic link to it in /etc/fonts/conf.d and check the result.

It was already there, so what I described is the behavior with that file already in my conf.d

Thanks

Offline

#4 2012-01-09 16:33:30

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: [SOLVED] Bold monospace fonts and rendering

You can try a slightly different version of the approach offered by Infinality patches -- it's working fine for me to force oblique Lucida Grande font. I presume you would have to install the patched version of freetype2, though. The fontconfig file is called 70-forced-synthetic.conf there.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#5 2012-01-09 16:59:16

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Bold monospace fonts and rendering

fm wrote:

I actually don't use the auto-hinter so I tried different configuration but without luck.

If the app doesn't use fontconfig, then changing fontconfig settings won't help wink

Offline

#6 2012-01-09 21:20:47

fm
Member
Registered: 2012-01-04
Posts: 12

Re: [SOLVED] Bold monospace fonts and rendering

brebs wrote:
fm wrote:

I actually don't use the auto-hinter so I tried different configuration but without luck.

If the app doesn't use fontconfig, then changing fontconfig settings won't help wink

That's clear. But gnome-terminal and gEdit aren't they supposed to use the same backend, i.e., fontconfig?
Because gnome-terminal works fine. gEdit doesn't.

Thanks.

Offline

#7 2012-01-09 21:24:28

fm
Member
Registered: 2012-01-04
Posts: 12

Re: [SOLVED] Bold monospace fonts and rendering

fm wrote:

That's clear. But gnome-terminal and gEdit aren't they supposed to use the same backend, i.e., fontconfig?
Because gnome-terminal works fine. gEdit doesn't.

Thanks.

Hmmm... Well, that could be a sign that the two don't use the same backend smile
So I will rephrase the question... How do I understand which backend is used by which application? Finally they are all GTK based (gEdit and also Eclipse via SWT)

Thanks.

Offline

#8 2012-01-14 21:41:23

fm
Member
Registered: 2012-01-04
Posts: 12

Re: [SOLVED] Bold monospace fonts and rendering

fm wrote:

Does anyone have an hint for solving this inconsistency?

I actually found a solution. Installing the infinality patched version of freetype will solve the issue.

After that, both gEdit and Eclipse render monospace fonts using the same width for nomal and bold.

Offline

Board footer

Powered by FluxBB