Examples of AFMParser


Examples of org.apache.fontbox.afm.AFMParser

        }
        fontStream.addCompression();
        fd.setFontFile(fontStream);

        // read the afm
        AFMParser parser = new AFMParser(afm);
        parser.parse();
        metric = parser.getResult();
        setFontEncoding(afmToDictionary(new AFMEncoding(metric)));

        // set the values
        setBaseFont(metric.getFontName());
        fd.setFontName(metric.getFontName());
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

        byte[] afmBytes = AFMFormatter.format(font);

        InputStream is = new ByteArrayInputStream(afmBytes);
        try
        {
            AFMParser afmParser = new AFMParser(is);
            afmParser.parse();

            FontMetric result = afmParser.getResult();

            // Replace default FontBBox value with a newly computed one
            BoundingBox bounds = result.getFontBBox();
            List<Integer> numbers = Arrays.asList(
                    Integer.valueOf((int)bounds.getLowerLeftX()),
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

            String resource = resourceRootAFM + name + ".afm";
            InputStream afmStream = ResourceLoader.loadResource( resource );
            if( afmStream != null )
            {
                try {
                    AFMParser parser = new AFMParser( afmStream );
                    parser.parse();
                    metrics.put( name, parser.getResult() );
                } finally {
                    afmStream.close();
                }
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

        }
        fontStream.addCompression();
        fd.setFontFile(fontStream);

        // read the afm
        AFMParser parser = new AFMParser(afm);
        parser.parse();
        metric = parser.getResult();
        setFontEncoding(afmToDictionary(new AFMEncoding(metric)));

        // set the values
        setBaseFont(metric.getFontName());
        fd.setFontName(metric.getFontName());
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

            InputStream afmStream = ResourceLoader.loadResource( resource );
            if( afmStream != null )
            {
                try
                {
                    AFMParser parser = new AFMParser( afmStream );
                    parser.parse();
                    metrics.put( name, parser.getResult() );
                }
                finally
                {
                    afmStream.close();
                }
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

        byte[] afmBytes = AFMFormatter.format(font);

        InputStream is = new ByteArrayInputStream(afmBytes);
        try
        {
            AFMParser afmParser = new AFMParser(is);
            afmParser.parse();

            FontMetric result = afmParser.getResult();

            // Replace default FontBBox value with a newly computed one
            BoundingBox bounds = result.getFontBBox();
            List<Integer> numbers = Arrays.asList(
                    Integer.valueOf((int)bounds.getLowerLeftX()),
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

        byte[] afmBytes = AFMFormatter.format(font);

        InputStream is = new ByteArrayInputStream(afmBytes);
        try
        {
            AFMParser afmParser = new AFMParser(is);
            afmParser.parse();

            FontMetric result = afmParser.getResult();

            // Replace default FontBBox value with a newly computed one
            BoundingBox bounds = result.getFontBBox();
            List<Integer> numbers = Arrays.asList(
                    Integer.valueOf((int)bounds.getLowerLeftX()),
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

            String resource = resourceRootAFM + name + ".afm";
            InputStream afmStream = ResourceLoader.loadResource( resource );
            if( afmStream != null )
            {
                try {
                    AFMParser parser = new AFMParser( afmStream );
                    parser.parse();
                    metrics.put( name, parser.getResult() );
                } finally {
                    afmStream.close();
                }
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

            String resource = resourceRootAFM + name + ".afm";
            InputStream afmStream = ResourceLoader.loadResource( resource );
            if( afmStream != null )
            {
                try {
                    AFMParser parser = new AFMParser( afmStream );
                    parser.parse();
                    metrics.put( name, parser.getResult() );
                } finally {
                    afmStream.close();
                }
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.fontbox.afm.AFMParser

        }
        fontStream.addCompression();
        fd.setFontFile(fontStream);

        // read the afm
        AFMParser parser = new AFMParser(afm);
        parser.parse();
        metric = parser.getResult();
        setFontEncoding(afmToDictionary(new AFMEncoding(metric)));

        // set the values
        setBaseFont(metric.getFontName());
        fd.setFontName(metric.getFontName());
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.