checkFamilyFont(TestFonts.TEST_FAMILY_FONT_3);
checkFamilyFont(TestFonts.TEST_FAMILY_FONT_4);
}
private void checkFamilyFont(final FontItem fontItem) {
final Font font = fontItem.get();
final FamilyFont ff = (FamilyFont) ResourceBuilders.FONT_BUILDER.getParam(fontItem);
Assert.assertNotNull(font);
final String[] names = font.getName().split(" ");
int i = 0;
assertThat(names[i++]).isEqualToIgnoringCase(ff.family());
if (FontWeight.NORMAL != ff.weight()) {
assertThat(names[i++]).isEqualToIgnoringCase(ff.weight().name());
}
if (FontPosture.REGULAR != ff.posture()) {
assertThat(names[i++]).isEqualToIgnoringCase(ff.posture().name());
}
assertEquals(font.getSize(), ff.size(), 0.0);
}