Skip to content
Permalink
Browse files

8214481: freetype path does not disable TrueType hinting with AA+FM h…

…ints

Reviewed-by: serb, psadhukhan
  • Loading branch information
Phil Race
Phil Race committed Dec 5, 2019
1 parent 1c66428 commit c96d36e1b0a718ec21f39befecfc0305f824238d
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/java.desktop/share/native/libfontmanager/freetypeScaler.c
@@ -857,6 +857,17 @@ static jlong
return ptr_to_jlong(getNullGlyphImage());
}

/*
* When using Fractional metrics (linearly scaling advances) and
* greyscale antialiasing, disable hinting so that the glyph shapes
* are constant as size increases. This is good for animation as well
* as being compatible with what happened in earlier JDK versions
* which did not use freetype.
*/
if (context->aaType == TEXT_AA_ON && context->fmType == TEXT_FM_ON) {
renderFlags |= FT_LOAD_NO_HINTING;
}

if (!context->useSbits) {
renderFlags |= FT_LOAD_NO_BITMAP;
}

0 comments on commit c96d36e

Please sign in to comment.
You can’t perform that action at this time.