@Test public void testNormalizingHeavyFontWeight() { Assert.assertEquals(900, FontCharacteristicsUtils.normalizeFontWeight((short) 900)); Assert.assertEquals(900, FontCharacteristicsUtils.normalizeFontWeight((short) 1600)); Assert.assertEquals(900, FontCharacteristicsUtils.normalizeFontWeight((short) 23000)); }
static short normalizeFontWeight(short fw) { fw = (short) ((fw/100)*100); if (fw < FontWeights.THIN) return FontWeights.THIN; if (fw > FontWeights.BLACK) return FontWeights.BLACK; return fw; }
FontCharacteristicsUtils { static short normalizeFontWeight(short fw) { fw = (short) ((fw/100)*100); if (fw < FontWeights.THIN) return FontWeights.THIN; if (fw > FontWeights.BLACK) return FontWeights.BLACK; return fw; } }
FontCharacteristicsUtils { static short normalizeFontWeight(short fw) { fw = (short) ((fw/100)*100); if (fw < FontWeights.THIN) return FontWeights.THIN; if (fw > FontWeights.BLACK) return FontWeights.BLACK; return fw; }  }
FontCharacteristicsUtils { static short normalizeFontWeight(short fw) { fw = (short) ((fw/100)*100); if (fw < FontWeights.THIN) return FontWeights.THIN; if (fw > FontWeights.BLACK) return FontWeights.BLACK; return fw; }   }
FontCharacteristicsUtils { static short normalizeFontWeight(short fw) { fw = (short) ((fw/100)*100); if (fw < FontWeights.THIN) return FontWeights.THIN; if (fw > FontWeights.BLACK) return FontWeights.BLACK; return fw; }    }