Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#12966 closed enhancement (fixed)

Using an updated freetype v2.7

Reported by: humdinger Owned by: jua
Priority: normal Milestone: Unscheduled
Component: Servers/app_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This is hrev50544. As discussed on the mailinglist in the thread freetype update from 2.6.5 to 2.7, Haiku could move to a newer version of freetype.

The TTF rendering is quite a bit different though. From stippi's post in the above thread, there are several things that need attention to get a nice font rendering out of v2.7:

I would propose to use the new hinting with actual sub-pixel rendering and also with horizontal sub-pixel positioning. This requires more changes than replacing Freetype, including changes to the glyph caching (multiple cache entries per glyph for different sub-pixel positions).

This ticket can be used to identify the areas that need attention in more detail (and to provide patches :) ).

For convenience, I also attach the archives with the comparing screenshots. Freetype v2.7 can be built with haikuporter.

Attachments (1)

freetype_old-new.zip (279.1 KB ) - added by humdinger 3 years ago.
Screenshots comparing old/new with DejaVu font

Download all attachments as: .zip

Change History (10)

by humdinger, 3 years ago

Attachment: freetype_old-new.zip added

Screenshots comparing old/new with DejaVu font

comment:1 by humdinger, 3 years ago

The archive with the screenshots comparing old and new freetype with different fonts is too large to be attached in Trac (over 8 MiB). You can still get it from my dropbox.

comment:2 by diver, 3 years ago

Might be of interest ticket:7797#comment:16.

comment:3 by humdinger, 3 years ago

We're using v2.7 for some time now (in fact v2.7.1 is out). The mentioned needed changes to hinting etc. are still open. Not sure, keep this ticket open for that or close it?

comment:4 by diver, 3 years ago

Owner: changed from axeld to jua
Status: newassigned

Last I heard jua wanted to work on this, let's ask him. :)

comment:5 by jua, 3 years ago

We can close this ticket for now. I experimented a bit with the glyph positioning, but with the current limitations we can't do much. Adding exact glyph positioning while using grayscale AA makes the text flow nicer, but also qutie a bit more blurry. As far as I can tell, to improve it we'd have to...

  • Ship RGB subpixel font rendering - but we don't do this for patent reasons
  • Get screens with >200 dpi, where subpixel rendering becomes obsolete due to the high pixel density. Such screens in desktop-sizes are finally available and increasingly affordable these days, but unfortunately we have no high-DPI support in app_server. Implementing that would be a larger effort - certainly post-R1.

If someone has other ideas for improving the font rendering, please open an enhancement ticket.

comment:6 by jua, 3 years ago

Resolution: fixed
Status: assignedclosed

comment:7 by pulkomandy, 3 years ago

For information, Ubuntu ignores the patents and enable the feature regardless. But, they are not owned by an US company. Fedora provides *-freeworld packages for countries not affected by the patents. Maybe we could do something similar, and have two alternative freetype packages? For this to work, we would have to make sure our code on app_server side does not need any changes, depending on which version of FreeType is used.

comment:8 by jua, 3 years ago

For this to work, we would have to make sure our code on app_server side does not need any changes, depending on which version of FreeType is used.

Nothing to do there, it just works as soon as you drop in a suitably compiled freetype package. Only change we might want to make is to detect whether this option is compiled in from the Appearance preflet - it will currently always show the text label that it's disabled, even when it isn't. (However, turning it on will still work, even when the label is shown.)

comment:9 by diver, 3 years ago

Maybe it's worth reopening #7797 after all?

Note: See TracTickets for help on using tickets.