@Test public void testNormalizingThinFontWeight() { Assert.assertEquals(100, FontCharacteristicsUtils.normalizeFontWeight((short) -10000)); Assert.assertEquals(100, FontCharacteristicsUtils.normalizeFontWeight((short) 0)); Assert.assertEquals(100, FontCharacteristicsUtils.normalizeFontWeight((short) 50)); Assert.assertEquals(100, FontCharacteristicsUtils.normalizeFontWeight((short) 100)); }
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; }    }