Examples of TTFSubFont


Examples of org.apache.fontbox.ttf.TTFSubFont

        // this is one possible case of an incomplete subfont which leads to a font exception
        if (getFontEncoding() instanceof WinAnsiEncoding)
        {
            TTFParser ttfParser = new TTFParser(true);
            TrueTypeFont ttf = ttfParser.parseTTF(inputStream);
            TTFSubFont ttfSub = new TTFSubFont(ttf, "PDFBox-Rebuild");
            for (int i=getFirstChar();i<=getLastChar();i++)
            {
                ttfSub.addCharCode(i);
            }
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ttfSub.writeToStream(baos);
            return baos.toByteArray();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.fontbox.ttf.TTFSubFont

        // this is one possible case of an incomplete subfont which leads to a font exception
        if (getFontEncoding() instanceof WinAnsiEncoding)
        {
            TTFParser ttfParser = new TTFParser(true);
            TrueTypeFont ttf = ttfParser.parseTTF(inputStream);
            TTFSubFont ttfSub = new TTFSubFont(ttf, "PDFBox-Rebuild");
            for (int i=getFirstChar();i<=getLastChar();i++)
            {
                ttfSub.addCharCode(i);
            }
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ttfSub.writeToStream(baos);
            return baos.toByteArray();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.fontbox.ttf.TTFSubFont

        // this is one possible case of an incomplete subfont which leads to a font exception
        if (getFontEncoding() instanceof WinAnsiEncoding)
        {
            TTFParser ttfParser = new TTFParser(true);
            TrueTypeFont ttf = ttfParser.parseTTF(inputStream);
            TTFSubFont ttfSub = new TTFSubFont(ttf, "PDFBox-Rebuild");
            for (int i=getFirstChar();i<=getLastChar();i++)
            {
                ttfSub.addCharCode(i);
            }
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ttfSub.writeToStream(baos);
            return baos.toByteArray();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.fontbox.ttf.TTFSubFont

        // this is one possible case of an incomplete subfont which leads to a font exception
        if (getFontEncoding() instanceof WinAnsiEncoding)
        {
            TTFParser ttfParser = new TTFParser(true);
            TrueTypeFont ttf = ttfParser.parseTTF(inputStream);
            TTFSubFont ttfSub = new TTFSubFont(ttf, "PDFBox-Rebuild");
            for (int i=getFirstChar();i<=getLastChar();i++)
            {
                ttfSub.addCharCode(i);
            }
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ttfSub.writeToStream(baos);
            return baos.toByteArray();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.fontbox.ttf.TTFSubFont

        // this is one possible case of an incomplete subfont which leads to a font exception
        if (getFontEncoding() instanceof WinAnsiEncoding)
        {
            TTFParser ttfParser = new TTFParser(true);
            TrueTypeFont ttf = ttfParser.parseTTF(inputStream);
            TTFSubFont ttfSub = new TTFSubFont(ttf, "PDFBox-Rebuild");
            for (int i=getFirstChar();i<=getLastChar();i++)
            {
                ttfSub.addCharCode(i);
            }
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ttfSub.writeToStream(baos);
            return baos.toByteArray();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.fontbox.ttf.TTFSubFont

        // this is one possible case of an incomplete subfont which leads to a font exception
        if (getFontEncoding() instanceof WinAnsiEncoding)
        {
            TTFParser ttfParser = new TTFParser(true);
            TrueTypeFont ttf = ttfParser.parseTTF(inputStream);
            TTFSubFont ttfSub = new TTFSubFont(ttf, "PDFBox-Rebuild");
            for (int i=getFirstChar();i<=getLastChar();i++)
            {
                ttfSub.addCharCode(i);
            }
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ttfSub.writeToStream(baos);
            return baos.toByteArray();
        }
        return null;
    }
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.