Open DorianRudolph opened 3 years ago
After further investigation, the issue must lie in the freetype2build inside skia.
When building skia with skia_use_system_freetype2=true
, subpixels are rendered correctly (mono/skia requires skia.patch.txt to build).
Ah it looks like mono/skia does not yet have the patch for harmony subpixel rendering (https://skia.googlesource.com/skia/+/f25787b72c20e97cdeb74e037dc1ff56a88b45c6). For compiling, one could also enable cleartype (FT_CONFIG_OPTION_SUBPIXEL_RENDERING), but that apparently is using patented technology. The simplest fix would be to update skia or use the system freetype2.
Updating freetype2 should be a one-liner: https://github.com/mono/skia/blob/173debd238b1a55ab12f5994c5dc074fd141ccd6/DEPS#L15
Yes, but the patch linked above (https://skia.googlesource.com/skia/+/f25787b72c20e97cdeb74e037dc1ff56a88b45c6%5E%21/#F0) also needs to be applied. However, it apparently is now fine to enable cleartype (https://www.phoronix.com/scan.php?page=news_item&px=Fedora-ClearType-Subpixel-Font) so that is what I will do for myself.
Description
Subpixel rendering does not work on Linux. The equivalent C++ does work as expected.
Code
C#
C++
Expected Behavior
Output from from C++ (with subpixel AA):
Actual Behavior
Output From C# (no subpixel AA):
Basic Information
Code for 1.68.3: