Package org.apache.fop.fonts

Examples of org.apache.fop.fonts.FontMetrics


        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

                }*/
                fontFamily = fam.getFamilyName();
                if (fontInfo.hasFont(fontFamily, style, weight)) {
                    String fname = fontInfo.fontLookup(
                            fontFamily, style, weight);
                    FontMetrics metrics = fontInfo.getMetricsFor(fname);
                    int fsize = (int)(fontSize.floatValue() * 1000);
                    return new Font(fname, metrics, fsize);
                }
            }
        }
        String fname = fontInfo.fontLookup(
                "any", style, Font.NORMAL);
        FontMetrics metrics = fontInfo.getMetricsFor(fname);
        int fsize = (int)(fontSize.floatValue() * 1000);
        return new Font(fname, metrics, fsize);
    }
View Full Code Here

            }
            int siz = gFont.getSize();
            String style = gFont.isItalic() ? "italic" : "normal";
            int weight = gFont.isBold() ? Font.BOLD : Font.NORMAL;
            String fname = fontInfo.fontLookup(n, style, weight);
            FontMetrics metrics = fontInfo.getMetricsFor(fname);
            fontState = new Font(fname, metrics, siz * 1000);
        } else {
            FontMetrics metrics = fontInfo.getMetricsFor(ovFontState.getFontName());
            fontState = new Font(ovFontState.getFontName(),
                                      metrics, ovFontState.getFontSize());
            ovFontState = null;
        }
        String name;
View Full Code Here

                }
                fontFamily = fam.getFamilyName();
                if (fi.hasFont(fontFamily, style, weight)) {
                    String fname = fontInfo.fontLookup(fontFamily, style,
                                                       weight);
                    FontMetrics metrics = fontInfo.getMetricsFor(fname);
                    int fsize = (int)(size.floatValue() * 1000);
                    fontState = new Font(fname, metrics, fsize);
                    found = true;
                    break;
                }
            }
        }
        if (!found) {
            String fname =
              fontInfo.fontLookup("any", style, Font.NORMAL);
            FontMetrics metrics = fontInfo.getMetricsFor(fname);
            int fsize = (int)(size.floatValue() * 1000);
            fontState = new Font(fname, metrics, fsize);
        } else {
            if (g2d instanceof PDFGraphics2D) {
                ((PDFGraphics2D) g2d).setOverrideFontState(fontState);
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(fontFamily, style,
                                               font_weight);
            FontMetrics metrics = fontInfo.getMetricsFor(fname);
            fontState = new Font(fname, metrics, fontSize.getValue(context));
        }
        return fontState;
    }
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.