Examples of CFFCharset


Examples of org.apache.fontbox.cff.charset.CFFCharset

        this.cffFont = (CFFFont)fonts.get(0);

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);

        CFFCharset charset = this.cffFont.getCharset();
        PDFCharset pdfCharset = new PDFCharset(charset);

        Map<String,byte[]> charStringsDict = this.cffFont.getCharStringsDict();
        Map<String,byte[]> pdfCharStringsDict = new LinkedHashMap<String,byte[]>();
        pdfCharStringsDict.put(".notdef", charStringsDict.get(".notdef"));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        DictData.Entry charStringsEntry = topDict.getEntry("CharStrings");
        int charStringsOffset = charStringsEntry.getNumber(0).intValue();
        input.setPosition(charStringsOffset);
        IndexData charStringsIndex = readIndexData(input);
        DictData.Entry charsetEntry = topDict.getEntry("charset");
        CFFCharset charset;
        int charsetId = charsetEntry != null ? charsetEntry.getNumber(0).intValue() : 0;
        if (charsetId == 0)
        {
            charset = CFFISOAdobeCharset.getInstance();
        }
        else if (charsetId == 1)
        {
            charset = CFFExpertCharset.getInstance();
        }
        else if (charsetId == 2)
        {
            charset = CFFExpertSubsetCharset.getInstance();
        }
        else
        {
            input.setPosition(charsetId);
            charset = readCharset(input, charStringsIndex.getCount());
        }
        font.setCharset(charset);
        font.getCharStringsDict().put(".notdef", charStringsIndex.getBytes(0));
        int[] gids = new int[charStringsIndex.getCount()];
        List<CFFCharset.Entry> glyphEntries = charset.getEntries();
        for (int i = 1; i < charStringsIndex.getCount(); i++)
        {
            CFFCharset.Entry glyphEntry = glyphEntries.get(i - 1);
            gids[i - 1] = glyphEntry.getSID();
            font.getCharStringsDict().put(glyphEntry.getName(), charStringsIndex.getBytes(i));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        }

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);

        CFFCharset charset = this.cffFont.getCharset();
        PDFCharset pdfCharset = new PDFCharset(charset);

        Map<String,byte[]> charStringsDict = this.cffFont.getCharStringsDict();
        Map<String,byte[]> pdfCharStringsDict = new LinkedHashMap<String,byte[]>();
        pdfCharStringsDict.put(".notdef", charStringsDict.get(".notdef"));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        DictData.Entry charStringsEntry = topDict.getEntry("CharStrings");
        int charStringsOffset = charStringsEntry.getNumber(0).intValue();
        input.setPosition(charStringsOffset);
        IndexData charStringsIndex = readIndexData(input);
        DictData.Entry charsetEntry = topDict.getEntry("charset");
        CFFCharset charset;
        int charsetId = charsetEntry != null ? charsetEntry.getNumber(0).intValue() : 0;
        if (charsetId == 0)
        {
            charset = CFFISOAdobeCharset.getInstance();
        }
        else if (charsetId == 1)
        {
            charset = CFFExpertCharset.getInstance();
        }
        else if (charsetId == 2)
        {
            charset = CFFExpertSubsetCharset.getInstance();
        }
        else
        {
            input.setPosition(charsetId);
            charset = readCharset(input, charStringsIndex.getCount());
        }
        font.setCharset(charset);
        font.getCharStringsDict().put(".notdef", charStringsIndex.getBytes(0));
        int[] gids = new int[charStringsIndex.getCount()];
        List<CFFCharset.Entry> glyphEntries = charset.getEntries();
        for (int i = 1; i < charStringsIndex.getCount(); i++)
        {
            CFFCharset.Entry glyphEntry = glyphEntries.get(i - 1);
            gids[i - 1] = glyphEntry.getSID();
            font.getCharStringsDict().put(glyphEntry.getName(), charStringsIndex.getBytes(i));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        this.cffFont = (CFFFont)fonts.get(0);

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);

        CFFCharset charset = this.cffFont.getCharset();
        PDFCharset pdfCharset = new PDFCharset(charset);

        Map<String,byte[]> charStringsDict = this.cffFont.getCharStringsDict();
        Map<String,byte[]> pdfCharStringsDict = new LinkedHashMap<String,byte[]>();
        pdfCharStringsDict.put(".notdef", charStringsDict.get(".notdef"));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        DictData.Entry charStringsEntry = topDict.getEntry("CharStrings");
        int charStringsOffset = charStringsEntry.getNumber(0).intValue();
        input.setPosition(charStringsOffset);
        IndexData charStringsIndex = readIndexData(input);
        DictData.Entry charsetEntry = topDict.getEntry("charset");
        CFFCharset charset;
        int charsetId = charsetEntry != null ? charsetEntry.getNumber(0)
                .intValue() : 0;
        if (charsetId == 0)
        {
            charset = CFFISOAdobeCharset.getInstance();
        }
        else if (charsetId == 1)
        {
            charset = CFFExpertCharset.getInstance();
        }
        else if (charsetId == 2)
        {
            charset = CFFExpertSubsetCharset.getInstance();
        }
        else
        {
            input.setPosition(charsetId);
            charset = readCharset(input, charStringsIndex.getCount());
        }
        font.setCharset(charset);
        font.getCharStringsDict().put(".notdef", charStringsIndex.getBytes(0));
        int[] gids = new int[charStringsIndex.getCount()];
        List<CFFCharset.Entry> glyphEntries = charset.getEntries();
        for (int i = 1; i < charStringsIndex.getCount(); i++)
        {
            CFFCharset.Entry glyphEntry = glyphEntries.get(i - 1);
            gids[i - 1] = glyphEntry.getSID();
            font.getCharStringsDict().put(glyphEntry.getName(), charStringsIndex.getBytes(i));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        this.cffFont = (CFFFont)fonts.get(0);

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);

        CFFCharset charset = this.cffFont.getCharset();
        PDFCharset pdfCharset = new PDFCharset(charset);

        Map<String,byte[]> charStringsDict = this.cffFont.getCharStringsDict();
        Map<String,byte[]> pdfCharStringsDict = new LinkedHashMap<String,byte[]>();
        pdfCharStringsDict.put(".notdef", charStringsDict.get(".notdef"));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        this.cffFont = (CFFFont)fonts.get(0);

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);

        CFFCharset charset = this.cffFont.getCharset();
        PDFCharset pdfCharset = new PDFCharset(charset);

        Map<String,byte[]> charStringsDict = this.cffFont.getCharStringsDict();
        Map<String,byte[]> pdfCharStringsDict = new LinkedHashMap<String,byte[]>();
        pdfCharStringsDict.put(".notdef", charStringsDict.get(".notdef"));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        DictData.Entry charStringsEntry = topDict.getEntry("CharStrings");
        int charStringsOffset = charStringsEntry.getNumber(0).intValue();
        input.setPosition(charStringsOffset);
        IndexData charStringsIndex = readIndexData(input);
        DictData.Entry charsetEntry = topDict.getEntry("charset");
        CFFCharset charset;
        int charsetId = charsetEntry != null ? charsetEntry.getNumber(0)
                .intValue() : 0;
        if (charsetId == 0)
        {
            charset = CFFISOAdobeCharset.getInstance();
        }
        else if (charsetId == 1)
        {
            charset = CFFExpertCharset.getInstance();
        }
        else if (charsetId == 2)
        {
            charset = CFFExpertSubsetCharset.getInstance();
        }
        else
        {
            input.setPosition(charsetId);
            charset = readCharset(input, charStringsIndex.count);
        }
        font.setCharset(charset);
        font.getCharStringsDict().put(".notdef", charStringsIndex.getBytes(0));
        int[] gids = new int[charStringsIndex.count];
        List<CFFCharset.Entry> glyphEntries = charset.getEntries();
        for (int i = 0; i < glyphEntries.size(); i++)
        {
            CFFCharset.Entry glyphEntry = glyphEntries.get(i);
            gids[i] = glyphEntry.getSID();
            font.getCharStringsDict().put(glyphEntry.getName(), charStringsIndex.getBytes(i + 1));
View Full Code Here

Examples of org.apache.fontbox.cff.charset.CFFCharset

        this.glyphWidths.put(null, Float.valueOf(defaultWidthX.floatValue()));

        CFFEncoding encoding = cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);

        CFFCharset charset = cffFont.getCharset();
        PDFCharset pdfCharset = new PDFCharset(charset);

        Map<String,byte[]> charStringsDict = cffFont.getCharStringsDict();
        Map<String,byte[]> pdfCharStringsDict = new LinkedHashMap<String,byte[]>();
        pdfCharStringsDict.put(".notdef", charStringsDict.get(".notdef"));
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.