[OpenJDK 2D-Dev] RFR: 8238942: Rendering artifacts with LCD text and fractional metrics
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Feb 12 21:30:59 UTC 2020
Ok, looks fine.
On 2/12/20 7:10 am, Philip Race wrote:
> Ignore the comment. I should have deleted that (and will before pushing).
>
> Since we are adding padding on the left, to render the rightmost pixel
> of the unpadded image, we need to extend the width by one pixel.
>
> But the padding means that the image (as seen by the user)
> is now being rendered one pixel to the right of where it should be.
>
> So we need to adjust the rendering origin of the glyph one pixel to the left.
>
> -phil.
>
> On 2/11/20, 10:53 PM, Sergey Bylokhov wrote:
>> 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