Opened 11 years ago

Closed 10 years ago

#2753 closed bug (invalid)

Subpixel antialiasing doesn't work with hinting on

Reported by: idefix Owned by: stippi
Priority: normal Milestone: R1
Component: User Interface Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86

Description

When 'Character hinting' is set to 'On', it doesn't matter what "Antialiasing type" is set to: the font rendering is the same.
Only when 'Character hinting' is set to 'Off', you'll see different font rendering: see attached screenshots of Appearance.

Tested with hrev27600 under VMware.

Attachments (5)

Gray-on.png (11.4 KB) - added by idefix 11 years ago.
Grayscale antialiasing with character hinting on.
Sub-on.png (11.7 KB) - added by idefix 11 years ago.
Subpixel antialiasing with character hinting on.
Gray-off.png (15.6 KB) - added by idefix 11 years ago.
Grayscale antialiasing with character hinting off.
Sub-off.png (18.8 KB) - added by idefix 11 years ago.
Subpixel antialiasing with character hinting off.
Appearance (11.6 KB) - added by nutela 10 years ago.
Hinting and Sub pixel antialiasing both on

Download all attachments as: .zip

Change History (25)

Changed 11 years ago by idefix

Attachment: Gray-on.png added

Grayscale antialiasing with character hinting on.

Changed 11 years ago by idefix

Attachment: Sub-on.png added

Subpixel antialiasing with character hinting on.

Changed 11 years ago by idefix

Attachment: Gray-off.png added

Grayscale antialiasing with character hinting off.

Changed 11 years ago by idefix

Attachment: Sub-off.png added

Subpixel antialiasing with character hinting off.

comment:1 Changed 11 years ago by stippi

Status: newassigned

You have to enable patented code in libfreetype for it to work with hinting on. See headers/libs/freetype2/freetype/config/ftoption.h for more info. In another words, you have to build your own Haiku image, since this option is not enabled in the source repository. The preflet should mention this, so I leave the bug open.

comment:2 Changed 11 years ago by axeld

Shouldn't the option better be removed (or at least disabled) depending on whether or not you compiled support for this into freetype? You could just include the ftoption.h header, and check for it.

comment:3 Changed 11 years ago by stippi

Yes, that's what I am doing right now. :-) That's why I assigned the bug to me and didn't close it. :-)

comment:4 Changed 11 years ago by stippi

Resolution: fixed
Status: assignedclosed

Fixed in hrev27635.

comment:5 Changed 11 years ago by idefix

Resolution: fixed
Status: closedreopened

Uhm yes, but this 'fix' completely removes all the options.
I mainly use Haiku with hinting off: on my LCD-monitor with Subpixel antialiasing on and on my CRT-monitor with Grayscale antialiasing. Now I can't choose these options anymore.

A much better solution would have been to allow the 'Subpixel+hinting'-option, but display a text in the space under the controls describing why this option doesn't work.

comment:6 Changed 11 years ago by axeld

Resolution: fixed
Status: reopenedclosed

The option is shown only when you've compiled that feature in. No need to bother you if it's not available anyway, and no one asks you to build Haiku yourself either.

comment:7 Changed 11 years ago by stippi

Ok, fixed again in hrev27653. As idefix is pointing out, only a certain combination of features is unavailable. As seems to be the case for him, some people like to hurt their eyes and have fonts blurry by disabling hinting. That of course makes glyph shapes more truthfully to the font, the same philosophy is witnessed by MacOS X on-screen font rendering... <shrug>

;-)

comment:8 Changed 11 years ago by idefix

Thanks stippi, for making me able to torture my eyes again! :)

comment:9 Changed 11 years ago by axeld

Sorry for the premature closing, I obviously misread this one.

Changed 10 years ago by nutela

Attachment: Appearance added

Hinting and Sub pixel antialiasing both on

comment:10 Changed 10 years ago by nutela

Platform: Allx86
Resolution: fixed
Status: closedreopened

Uncommented line in headers/libs/freetype2/freetype/config/ftoption.h but both hinting and LCD subpixel antialiasing set to on leaves fonts only grayscale even if filter strength is set to off see screenshot attachment.

comment:11 Changed 10 years ago by nutela

forgot to mention rev 28589, maybe a mandatory trac field would be handy

comment:12 Changed 10 years ago by stippi

I can assure you it works, because I use it all the time. What option exactly have you enabled?

comment:13 Changed 10 years ago by nutela

I uncommented /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ in http://svn.berlios.de/svnroot/repos/haiku/haiku/trunk/headers/libs/freetype2/freetype/config/ftoption.h and rebuild Haiku. The message about the MS patent in Appearance is now gone but as you can see from the screenshot fonts are still rendered grayscale only. With hinting off I can clearly see LCD subpixel does work.

comment:14 Changed 10 years ago by axeld

Resolution: invalid
Status: reopenedclosed

You need to remove all previous FreeType objects before building it after this change. Ie. a "rm -rf generated/objects/haiku/x86/release/libs/freetype2" should do the trick.

comment:15 Changed 10 years ago by nutela

Yes, it works after I deleted the objects, thanks. It looks better then great, that means terrific!

comment:16 Changed 10 years ago by idefix

Resolution: invalid
Status: closedreopened

Looks like changeset:28837 broke Subpixel antialiasing, text is always rendered with Grayscale antialiasing.
Tested with hrev28862.

comment:17 Changed 10 years ago by umccullough

Just a note: It's generally considered bad practice to re-open old bugs for new regressions.

comment:18 Changed 10 years ago by nutela

rev 28859 subpixel anti-aliasing is working correctly looks like it wasn't changeset:28837

comment:19 in reply to:  18 Changed 10 years ago by idefix

Replying to umccullough:

Just a note: It's generally considered bad practice to re-open old bugs for new regressions.

Sorry, I won't do that again.

Replying to nutela:

rev 28859 subpixel anti-aliasing is working correctly looks like it wasn't changeset:28837

You're right, I made a mistake here. Subpixel antialiasing is working correctly with hrev28886.

This ticket can be closed again. This time for good! :)

comment:20 Changed 10 years ago by anevilyak

Resolution: invalid
Status: reopenedclosed
Note: See TracTickets for help on using tickets.