Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fonts become fat over a certain size
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 372

PostPosted: Mon Jan 14, 2013 11:55 pm    Post subject: Fonts become fat over a certain size Reply with quote

Running Xfce here, and I don't understand much about how fonts work. Freetype has a zillion options, and newer versions with infinality introduce another zillion. Right now I'm using stable freetype with BCI and without infinality, my fonts look fine to me, and I only really have one problem.

They become bold over a certain size. Allow me to illustrate:

http://i.imgur.com/jsQba.png
http://i.imgur.com/gBWst.png

Boldness starts at size 9. This is at 142dpi, with AA, full hinting and sub-pixel rendering. None of these options make any difference.
As you can probably tell, this is very irritating. I can't use my browser's zoom function (which I really need at my dpi) because all the fonts become ... bold. Urgh.

Any ideas how I might fix this?


Last edited by haarp on Sun Jan 27, 2013 6:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jan 15, 2013 6:41 am    Post subject: Reply with quote

This is not a common problem.

Have you set a fontconfig rule to make fonts bold?

I recommend Infinality, for the best font rendering.
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 372

PostPosted: Tue Jan 15, 2013 9:15 am    Post subject: Reply with quote

Nope! eselect fontconfig is so confusing and undocumented that I didn't dare messing with it, so it's more or less all defaults.

I should add that the fonts are not actually bolded, they just appear thicker. Actually enabling boldness makes the fonts even bolder.
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 5281
Location: &akkara

PostPosted: Tue Jan 15, 2013 9:38 am    Post subject: Re: Fonts become bold over a certain size Reply with quote

haarp wrote:
... full hinting ...

That's the problem. "Hinting" causes the renderer to slightly perturb the font curves so that strokes land on the pixel grid as much as possible. This leads to sharper-looking fonts because the font edge and pixel edges coincide better.

But an artifact of hinting is that all strokes below a certain width become exactly one pixel thick.

When the font gets large enough (or, equivalently, the resolution goes up), that one-pixel stroke suddenly becomes two pixels wide (again, aligning to the pixel grid).

Solution: turn off hinting altogether. Some text will now look blurrier than you're used to. If you're having trouble reading it or get headaches, re-enable hinting at its lowest setting. 'Full' only looks good on monospaced fonts in xterms. It is terrible for any other kind of flowing well-typeset text.
_________________
echo 'long long long x;' | gcc -x c -c -
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 372

PostPosted: Tue Jan 15, 2013 9:45 am    Post subject: Reply with quote

Thanks, but that did exactly the opposite :P None or slight hinting makes everything thicker. Only medium or full hinting makes for nice and thin fonts, at least under the size 9 limit.
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 5281
Location: &akkara

PostPosted: Tue Jan 15, 2013 9:56 am    Post subject: Reply with quote

Well, then, that's what the font is supposed to look like. Or, possibly, there's a rendering bug, but I don't know how to help diagnose that.

Assuming the rendering is correct and you don't like how that font is showing, there's two choices:

Find a thinner font that better suits your preferences,

Or, "lie" to X and tell it you have a higher DPI than you actually do, then use a larger fontsize. The combination of higher dpi and larger fontsize should keep the physical size of the glyph roughly the same. But larger fonts have proportionally more whitespace then smaller ones (at least, traditionally - printers found that making small fonts bolder makes them easier to read). So by using a larger font but causing it to render smaller, should help your "too thick" problem.
_________________
echo 'long long long x;' | gcc -x c -c -
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 372

PostPosted: Tue Jan 15, 2013 11:13 am    Post subject: Reply with quote

That bolding problem also applies to other fonts. Not all of them, but many. Additionally, websites can choose their own fonts, which makes it impossible to just "find another" :? I could override all website fonts, but that'd be awfully complicated to work around a rendering issue.
I'd rather keep my dpi, too. It's the correct dpi value for my screen, after all.


I have tried infinality again. It looks terrible. It causes fat, blurry fonts that need more space and are harder to read than the thin, sharp ones I prefer. They also bleed color when sub-pixel rendering is used.
I played around with eselect lcdfilter and eselect infinality, to no avail. I have absolutely no idea what I'm doing. Having two separate eselects (three! if you count eselect fontconfig) that both somehow modify the way fonts are rendered with no documentation or explanations whatsoever is ridiculously confusing. I tried a few combinations, but none restored the sharp non-infinality looks.
And there's no way to preview how the fonts will be rendered, without restarting programs each and every time a setting is changed.

I really must conclude that the state of font management is still far from perfect :/

Sometimes I wish everything was still bitmap fonts.
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 5281
Location: &akkara

PostPosted: Tue Jan 15, 2013 12:17 pm    Post subject: Reply with quote

I just tried your experiment here, using gnome-character-map. My fonts look exactly as yours, with the same thickness jump from 8-point to 9-point. (I'm running at 144 dpi, very close to yours).

It seems small-point fonts are handled somewhat differently than larger ones. Guess I never noticed because I don't use fonts larger than 8-point.

I'm not sure what's going on yet. Sorry I could not be of more help.
_________________
echo 'long long long x;' | gcc -x c -c -
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 372

PostPosted: Tue Jan 15, 2013 1:37 pm    Post subject: Reply with quote

Thank you for trying, though!

I think the problem is that "thickening" is supposed to occur at bigger font sizes (e.g. size 15 or something), but due to our high dpi, occurs between 8 and 9.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jan 15, 2013 5:15 pm    Post subject: Reply with quote

haarp wrote:
fat, blurry fonts that need more space and are harder to read than the thin, sharp ones I prefer

Did you not play with e.g. INFINALITY_FT_FILTER_PARAMS? Come on.
Code:
# Freetype Light       "00 33 34 33 00"  (sharp, natural weight)         # freetype's "light" LCD filter
# Freetype Default     "06 25 44 25 06"  (sharp, extra weight)           # freetype's default
# Extra Sharp          "00 35 35 35 00"  (extra sharp, extra weight)     # freetype's "light" LCD filter on acid


You really need to spend more time with the various options. They are there because it is not easy to get good-looking fonts, bearing in mind that the person's eyesight might be bad, or the monitor bad, and fonts are all of varying qualities.

Try a Ubuntu LiveCD, to see if Ubuntu's font rendering and fontconfig rules look good to you - if you like them, copy Ubuntu's patches into Gentoo.
Back to top
View user's profile Send private message
haarp
Guru
Guru


Joined: 31 Oct 2007
Posts: 372

PostPosted: Sun Jan 27, 2013 4:35 pm    Post subject: Reply with quote

Wait. So not only do I get 3 different eselects, I now also have to tweak environment variables? Dear Linus!

Since freetype with the infinality useflag has recently become stable, I gave it another go. I still have no idea what I'm doing, and can still find no documentation. Could somebody please explain to me what eselect infinality and eselect lcdfilter actually do and how they interact?

Edit: Well, I tried just about every combination of eselects and INFINALITY_FT_FILTER_PARAMS, but none give me slim, sharp fonts. It also somehow adds serifs to my Monospace font (?!)

Edit2: Screw infinality. I'm going back to my sharp, suddenly-becoming-fat fonts.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2515
Location: UK

PostPosted: Sun Jan 27, 2013 7:27 pm    Post subject: Reply with quote

Most of the Infinality preset configs do rude things like forcing certain fonts for all monospace/sans/serif, forcing 96dpi, etc. You're better off disabling its main fontconfig file and adding the bits you want manually.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum