#7797: [app_server] Alternative implementation of subpixel rendering (patch) ----------------------------------+---------------------------- Reporter: diver | Owner: leavengood Type: bug | Status: in-progress Priority: normal | Milestone: R1 Component: Servers/app_server | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------------------+---------------------------- Comment (by pulkomandy): Hi, It's time to review this again... The page about patents at Freetype homepage has some information: http://freetype.sourceforge.net/patents.html So, the patent is only on the subpixel filter is patented: {{{ using a different colour filter thus circumvents Microsoft's patent claims. }}} We have our own filter already, which works rather well and has the nice feature of having this slider to allow adjusting the color fringes. Since it is a custom filter, I don't see any reason to disable it when font hinting is enabled. Now on the freetype compilation options. There are two of them. {{{ /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */ /* EXPERIMENTAL subpixel hinting support into the TrueType driver. This */ /* replaces the native TrueType hinting mechanism when anything but */ /* FT_RENDER_MODE_MONO is requested. */ /* */ /* Enabling this causes the TrueType driver to ignore instructions under */ /* certain conditions. This is done in accordance with the guide here, */ /* with some minor differences: */ /* */ /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */ /* */ /* By undefining this, you only compile the code necessary to hint */ /* TrueType glyphs with native TT hinting. */ /* */ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* defined. */ /* */ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ }}} {{{ /*************************************************************************/ /* */ /* Uncomment the line below if you want to activate sub-pixel rendering */ /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ /* */ /* Note that this feature is covered by several Microsoft patents */ /* and should not be activated in any default build of the library. */ /* */ /* This macro has no impact on the FreeType API, only on its */ /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ /* the original size in case this macro isn't defined; however, each */ /* triplet of subpixels has R=G=B. */ /* */ /* This is done to allow FreeType clients to run unmodified, forcing */ /* them to display normal gray-level anti-aliased glyphs. */ /* */ /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ }}} We are disabling both of these, but I think we should disable only the second one. This way, the API for subpixel hinting is available and does not lead an error, and app_server can enable it. Then we are able to only replace the freetype package if we want to enable the Microsoft patented algorithm. -- Ticket URL: <https://dev.haiku-os.org/ticket/7797#comment:18> Haiku <https://dev.haiku-os.org> Haiku - the operating system.