Examples of traitHalfLeadingOpt()


Examples of org.foray.fotree.FObj.traitHalfLeadingOpt()

    public void testNormal() throws PropertyException {
        final FObj fobj = makeTestFObj();
        final PropertyList propertyList = fobj.getPropertyList();
        final PdLineHeight property = new PdLineHeight(fobj, "", "normal");
        propertyList.addProperty(fobj, property);
        final int halfLeadingOpt = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
        /* Default font-size is 12 points or 12,000 millipoints. The "normal"
         * line height is 1.2 times that or 14,400 millipoints. The difference
         * is 2,400 millipoints, which is the leading. Half that value is
         * 1,200 millipoints. */
        assertEquals(1200, halfLeadingOpt);
View Full Code Here

Examples of org.foray.fotree.FObj.traitHalfLeadingOpt()

        /* D = Distance between baselines = 3.7cm = 104,882 millipoints.
         * L = Leading = D - the default font size of 12,000 = 92,882
         * millipoints.
         * HL = L / 2 = 46,441 millipoints. */
        assertEquals(46441, halfLeadingMax);
        final int halfLeadingOpt = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
        assertEquals(46441, halfLeadingOpt);
        final int halfLeadingMin = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
        assertEquals(46441, halfLeadingMin);
    }

View Full Code Here

Examples of org.foray.fotree.FObj.traitHalfLeadingOpt()

         * millipoints.
         * HL = L / 2 = 46,441 millipoints. */
        assertEquals(46441, halfLeadingMax);
        final int halfLeadingOpt = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
        assertEquals(46441, halfLeadingOpt);
        final int halfLeadingMin = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
        assertEquals(46441, halfLeadingMin);
    }

}
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.