Package org.apache.fop.fonts

Examples of org.apache.fop.fonts.FontInfo


     * Main constructor
     * @param foUserAgent the apps.FOUserAgent instance for this process
     */
    public FOEventHandler(FOUserAgent foUserAgent) {
        this.foUserAgent = foUserAgent;
        this.fontInfo = new FontInfo();
    }
View Full Code Here


     * Main constructor
     * @param foUserAgent the apps.FOUserAgent instance for this process
     */
    public FOEventHandler(FOUserAgent foUserAgent) {
        this.foUserAgent = foUserAgent;
        this.fontInfo = new FontInfo();
        this.fontInfo.setEventListener(new FontEventAdapter(foUserAgent.getEventBroadcaster()));
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    public void initialize() {
        super.initialize();
        FontInfo fi = getBlockFO().getFOEventHandler().getFontInfo();
        FontTriplet[] fontkeys = getBlockFO().getCommonFont().getFontState(fi);
        Font initFont = fi.getFontInstance(fontkeys[0],
                getBlockFO().getCommonFont().fontSize.getValue(this));
        lead = initFont.getAscender();
        follow = -initFont.getDescender();
        //middleShift = -fs.getXHeight() / 2;
        lineHeight = getBlockFO().getLineHeight().getOptimum(this).getLength();
View Full Code Here

        fobj = node;
    }

    /** {@inheritDoc} */
    public void initialize() {
        FontInfo fi = fobj.getFOEventHandler().getFontInfo();
        FontTriplet[] fontkeys = fobj.getCommonFont().getFontState(fi);
        font = fi.getFontInstance(fontkeys[0], fobj.getCommonFont().fontSize.getValue(this));
        // the property leader-alignment does not affect vertical positioning
        // (see section 7.21.1 in the XSL Recommendation)
        // setAlignment(node.getLeaderAlignment());
        setCommonBorderPaddingBackground(fobj.getCommonBorderPaddingBackground());
    }
View Full Code Here

    public void initialize() {
        InlineLevel fobj = (InlineLevel) this.fobj;

        int padding = 0;

        FontInfo fi = fobj.getFOEventHandler().getFontInfo();
        CommonFont commonFont = fobj.getCommonFont();
        FontTriplet[] fontkeys = commonFont.getFontState(fi);
        font = fi.getFontInstance(fontkeys[0], commonFont.fontSize.getValue(this));

        lineHeight = fobj.getLineHeight();
        borderProps = fobj.getCommonBorderPaddingBackground();
        inlineProps = fobj.getCommonMarginInline();
View Full Code Here

     * @return the map of font families
     * @throws FOPException if an error occurs setting up the fonts
     */
    public SortedMap listFonts(FopFactory fopFactory, String mime, FontEventListener listener)
            throws FOPException {
        FontInfo fontInfo = setupFonts(fopFactory, mime, listener);
        SortedMap fontFamilies = buildFamilyMap(fontInfo);
        return fontFamilies;
    }
View Full Code Here

        //The document handler is only instantiated to get access to its configurator!
        IFDocumentHandler documentHandler
            = fopFactory.getRendererFactory().createDocumentHandler(userAgent, mime);
        IFDocumentHandlerConfigurator configurator = documentHandler.getConfigurator();

        FontInfo fontInfo = new FontInfo();
        configurator.setupFontInfo(documentHandler, fontInfo);
        return fontInfo;
    }
View Full Code Here

    }

    /** {@inheritDoc} */
    public void renderTo(FOUserAgent userAgent, String outputFormat, OutputStream out)
                throws FOPException {
        FontInfo fontInfo = new FontInfo();
        AreaTreeModel treeModel = new RenderPagesModel(userAgent,
                outputFormat, fontInfo, out);

        //Iterate over all intermediate files
        AreaTreeParser parser = new AreaTreeParser();
View Full Code Here

     * @throws FOPException if an error occurs while setting up the fonts
     */
    public static void setupFonts(IFDocumentHandler documentHandler, FontInfo fontInfo)
                throws FOPException {
        if (fontInfo == null) {
            fontInfo = new FontInfo();
        }
        if (documentHandler instanceof IFSerializer) {
            IFSerializer serializer = (IFSerializer)documentHandler;
            if (serializer.getMimickedDocumentHandler() != null) {
                //Use the mimicked document handler's configurator to set up fonts
View Full Code Here

        return this.bitmapSettings;
    }

    /** {@inheritDoc} */
    public void setDefaultFontInfo(FontInfo fontInfo) {
        FontInfo fi = Java2DUtil.buildDefaultJava2DBasedFontInfo(fontInfo, getUserAgent());
        setFontInfo(fi);
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.fonts.FontInfo

Copyright © 2018 www.massapicom. 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.