/** * The function finds for the FD array processed the local subr offset and its * offset array. * * @param Font the font * @param FD The FDARRAY processed */ protected void BuildFDSubrsOffsets(int Font, int FD) { // Initiate to -1 to indicate lsubr operator present fonts[Font].PrivateSubrsOffset[FD] = -1; // Goto beginning of objects seek(fonts[Font].fdprivateOffsets[FD]); // While in the same object: while (getPosition() < fonts[Font].fdprivateOffsets[FD] + fonts[Font].fdprivateLengths[FD]) { getDictItem(); // If the dictItem is the "Subrs" then find and store offset, if ("Subrs".equals(key)) fonts[Font].PrivateSubrsOffset[FD] = (int) ((Integer) args[0]) + fonts[Font].fdprivateOffsets[FD]; } //Read the lsubr index if the lsubr was found if (fonts[Font].PrivateSubrsOffset[FD] >= 0) fonts[Font].PrivateSubrsOffsetsArray[FD] = getIndex(fonts[Font].PrivateSubrsOffset[FD]); }
/** * Read the FDArray count, offsize and Offset array * * @param Font */ protected void ReadFDArray(int Font) { seek(fonts[Font].fdarrayOffset); fonts[Font].FDArrayCount = getCard16(); fonts[Font].FDArrayOffsize = getCard8(); // Since we will change values inside the FDArray objects // We increase its offsize to prevent errors if (fonts[Font].FDArrayOffsize < 4) fonts[Font].FDArrayOffsize++; fonts[Font].FDArrayOffsets = getIndex(fonts[Font].fdarrayOffset); }
/** * Read the FDArray count, offsize and Offset array * * @param Font */ protected void ReadFDArray(int Font) { seek(fonts[Font].fdarrayOffset); fonts[Font].FDArrayCount = getCard16(); fonts[Font].FDArrayOffsize = getCard8(); // Since we will change values inside the FDArray objects // We increase its offsize to prevent errors if (fonts[Font].FDArrayOffsize < 4) fonts[Font].FDArrayOffsize++; fonts[Font].FDArrayOffsets = getIndex(fonts[Font].fdarrayOffset); }
/** * The function finds for the FD array processed the local subr offset and its * offset array. * * @param Font the font * @param FD The FDARRAY processed */ protected void BuildFDSubrsOffsets(int Font, int FD) { // Initiate to -1 to indicate lsubr operator present fonts[Font].PrivateSubrsOffset[FD] = -1; // Goto beginning of objects seek(fonts[Font].fdprivateOffsets[FD]); // While in the same object: while (getPosition() < fonts[Font].fdprivateOffsets[FD] + fonts[Font].fdprivateLengths[FD]) { getDictItem(); // If the dictItem is the "Subrs" then find and store offset, if ("Subrs".equals(key)) fonts[Font].PrivateSubrsOffset[FD] = (int) ((Integer) args[0]) + fonts[Font].fdprivateOffsets[FD]; } //Read the lsubr index if the lsubr was found if (fonts[Font].PrivateSubrsOffset[FD] >= 0) fonts[Font].PrivateSubrsOffsetsArray[FD] = getIndex(fonts[Font].PrivateSubrsOffset[FD]); }
fonts[Font].SubrsOffsets = getIndex(fonts[Font].privateSubrs);
fonts[Font].SubrsOffsets = getIndex(fonts[Font].privateSubrs);
fonts[i].charstringsOffsets = getIndex(fonts[i].charstringsOffset);
fonts[i].charstringsOffsets = getIndex(fonts[i].charstringsOffset);