@Test public void testNormalizingNormalFontWeight() { Assert.assertEquals(200, FontCharacteristicsUtils.normalizeFontWeight((short) 220)); Assert.assertEquals(400, FontCharacteristicsUtils.normalizeFontWeight((short) 456)); Assert.assertEquals(500, FontCharacteristicsUtils.normalizeFontWeight((short) 550)); Assert.assertEquals(600, FontCharacteristicsUtils.normalizeFontWeight((short) 620)); Assert.assertEquals(700, FontCharacteristicsUtils.normalizeFontWeight((short) 780)); }
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; }    }