Opened 16 years ago

Closed 16 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:
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 16 years ago.
Grayscale antialiasing with character hinting on.
Sub-on.png (11.7 KB ) - added by idefix 16 years ago.
Subpixel antialiasing with character hinting on.
Gray-off.png (15.6 KB ) - added by idefix 16 years ago.
Grayscale antialiasing with character hinting off.
Sub-off.png (18.8 KB ) - added by idefix 16 years ago.
Subpixel antialiasing with character hinting off.
Appearance (11.6 KB ) - added by nutela 16 years ago.
Hinting and Sub pixel antialiasing both on

Download all attachments as: .zip

Change History (25)

by idefix, 16 years ago

Attachment: Gray-on.png added

Grayscale antialiasing with character hinting on.

by idefix, 16 years ago

Attachment: Sub-on.png added

Subpixel antialiasing with character hinting on.

by idefix, 16 years ago

Attachment: Gray-off.png added

Grayscale antialiasing with character hinting off.

by idefix, 16 years ago

Attachment: Sub-off.png added

Subpixel antialiasing with character hinting off.

comment:1 by stippi, 16 years ago

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 by axeld, 16 years ago

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 by stippi, 16 years ago

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 by stippi, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev27635.

comment:5 by idefix, 16 years ago

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 by axeld, 16 years ago

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 by stippi, 16 years ago

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 by idefix, 16 years ago

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

comment:9 by axeld, 16 years ago

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

by nutela, 16 years ago

Attachment: Appearance added

Hinting and Sub pixel antialiasing both on

comment:10 by nutela, 16 years ago

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 by nutela, 16 years ago

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

comment:12 by stippi, 16 years ago

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

comment:13 by nutela, 16 years ago

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 by axeld, 16 years ago

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 by nutela, 16 years ago

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

comment:16 by idefix, 16 years ago

Resolution: invalid
Status: closedreopened

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

comment:17 by umccullough, 16 years ago

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

comment:18 by nutela, 16 years ago

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

in reply to:  18 comment:19 by idefix, 16 years ago

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 by anevilyak, 16 years ago

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