Package org.apache.fontbox.cff

Examples of org.apache.fontbox.cff.CFFParser


    private void load() throws IOException
    {
        byte[] cffBytes = loadBytes();

        CFFParser cffParser = new CFFParser();
        List<CFFFont> fonts = cffParser.parse(cffBytes);

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

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);
View Full Code Here


    }

    // ---- try to load the font using the java.awt.font object.
    // ---- if the font is invalid, an exception will be thrown
    try {
      CFFParser cffParser = new CFFParser();
      List<CFFFont> lCFonts = cffParser.parse(ff3.getByteArray());

      if (lCFonts == null || lCFonts.isEmpty()) {
        this.fontContainer.addError(new ValidationResult.ValidationError(
            ERROR_FONTS_CID_DAMAGED, "The FontFile can't be read"));
        return false;
View Full Code Here

   * @throws ValidationException
   */
  protected boolean checkCIDFontWidths(PDStream fontStream)
  throws ValidationException {
    try {
      CFFParser cffParser = new CFFParser();
      List<CFFFont> lCFonts = cffParser.parse(fontStream.getByteArray());

      if (lCFonts == null || lCFonts.isEmpty()) {
        this.fontContainer.addError(new ValidationResult.ValidationError(
            ERROR_FONTS_CID_DAMAGED, "The FontFile can't be read"));
        return false;
View Full Code Here

    private void load() throws IOException
    {
        byte[] cffBytes = loadBytes();

        CFFParser cffParser = new CFFParser();
        List<CFFFont> fonts = cffParser.parse(cffBytes);

        String baseFontName = getBaseFont();
        if (fonts.size() > 1 && baseFontName != null)
        {
            for (CFFFont font: fonts)
View Full Code Here

    private void load() throws IOException
    {
        byte[] cffBytes = loadBytes();

        CFFParser cffParser = new CFFParser();
        List<CFFFont> fonts = cffParser.parse(cffBytes);

        String baseFontName = getBaseFont();
        if (fonts.size() > 1 && baseFontName != null)
        {
            for (CFFFont font: fonts)
View Full Code Here

    private void load() throws IOException
    {
        byte[] cffBytes = loadBytes();

        CFFParser cffParser = new CFFParser();
        List<CFFFont> fonts = cffParser.parse(cffBytes);

        String baseFontName = getBaseFont();
        if (fonts.size() > 1 && baseFontName != null)
        {
            for (CFFFont font: fonts)
View Full Code Here

    private void load() throws IOException
    {
        byte[] cffBytes = loadBytes();

        CFFParser cffParser = new CFFParser();
        List<CFFFont> fonts = cffParser.parse(cffBytes);

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

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);
View Full Code Here

    private void load() throws IOException
    {
        byte[] cffBytes = loadBytes();

        CFFParser cffParser = new CFFParser();
        List<CFFFont> fonts = cffParser.parse(cffBytes);

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

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);
View Full Code Here

    private void load() throws IOException
    {
        byte[] cffBytes = loadBytes();

        CFFParser cffParser = new CFFParser();
        List<CFFFont> fonts = cffParser.parse(cffBytes);

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

        CFFEncoding encoding = this.cffFont.getEncoding();
        PDFEncoding pdfEncoding = new PDFEncoding(encoding);
View Full Code Here

TOP

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

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.