Integrated: 8299255: Unexpected round errors in FreetypeFontScaler

Toshio Nakamura tnakamura at openjdk.org
Sat Dec 24 14:30:10 UTC 2022


On Thu, 22 Dec 2022 07:20:03 GMT, Toshio Nakamura <tnakamura at openjdk.org> wrote:

> In 'Java_sun_font_FreetypeFontScaler_createScalerContextNative', 'context->transform.xx' and '.yy' values are sometimes 65535 instead of 65536. There are unintentional double and float conversions. It may be no real harm, but I'd like to fix it.
> 
> Problem case:
> context->transform.xx=**65535** yx=0 xy=0 yy=**65535** ptsz=46.590909 dmat[0]=46.590909 (float)dmat[0]=46.59090**8**
> 
> Normal case:
> context->transform.xx=65536 yx=0 xy=0 yy=65536 ptsz=18.000000 dmat[0]=18.000000 (float)dmat[0]=18.000000
> 
> Test: jdk_desktop on Linux x86_64 had no regression issues.

This pull request has now been integrated.

Changeset: 26868c1a
Author:    Toshio Nakamura <tnakamura at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/26868c1ac471c3b305b1d15e3075de0baa9319d2
Stats:     74 lines in 2 files changed: 69 ins; 0 del; 5 mod

8299255: Unexpected round errors in FreetypeFontScaler

Reviewed-by: prr, serb

-------------

PR: https://git.openjdk.org/jdk/pull/11763



More information about the client-libs-dev mailing list