Examples of traitFontSize()


Examples of org.foray.area.NormalBlockArea.traitFontSize()

        AreaNode node = firstNormalFlowArea.getChildAt(0);
        assertTrue(node instanceof NormalBlockArea);
        final NormalBlockArea blockArea = (NormalBlockArea) node;
        final FontUse font = blockArea.getPrimaryFont();
        assertEquals("Courier", font.getFont().getPostscriptName());
        assertEquals(12000, blockArea.traitFontSize());

        /* The first child of the block area is a line-area. */
        node = blockArea.getChildAt(0);
        assertTrue(node instanceof LineArea);
        final LineArea lineArea = (LineArea) node;
View Full Code Here

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

    /**
     * {@inheritDoc}
     */
    public int inlineFontSize(final FoContext context) {
        final FObj effectiveParent = effectiveParent(context);
        return effectiveParent.traitFontSize(context);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

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

    /**
     * {@inheritDoc}
     */
    public int inlineFontSize(final FoContext context) {
        final FObj effectiveParent = effectiveParent(context);
        return effectiveParent.traitFontSize(context);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

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

    private static int getBaseFontSize(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        int baseFontSize = getDefaultFontSize();
        if (parent != null) {
            baseFontSize = parent.traitFontSize(context);
        }
        return baseFontSize;
    }

    /**
 
View Full Code Here

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

     */
    static int computeSubscript(final FObj fobj, final FoContext context) {
        /* The subscript computations are computed based on the parent font and font-size. */
        final FObj parent = fobj.effectiveParent(context);
        final org.axsl.font.Font font = parent.getPrimaryFont(context).getFont();
        final int fontSize = parent.traitFontSize(context);
        return font.subscriptShift(fontSize);
    }

    /**
     * Computes the baseline-shift="super" value.
View Full Code Here

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

     */
    static int computeSuperscript(final FObj fobj, final FoContext context) {
        /* The superscript computations are computed based on the parent font and font-size. */
        final FObj parent = fobj.effectiveParent(context);
        final org.axsl.font.Font font = parent.getPrimaryFont(context).getFont();
        final int fontSize = parent.traitFontSize(context);
        return font.superscriptShift(fontSize);
    }

    /**
     * Returns the default (initial) value for this property.
View Full Code Here

Examples of org.foray.fotree.fo.obj.Block.traitFontSize()

        final Flow flow = this.getFlow(foTree);

        FObj node = flow.getChildAt(0);
        assertTrue(node instanceof Block);
        Block block = (Block) node;
        int fontSize = block.traitFontSize(null);
        /* The default font size is 12 points. */
        assertEquals(12000, fontSize);

        node = flow.getChildAt(1);
        assertTrue(node instanceof Block);
View Full Code Here

Examples of org.foray.fotree.fo.obj.Block.traitFontSize()

        assertEquals(12000, fontSize);

        node = flow.getChildAt(1);
        assertTrue(node instanceof Block);
        block = (Block) node;
        fontSize = block.traitFontSize(null);
        assertEquals(8000, fontSize);

        node = flow.getChildAt(2);
        assertTrue(node instanceof Block);
        block = (Block) node;
View Full Code Here

Examples of org.foray.fotree.fo.obj.Block.traitFontSize()

        assertTrue(node instanceof Block);
        block = (Block) node;
        final Font font = node.getPrimaryFont(null).getFont();
        assertEquals("Courier", font.getFamilyName());
        assertEquals(426, font.getXHeight(1000));
        final int nominalFontSize = block.traitFontSize(null);
        /* The nominal font-size is 10 pts. */
        assertEquals(10000, nominalFontSize);
        /* The font-size-adjust is .6. */
        final double fontSizeAdjust = block.traitFontSizeAdjust(null);
        assertEquals(.6, fontSizeAdjust, .001);
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.