Package org.apache.fop.fonts.type1

Examples of org.apache.fop.fonts.type1.PFBParser


                        // Only TrueType CID fonts are supported now

                        embeddedFont = new PDFTTFStream(subsetFont.length);
                        ((PDFTTFStream)embeddedFont).setData(subsetFont, subsetFont.length);
                    } else if (desc.getFontType() == FontType.TYPE1) {
                        PFBParser parser = new PFBParser();
                        PFBData pfb = parser.parsePFB(in);
                        embeddedFont = new PDFT1Stream();
                        ((PDFT1Stream)embeddedFont).setData(pfb);
                    } else {
                        byte[] file = IOUtils.toByteArray(in);
                        embeddedFont = new PDFTTFStream(file.length);
View Full Code Here


                        // Only TrueType CID fonts are supported now

                        embeddedFont = new PDFTTFStream(subsetFont.length);
                        ((PDFTTFStream)embeddedFont).setData(subsetFont, subsetFont.length);
                    } else if (desc.getFontType() == FontType.TYPE1) {
                        PFBParser parser = new PFBParser();
                        PFBData pfb = parser.parsePFB(in);
                        embeddedFont = new PDFT1Stream();
                        ((PDFT1Stream)embeddedFont).setData(pfb);
                    } else {
                        byte[] file = IOUtils.toByteArray(in);
                        embeddedFont = new PDFTTFStream(file.length);
View Full Code Here

        if (arguments.length != 2 || options.get("-h") != null
            || options.get("-help") != null || options.get("--help") != null) {
            app.displayUsage();
        } else {
            PFMFile pfm = app.loadPFM(arguments[0]);
            if (pfm != null) {
                app.preview(pfm);

                org.w3c.dom.Document doc = app.constructFontXML(pfm,
                        fontName, className, embResource, embFile);
View Full Code Here

        try {
            getLogger().info("Reading " + filename + "...");
            getLogger().info("");
            InputStream in = new java.io.FileInputStream(filename);
            try {
                PFMFile pfm = new PFMFile();
                setupLogger(pfm);
                pfm.load(in);
                return pfm;
            } finally {
                in.close();
            }
        } catch (Exception e) {
View Full Code Here

            || options.get("-help") != null || options.get("--help") != null) {
            displayUsage();
        } else {
            try {
                log.info("Parsing font...");
                PFMFile pfm = app.loadPFM(arguments[0]);
                if (pfm != null) {
                    app.preview(pfm);
   
                    Document doc = app.constructFontXML(pfm,
                            fontName, className, embResource, embFile);
View Full Code Here

    public PFMFile loadPFM(String filename) throws IOException {
        log.info("Reading " + filename + "...");
        log.info("");
        InputStream in = new java.io.FileInputStream(filename);
        try {
            PFMFile pfm = new PFMFile();
            pfm.load(in);
            return pfm;
        } finally {
            in.close();
        }
    }
View Full Code Here

            || options.get("-help") != null || options.get("--help") != null) {
            displayUsage();
        } else {
            try {
                log.info("Parsing font...");
                PFMFile pfm = app.loadPFM(arguments[0]);
                if (pfm != null) {
                    app.preview(pfm);

                    Document doc = app.constructFontXML(pfm,
                            fontName, className, embResource, embFile);
View Full Code Here

    public PFMFile loadPFM(String filename) throws IOException {
        log.info("Reading " + filename + "...");
        log.info("");
        InputStream in = new java.io.FileInputStream(filename);
        try {
            PFMFile pfm = new PFMFile();
            pfm.load(in);
            return pfm;
        } finally {
            in.close();
        }
    }
View Full Code Here

                       throws IOException
        {
            PFMReader reader = new PFMReader(  );
            getLog(  ).debug( "Parsing font: " + fontFile );

            PFMFile pfm = reader.loadPFM( fontFile );

            if ( pfm == null )
            {
                throw new IOException( "Unable to load PFM file: " + fontFile );
            }
View Full Code Here

    public void transform(String fontFile) throws IOException {
      PFMReader reader = new PFMReader();
      getLog().debug("Parsing font: " + fontFile);

      PFMFile pfm = reader.loadPFM(fontFile);

      if (pfm == null) {
        throw new IOException("Unable to load PFM file: " + fontFile);
      }
View Full Code Here

TOP

Related Classes of org.apache.fop.fonts.type1.PFBParser

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.