Skip to content
Permalink
Browse files

8223090: Clean up obsolete logic & reference to Amble fonts

Reviewed-by: serb, psadhukhan
  • Loading branch information
Phil Race
Phil Race committed Apr 8, 2020
1 parent 10ca487 commit 64365fb9083bdf4f45c47d3ee80c31200f4e7583
@@ -151,23 +151,6 @@
}
}

/* Amble fonts are better rendered unhinted although there's the
* inevitable fuzziness that accompanies this due to no longer
* snapping stems to the pixel grid. The exception is that in B&W
* mode they are worse without hinting. The down side to that is that
* B&W metrics will differ which normally isn't the case, although
* since AA mode is part of the measuring context that should be OK.
* We don't expect Amble to be installed in the Windows fonts folder.
* If we were to, then we'd also might want to disable using the
* native rasteriser path which is used for LCD mode for platform
* fonts. since we have no way to disable hinting by GDI.
* In the case of Amble, since its 'gasp' table says to disable
* hinting, I'd expect GDI to follow that, so likely it should
* all be consistent even if GDI used.
*/
boolean disableHinting = desc.aaHint != INTVAL_TEXT_ANTIALIAS_OFF &&
fileFont.familyName.startsWith("Amble");

/* If any of the values is NaN then substitute the null scaler context.
* This will return null images, zero advance, and empty outlines
* as no rendering need take place in this case.
@@ -181,7 +164,7 @@
} else {
pScalerContext = fileFont.getScaler().createScalerContext(matrix,
desc.aaHint, desc.fmHint,
boldness, italic, disableHinting);
boldness, italic);
}

mapper = fileFont.getMapper();
@@ -205,8 +205,7 @@ Callee is responsible for freeing scaler context (using free()).
*/
abstract long createScalerContext(double[] matrix,
int aa, int fm,
float boldness, float italic,
boolean disableHinting);
float boldness, float italic);

/* Marks context as invalid because native scaler is invalid.
Notes:
@@ -225,8 +225,7 @@ synchronized long getUnitsPerEm() {
}

synchronized long createScalerContext(double[] matrix,
int aa, int fm, float boldness, float italic,
boolean disableHinting) {
int aa, int fm, float boldness, float italic) {
if (nativeScaler != 0L) {
return createScalerContextNative(nativeScaler, matrix,
aa, fm, boldness, italic);
@@ -65,7 +65,7 @@ GeneralPath getGlyphVectorOutline(long pScalerContext, int[] glyphs,
}

long createScalerContext(double[] matrix, int aa,
int fm, float boldness, float italic, boolean disableHinting) {
int fm, float boldness, float italic) {
return getNullScalerContext();
}

0 comments on commit 64365fb

Please sign in to comment.