Package org.apache.fontbox.cff

Examples of org.apache.fontbox.cff.Type1CharStringParser


            byte[] bytes = charstrings.get(name);
            if (bytes == null)
            {
                bytes = charstrings.get(".notdef");
            }
            Type1CharStringParser parser = new Type1CharStringParser(fontName, name);
            List<Object> sequence = parser.parse(bytes, subrs);
            type1 = new Type1CharString(this, fontName, name, sequence);
            charStringCache.put(name, type1);
        }
        return type1;
    }
View Full Code Here


            skipSingleBlankSeparator(stream); // "RD" or "-|" are followed by a space

            byte[] descBinary = new byte[sizeOfCharString];
            stream.read(descBinary, 0, sizeOfCharString);
            byte[] description = Type1FontUtil.charstringDecrypt(descBinary, lenIV);
            Type1CharStringParser t1p = new Type1CharStringParser();
            // TODO provide the local subroutine indexes
            List<Object> operations = t1p.parse(description, new IndexData(0));
            type1Font.addGlyphDescription(label, new GlyphDescription(operations));

            readToken(stream); // skip "ND" or "|-" token
            --numberOfElements;
        }
View Full Code Here

  protected Type1GlyphDescription getGlyphDescription(InputStream is,
      int length, int rdBytes) throws IOException {
    byte[] charF = readBytes(is, length);
    byte[] dcs = Type1FontUtil.charstringDecrypt(charF, rdBytes);

    Type1CharStringParser t1p = new Type1CharStringParser();
    List<Object> lSequence = t1p.parse(dcs);

    return new Type1GlyphDescription(lSequence);
  }
View Full Code Here

    skipSingleBlankSeparator(stream); // "RD" or "-|" are followed by a space

    byte[] descBinary = new byte[sizeOfCharString];
    stream.read(descBinary, 0, sizeOfCharString);
    byte[] description = Type1FontUtil.charstringDecrypt(descBinary, lenIV);
    Type1CharStringParser t1p = new Type1CharStringParser();
    List<Object> operations = t1p.parse(description);
    type1Font.addGlyphDescription(label, new GlyphDescription(operations));

    readToken(stream); // skip "ND" or "|-" token
  }
View Full Code Here

            skipSingleBlankSeparator(stream); // "RD" or "-|" are followed by a space

            byte[] descBinary = new byte[sizeOfCharString];
            stream.read(descBinary, 0, sizeOfCharString);
            byte[] description = Type1FontUtil.charstringDecrypt(descBinary, lenIV);
            Type1CharStringParser t1p = new Type1CharStringParser();
            // TODO provide the local subroutine indexes
            List<Object> operations = t1p.parse(description, new IndexData(0));
            type1Font.addGlyphDescription(label, new GlyphDescription(operations));

            readToken(stream); // skip "ND" or "|-" token
            --numberOfElements;
        }
View Full Code Here

TOP

Related Classes of org.apache.fontbox.cff.Type1CharStringParser

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.