コード例 #1
0
 @Override
 public byte[] getFontFile() {
   if (this.pfb != null) {
     return pfb.getPfbData();
   } else {
     return this.parsePfb();
   }
 }
コード例 #2
0
 /**
  * Starts parsing the pfb file if it hasn't been parsed already.
  *
  * @return byte array containing the parsed file. Will be an empty array if the file could not be
  *     found.
  */
 private byte[] parsePfb() {
   InputStream file;
   try {
     file = getFile(".pfb");
   } catch (FileNotFoundException e) {
     LOGGER.info(
         "Could not find Pfb file for {}, will continue without embedding Pfb data.", filename);
     return new byte[0];
   }
   pfb = new PfbParser(file);
   return pfb.getPfbData();
 }
コード例 #3
0
 @Override
 public int[] getFontProgramLengths() {
   return pfb.getLengths();
 }