Examples of FamilyFont


Examples of org.jrebirth.af.core.resource.font.FamilyFont

        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);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.