Package org.apache.fontbox.cff

Examples of org.apache.fontbox.cff.CharStringCommand


        for (int i = 0; operations != null && i < operations.size(); ++i)
        {
            Object obj = operations.get(i);
            if (obj instanceof CharStringCommand)
            {
                CharStringCommand csCmd = (CharStringCommand) obj;
                if ("hsbw".equals(CharStringCommand.TYPE1_VOCABULARY.get(csCmd.getKey())))
                {
                    // Numbers with absolute values greater than 32,000 must be followed
                    // by a div operator such that the result of the div is less than 32,000.
                    if (operations.get(i - 1) instanceof CharStringCommand)
                    {
                        CharStringCommand div = (CharStringCommand) operations.get(i - 1);
                        if ("div".equals(CharStringCommand.TYPE1_VOCABULARY.get(div.getKey())))
                        {
                            return ((Integer) operations.get(i - 3) / (Integer) operations.get(i - 2));
                        }
                    }
                    else
View Full Code Here


      }

      for (int i = 0; lSequence != null && i < lSequence.size(); ++i) {
        Object obj = lSequence.get(i);
        if (obj instanceof CharStringCommand) {
          CharStringCommand csCmd = (CharStringCommand) obj;
          if ("hsbw".equals(CharStringCommand.TYPE1_VOCABULARY.get(csCmd
              .getKey()))) {
            width = (Integer) lSequence.get(i - 1);
            return width;
          }
        }
View Full Code Here

  private int searchWidth() {
    for (int i = 0; operations != null && i < operations.size(); ++i) {
      Object obj = operations.get(i);
      if (obj instanceof CharStringCommand) {
        CharStringCommand csCmd = (CharStringCommand) obj;
        if ("hsbw".equals(CharStringCommand.TYPE1_VOCABULARY.get(csCmd.getKey()))) {
          return (Integer) operations.get(i - 1);
        }
      }
    }
    // 0 is the default value if glyph isn't found.
View Full Code Here

TOP

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

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.