/** Fills in the blank <code>ligKernTable</code> by the final version of lig/kern instructions. */ private void buildLigKernTable() { int currIns = 0; for (int i = 0; i < ligkerncommand.length; i++) { setLigStarts(i, currIns); TfmLigKernCommand lkc = ligkerncommand[i]; if (lkc.getActivity() != TfmLigKernCommand.PASSTHROUGH) { if (!lkc.meansRestart()) { int skip = getSkip(i); ligKernTable[currIns++] = (lkc.meansKern()) ? makeKern(lkc, skip) : makeLig(lkc, skip); } } } }
/** * Finds out the actual starting index of lig/kern program in case there is a restart instructions * and checks for validity. TFtoPL[67] * * @param start the starting index of lig/kern program given in a character info. * @return Returns the actual starting index. */ private int ligStart(final int start) { int newstart = start; if (newstart < ligkerncommand.length) { TfmLigKernCommand lkc = ligkerncommand[start]; if (lkc.meansRestart()) { newstart = lkc.restartIndex(); if (newstart < ligkerncommand.length && lkc.getActivity() == TfmLigKernCommand.UNREACHABLE) { lkc.setActivity(TfmLigKernCommand.PASSTHROUGH); } } } return newstart; }