Ticket #2753 (closed bug: invalid)

Opened 10 months ago

Last modified 6 months ago

Subpixel antialiasing doesn't work with hinting on

Reported by: idefix Owned by: stippi
Priority: normal Milestone: R1
Component: User Interface Version: R1 development
Cc: Blocked By:
Platform: x86 Blocking:

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 r27600 under VMware.

Attachments

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

Change History

Changed 10 months ago by idefix

Grayscale antialiasing with character hinting on.

Changed 10 months ago by idefix

Subpixel antialiasing with character hinting on.

Changed 10 months ago by idefix

Grayscale antialiasing with character hinting off.

Changed 10 months ago by idefix

Subpixel antialiasing with character hinting off.

  Changed 10 months ago by stippi

  • status changed from new to assigned

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.

  Changed 10 months 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.

  Changed 10 months 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. :-)

  Changed 10 months ago by stippi

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r27635.

  Changed 10 months ago by idefix

  • status changed from closed to reopened
  • resolution fixed deleted

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.

  Changed 10 months ago by axeld

  • status changed from reopened to closed
  • resolution set to fixed

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.

  Changed 10 months ago by stippi

Ok, fixed again in r27653. 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>

;-)

  Changed 10 months ago by idefix

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

  Changed 10 months ago by axeld

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

Changed 8 months ago by nutela

Hinting and Sub pixel antialiasing both on

  Changed 8 months ago by nutela

  • status changed from closed to reopened
  • platform changed from All to x86
  • resolution fixed deleted

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.

  Changed 8 months ago by nutela

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

  Changed 8 months ago by stippi

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

  Changed 8 months 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.

  Changed 8 months ago by axeld

  • status changed from reopened to closed
  • resolution set to invalid

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.

  Changed 8 months ago by nutela

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

  Changed 6 months ago by idefix

  • status changed from closed to reopened
  • resolution invalid deleted

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

  Changed 6 months ago by umccullough

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

follow-up: ↓ 19   Changed 6 months ago by nutela

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

in reply to: ↑ 18   Changed 6 months 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 r28886.

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

  Changed 6 months ago by anevilyak

  • status changed from reopened to closed
  • resolution set to invalid
Note: See TracTickets for help on using tickets.