[OpenJDK 2D-Dev] RFR: 8238942: Rendering artifacts with LCD text and fractional metrics

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Feb 12 06:53:25 UTC 2020


Hi, Phil.

Could you please clarify these lines, from the patch it
is unclear what they should do. "Why"

+ glyphInfo->topLeftX -= 1;
+ // WHY NOT ADD ?
+ glyphInfo->width += 1;

On 2/11/20 8:15 pm, Philip Race wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8238942
> webrev: http://cr.openjdk.java.net/~prr/8238942/
> 
> As discussed in the bug, we are missing padding in the code that takes
> an LCD glyph from freetype and caches it in the 2D glyph cache.
> 
> This padding is used in subpixel positioning with fractional metrics on.
> 
> I've run automated regression tests as well as doing extensive manual testing
> and so far it looks fine. A specific regression test is hard because the visual
> artifacts manifest rarely and even so are not easy to test.
> There should be plenty of time in JDK 15 for this to bake.
> 
> -phil.


-- 
Best regards, Sergey.


More information about the 2d-dev mailing list