FS#60658 - [freetype2] Enable Cleartype by default now that MS has joined the OIN
Attached to Project:
Arch Linux
Opened by Alexandre Demers (oxalin) - Wednesday, 31 October 2018, 13:44 GMT
Last edited by Jan Alexander Steffens (heftig) - Thursday, 08 June 2023, 19:27 GMT
Opened by Alexandre Demers (oxalin) - Wednesday, 31 October 2018, 13:44 GMT
Last edited by Jan Alexander Steffens (heftig) - Thursday, 08 June 2023, 19:27 GMT
|
Details
Description:
Cleartype Subpixel rendering is disabled by default in Freetype2 because of legal concerns. Users must rely on Freetype2-cleartype to have this feature enabled. However, now that Microsoft has joined the Open invention network (OIN), bringing over 60000 patents with it, it seems possible to enable cleartype without risking any legal action. In fact, Fedora is enabling the feature exactly because of Microsoft joining the OIN. See this news: https://www.phoronix.com/scan.php?page=news_item&px=Fedora-ClearType-Subpixel-Font |
This task depends upon
Closed by Jan Alexander Steffens (heftig)
Thursday, 08 June 2023, 19:27 GMT
Reason for closing: Implemented
Additional comments about closing: 2.10.3-1
Thursday, 08 June 2023, 19:27 GMT
Reason for closing: Implemented
Additional comments about closing: 2.10.3-1
Really, the experience is much better without. The free version doesn't have to mess with LCD filters where half the font stack defaults to the absolutely horrible "legacy" filter.
I did tests for the past few months when I got a UHD monitor and in my opinion, ~185 dpi (24inch 4k) and above, you don't need subpixel rendering at all. At lower dpi's I would test with subpixel enabled and LCD filter and see if it brings improvements with acceptable color fringing (examine very small size and very large texts to see difference). But you still need to compile freetype with FT_CONFIG_OPTION_SUBPIXEL_RENDERING to test/activate subpixel rendering since as mentioned above, upstream default is subpixel like and not subpixel (cleartype) rendering actually.
If you want to nitpick, then neither the free nor the patented implementation in FreeType work like ClearType does.
Just to make it clearer, toggling FT_CONFIG_OPTION_SUBPIXEL_RENDERING does not lead to better or worse subpixel rendering (careful: "ClearType" is an umbrella/marketing term that differs in meaning depending on which Windows GUI toolkit you look at -- yes, Microsoft made more than one and they are all in use somewhere). If the #define is undefined, you get what its author dubbed "Harmony" rendering, which is essentially the same as toggling FT_CONFIG_OPTION_SUBPIXEL_RENDERING on and selecting the `lcdlight` LCD filter in fontconfig. I think the only way to tell both modes apart is to look for rounding errors in the resulting image. The Harmony "filter" is not configurable because it is essentially the lcdlight filter cast into code, trying not to do things in the way "ClearType" does them.
The "problem" with these different modes, or LCD filters, is that how well they work depends on the library drawing text on a surface in an application, your monitor (plus its calibration) and on your eyes. Correct text rendering is absolutely crucial to prevent color fringes. Do text rendering correctly and you will see very little color fringing! Sadly, only Qt5.9+ render text correctly, and only when rendering OTF fonts (*.otf). If the text rendering is done correctly, Harmony and FT_CONFIG_OPTION_SUBPIXEL_RENDERING + lcdlight lead to sharper text. I plan to at some point get back to working on FreeType to lay the foundation for correct text rendering for other toolkits and font formats...
I'm for staying with our current configuration user being able to configure different LCD filters.
@heftig? Should we close this one "won't implement"?
Should I request the deletion of freetype2-cleartype (I maintain) on the AUR once this lands in extra?
FS#68238), and that's not an issue when filters aren't configurable.OTOH, I, for one, get exactly the same rendering with Harmony (FreeType default without ClearType), lcddefault and lcdlight, so it would not make a great difference (at least for me). And any other filter option is either borked (legacy and none) or require compiling FreeType yourself (custom filter, at which point you can also enable ClearType). But other might get different results with default and light (the latter being normally identical to Harmony).
My main reason to want ClearType enabled at this ponit, is to have one less package in AUR. ^^
Anyway, I submitted a deletion request for the AUR package and it was accepted. Another reason to keep ClearType enabled :D