OutputList.addLast(new UInt8Item((char)stringsIndexOffSize)); // offSize for (int i=0; i<stringOffsets.length; i++) OutputList.addLast(new IndexOffsetItem(stringsIndexOffSize,
l.addLast(new UInt8Item((char)1)); // offSize l.addLast(new UInt8Item((char)1)); // first offset l.addLast(new UInt8Item((char)( 1+fonts[j].name.length() ))); l.addLast(new StringItem(fonts[j].name)); l.addLast(new UInt8Item((char)2)); // offSize l.addLast(new UInt16Item((char)1)); // first offset OffsetItem topdictIndex1Ref = new IndexOffsetItem(2); l.addLast(new DictNumberItem(nstrings+1)); l.addLast(new DictNumberItem(0)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)30)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)34)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)36)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)37)); l.addLast(new UInt8Item((char)15)); l.addLast(new UInt8Item((char)17)); l.addLast(new UInt8Item((char)stringsIndexOffSize)); // offSize for (int i=0; i<stringOffsets.length; i++)
l.addLast(new UInt8Item((char)1)); // offSize l.addLast(new UInt8Item((char)1)); // first offset l.addLast(new UInt8Item((char)( 1+fonts[j].name.length() ))); l.addLast(new StringItem(fonts[j].name)); l.addLast(new UInt8Item((char)2)); // offSize l.addLast(new UInt16Item((char)1)); // first offset OffsetItem topdictIndex1Ref = new IndexOffsetItem(2); l.addLast(new DictNumberItem(nstrings+1)); l.addLast(new DictNumberItem(0)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)30)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)34)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)36)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)37)); l.addLast(new UInt8Item((char)15)); l.addLast(new UInt8Item((char)17)); l.addLast(new UInt8Item((char)stringsIndexOffSize)); // offSize for (int i=0; i<stringOffsets.length; i++)
l.addLast(new UInt8Item((char)1)); // offSize l.addLast(new UInt8Item((char)1)); // first offset l.addLast(new UInt8Item((char)( 1+fonts[j].name.length() ))); l.addLast(new StringItem(fonts[j].name)); l.addLast(new UInt8Item((char)2)); // offSize l.addLast(new UInt16Item((char)1)); // first offset OffsetItem topdictIndex1Ref = new IndexOffsetItem(2); l.addLast(new DictNumberItem(nstrings+1)); l.addLast(new DictNumberItem(0)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)30)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)34)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)36)); l.addLast(new UInt8Item((char)12)); l.addLast(new UInt8Item((char)37)); l.addLast(new UInt8Item((char)15)); l.addLast(new UInt8Item((char)17)); l.addLast(new UInt8Item((char)stringsIndexOffSize)); // offSize for (int i=0; i<stringOffsets.length; i++)
OutputList.addLast(new UInt8Item((char)( 1+fonts[Font].name.length() ))); OutputList.addLast(new StringItem(fonts[Font].name)); OutputList.addLast(new DictNumberItem(fonts[Font].nstrings+1)); OutputList.addLast(new DictNumberItem(0)); OutputList.addLast(new UInt8Item((char)12)); OutputList.addLast(new UInt8Item((char)30)); OutputList.addLast(new UInt8Item((char)12)); OutputList.addLast(new UInt8Item((char)34));
OutputList.addLast(new UInt8Item((char)( 1+fonts[Font].name.length() ))); OutputList.addLast(new StringItem(fonts[Font].name)); OutputList.addLast(new DictNumberItem(fonts[Font].nstrings+1)); OutputList.addLast(new DictNumberItem(0)); OutputList.addLast(new UInt8Item((char)12)); OutputList.addLast(new UInt8Item((char)30)); OutputList.addLast(new UInt8Item((char)12)); OutputList.addLast(new UInt8Item((char)34));
OutputList.addLast(new UInt8Item((char)( 1+fonts[Font].name.length() ))); OutputList.addLast(new StringItem(fonts[Font].name)); OutputList.addLast(new DictNumberItem(fonts[Font].nstrings+1)); OutputList.addLast(new DictNumberItem(0)); OutputList.addLast(new UInt8Item((char)12)); OutputList.addLast(new UInt8Item((char)30)); OutputList.addLast(new UInt8Item((char)12)); OutputList.addLast(new UInt8Item((char)34));
fdPrivate[k] = new DictOffsetItem(); OutputList.addLast(fdPrivate[k]); OutputList.addLast(new UInt8Item((char)18)); // Private
fdPrivate[k] = new DictOffsetItem(); OutputList.addLast(fdPrivate[k]); OutputList.addLast(new UInt8Item((char)18)); // Private
fdPrivate[k] = new DictOffsetItem(); OutputList.addLast(fdPrivate[k]); OutputList.addLast(new UInt8Item((char)18)); // Private
fdSubrs[i] = new DictOffsetItem(); OutputList.addLast(fdSubrs[i]); OutputList.addLast(new UInt8Item((char)19)); // Subrs
fdSubrs[i] = new DictOffsetItem(); OutputList.addLast(fdSubrs[i]); OutputList.addLast(new UInt8Item((char)19)); // Subrs
fdSubrs[i] = new DictOffsetItem(); OutputList.addLast(fdSubrs[i]); OutputList.addLast(new UInt8Item((char)19)); // Subrs
OutputList.addLast(new UInt8Item((char)stringsIndexOffSize)); // offSize for (int i=0; i<stringOffsets.length; i++) OutputList.addLast(new IndexOffsetItem(stringsIndexOffSize,
OutputList.addLast(new UInt8Item((char)stringsIndexOffSize)); // offSize for (int i=0; i<stringOffsets.length; i++) OutputList.addLast(new IndexOffsetItem(stringsIndexOffSize,
OutputList.addLast(new DictNumberItem(NewSize)); OutputList.addLast(privateRef); OutputList.addLast(new UInt8Item((char)18)); // Private
OutputList.addLast(new DictNumberItem(NewSize)); OutputList.addLast(privateRef); OutputList.addLast(new UInt8Item((char)18)); // Private
OutputList.addLast(new DictNumberItem(NewSize)); OutputList.addLast(privateRef); OutputList.addLast(new UInt8Item((char)18)); // Private
/** * The function creates a private dict for a font that was not CID * All the keys are copied as is except for the subrs key * @param Font the font * @param Subr The OffsetItem for the subrs of the private */ void CreateNonCIDPrivate(int Font,OffsetItem Subr) { // Go to the beginning of the private dict and read until the end seek(fonts[Font].privateOffset); while (getPosition() < fonts[Font].privateOffset+fonts[Font].privateLength) { int p1 = getPosition(); getDictItem(); int p2 = getPosition(); // If the dictItem is the "Subrs" then, // use marker for offset and write operator number if (key=="Subrs") { OutputList.addLast(Subr); OutputList.addLast(new UInt8Item((char)19)); // Subrs } // Else copy the entire range else OutputList.addLast(new RangeItem(buf,p1,p2-p1)); } }