Package org.apache.fop.fonts

Examples of org.apache.fop.fonts.FontMetrics


            char mapped = f.mapChar(firstChar);
            textUtil.selectFont(f, mapped);
            textUtil.setCurrentFont(f, mapped);
            applyColor(paint, gen);

            FontMetrics metrics = f.getFontMetrics();
            boolean multiByte = metrics instanceof MultiByteFont
                    || metrics instanceof LazyFont
                            && ((LazyFont) metrics).getRealFont() instanceof MultiByteFont;
            StringBuffer sb = new StringBuffer();
            sb.append(multiByte ? '<' : '(');
View Full Code Here


                    textUtil.selectFont(f, mapped);
                    textUtil.setCurrentFont(f, mapped);
                }
                //add glyph outlines to current path
                mapped = f.mapChar(this.currentChars.charAt(i));
                FontMetrics metrics = f.getFontMetrics();
                boolean multiByte = metrics instanceof MultiByteFont
                        || metrics instanceof LazyFont
                                && ((LazyFont) metrics).getRealFont() instanceof MultiByteFont;
                if (multiByte) {
                    gen.write('<');
View Full Code Here

            // NOTE: this is incomplete. font-size may be specified with
            // various kinds of keywords too
            //int fontVariant = propertyList.get("font-variant").getEnum();
            String fname = fontInfo.fontLookup(getFontFamily(), style,
                                               font_weight);
            FontMetrics metrics = fontInfo.getMetricsFor(fname);
            fontState = new Font(fname, metrics, fontSize.getValue(context));
        }
        return fontState;
    }
View Full Code Here

        // getLogger().debug("renderText(): \"" + s + "\", x: "
        // + x + ", y: " + y + state);

        // rendering text decorations
        FontMetrics metrics = fontInfo.getMetricsFor(name);
        Font fs = new Font(name, metrics, size);

        super.renderText(text);

        renderTextDecoration(fs, text, y, x);
View Full Code Here

        // getLogger().debug( "renderCharacter(): \"" + s + "\", x: "
        // + x + ", y: " + y + state);

        // rendering text decorations
        FontMetrics metrics = fontInfo.getMetricsFor(name);
        Font fs = new Font(name, metrics, size);
        renderTextDecoration(fs, ch, y, x);

        super.renderCharacter(ch);
    }
View Full Code Here

        prevWordX = rx;

        String s = ch.getChar();


        FontMetrics metrics = fontInfo.getMetricsFor(name);
        Font fs = new Font(name, metrics, size);
        escapeText(s, fs, useMultiByte, pdf);
        pdf.append(endText);

        currentStream.add(pdf.toString());
View Full Code Here

       
        pdf.append(startText);

        String s = word.getWord();
       
        FontMetrics metrics = fontInfo.getMetricsFor(name);
        Font fs = new Font(name, metrics, size);
        escapeText(s, fs, useMultiByte, pdf);
        pdf.append(endText);
       
        currentStream.add(pdf.toString());
View Full Code Here

       
        pdf.append(startText);

        String s = space.getSpace();
       
        FontMetrics metrics = fontInfo.getMetricsFor(name);
        Font fs = new Font(name, metrics, size);
        escapeText(s, fs, useMultiByte, pdf);
        pdf.append(endText);
       
        if (useMultiByte) {
View Full Code Here

        // getLogger().debug("renderText(): \"" + s + "\", x: "
        // + x + ", y: " + y + state);

        // rendering text decorations
        FontMetrics metrics = fontInfo.getMetricsFor(name);
        Font fs = new Font(name, metrics, size);
        renderTextDecoration(fs, text, y, x);

        super.renderText(text);
    }
View Full Code Here

        // getLogger().debug( "renderCharacter(): \"" + s + "\", x: "
        // + x + ", y: " + y + state);

        // rendering text decorations
        FontMetrics metrics = fontInfo.getMetricsFor(name);
        Font fs = new Font(name, metrics, size);
        renderTextDecoration(fs, ch, y, x);

        super.renderCharacter(ch);
    }
View Full Code Here

TOP

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

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.