/** * 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; }
/** * Tries to find the information about lig/kerns for word boundaries in tfm lig/kern table and * checks for errors. TFtoPL[69] */ private void setupBoundary() { // first entry TfmLigKernCommand lkc = ligkerncommand[0]; if (lkc.meansBoundary()) { boundaryChar = lkc.nextChar(); lkc.setActivity(TfmLigKernCommand.PASSTHROUGH); } // last entry lkc = ligkerncommand[ligkerncommand.length - 1]; if (lkc.meansBoundary()) { int start = lkc.restartIndex(); lkc.setActivity(TfmLigKernCommand.PASSTHROUGH); if (start < ligkerncommand.length) { ligkerncommand[start].setActivity(TfmLigKernCommand.ACCESSIBLE); labels.add(start, BOUNDARYLABEL); } } }