How are you supposed to configure font rendering?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

Post Reply
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

How are you supposed to configure font rendering?

Post by Bregalad »

So, Koitsu had a grudge against font smoothing and he thinks it makes his eyes bleed.

I am now unsing GNU/Linux with a Cinnamon graphical interface. It allows configuration on font rendering on muliple parameters :
  • Filtering, can be set to "off", "grayscale" or "RGBA"
  • Hinting, can be set to "none", "small", "average" or "full"
I do not understand how this works, especially the hinting part. I also did not understand which of those two settings had Koitsu a grudge against. How am I supposed to configure that so that it looks optimal ?
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: How are you supposed to configure font rendering?

Post by lidnariq »

"Filtering" is antialiasing.
"off" is classic bilevel rendering. Without fonts designed for it, it doesn't look very good anymore.
"greyscale" is just that: antialiasing through the foreground and background colors.
"RGBA" is subpixel rendering, which looks terrible if you're attuned to it. (And terrible regardless of whether you're attuned to it if the display you're viewing it on doesn't have the same RGB subpixel spacing as the one it was rendered for)
→ "RGBA" should open another option for "in which direction are your subpixels oriented", specifically one of RGB left-to-right, right-to-left, up-to-down, and down-to-up.

"Hinting" is how much vertical, horizontal, and specific angles (45°, 63°) of strokes are shifted to align to the pixel grid.

I personally use "greyscale" and "full", and wish there was a "even more" setting for hinting.
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: How are you supposed to configure font rendering?

Post by Sik »

Hinting is the special instructions included in the font itself, full hinting means to apply absolutely everything encoded in the font exactly as the font designer intended. If that doesn't look good enough then your grudge is against the designer, not the software =P (this is also the stuff that was avoided like the plague until not long ago because it was patented, argh) Also be careful, hinting does not play nice with some kind of antialiasing...

And eh, not sure how useful subpixel rendering is anymore, seeing as some screens don't even have a straightforward pattern.
https://en.wikipedia.org/wiki/Pixel_geometry
https://en.wikipedia.org/wiki/PenTile_matrix_family

Subpixel rendering was just a hack to get antialiasing without actually going through the antialiasing calculations anyway =/ (as text rendering is already slow per-se)
User avatar
Banshaku
Posts: 2404
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: How are you supposed to configure font rendering?

Post by Banshaku »

To have a non anti-aliased look similar to windows XP I put the hinting at full, set the font to tahoma (you need to install it), install QT4/5 tools to configure the font of apps, add a .font.conf to deactivate aliasing and in 95% of the case it looks quite good. The only issue I have is some fonts used in web pages were never meant to be used anti-aliased so they looks not great.

Except for that, I have a Linux that looks similar to raster font in older windows, something I couldn't do properly in windows 10 anyway so I'm quite happy this way. I can share the file later if required.
User avatar
mikejmoffitt
Posts: 1352
Joined: Sun May 27, 2012 8:43 pm

Re: How are you supposed to configure font rendering?

Post by mikejmoffitt »

I made a fonts.conf that enables AA for fonts above 14pt, so big web fonts without hinting instructions can look okay, while the rest resembles Windows 2000.

Liberation family has good hinting instructions.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: How are you supposed to configure font rendering?

Post by Bregalad »

Sik wrote:Also be careful, hinting does not play nice with some kind of antialiasing...
Well, it works great for me to have both enabled at the same time.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How are you supposed to configure font rendering?

Post by tepples »

Not every type designer has the time to handmake hints, especially for free fonts. Instead, they rely on the autohinter built into FreeType, and then they bake the automatic hints into the font using something like ttfautohint. But nowadays, autohinters are designed to output hints for at least grayscale rendering, not 1-bit. From a notice at the bottom of ttfautohint's news page:
There is one exception: The autohinter no longer tries to provide good hinting for monochrome rasterization. Instead, it expects anti-aliasing with 256 gray levels, which became standard with Windows 98.
I assume this is because displays that benefit from 1-bit are largely a thing of the past (see "98"), and only a slim minority (like koitsu) prefer 1-bit rendering on displays capable of "true color" (8 bits per channel).
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How are you supposed to configure font rendering?

Post by Dwedit »

I thought this page had some great information about a new way (2006) to do font rasterization.
On the X axis, use subpixel rendering, and use fractional coordinates for text characters.
On the Y axis, use font hinting for Y coordinate only, and use integer coordinates for the top and bottom of the character.

Image

It can put text at any horizontal subpixel and look great.
And this avoids the problems with font sizes not being exactly proportional to each other.

The page also mentions how important proper gamma correction is for grayscale antialiasing of fonts.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Banshaku
Posts: 2404
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: How are you supposed to configure font rendering?

Post by Banshaku »

mikejmoffitt wrote:I made a fonts.conf that enables AA for fonts above 14pt, so big web fonts without hinting instructions can look okay, while the rest resembles Windows 2000.

Liberation family has good hinting instructions.
My script is basically this one but with the error fixed (they forgot to close the last tag)

http://www.linuxhowtos.org/Tips%20and%2 ... oxnoaa.htm

I want to see your script, if you don't mind, I want to learn more on the subject. One place were the font issue can be tested is the chrome webstore with chrome. The site looks not great. Many sites seems to use the same font as google so maybe if I can fix that site without overwritting font like in firefox, most problematic sites may be fixed. The only ones that may not be possible is for japanese site but I guess I will have to live with it or create a different account on my box with aliased enabled for those case ;)

@Bregalad

Except for the font issue, how is your box going? Were you able to install most of your tools?
Post Reply