if (letterSpaceIPD.isStiff() || areaInfo.letterSpaces == 0) {
// constant letter space, or no letter space
returnList.add(new KnuthInlineBox(areaInfo.ipdArea.getOpt(),
areaInfo.alignmentContext,
notifyPos(new LeafPosition(this, 0)), false));
if (areaInfo.isHyphenated) {
returnList.add(new KnuthPenalty(hyphIPD, KnuthPenalty.FLAGGED_PENALTY, true,
new LeafPosition(this, -1), false));
}
} else {
// adjustable letter space
returnList.add(new KnuthInlineBox(areaInfo.ipdArea.getOpt()
- areaInfo.letterSpaces * letterSpaceIPD.getOpt(), areaInfo.alignmentContext,
notifyPos(new LeafPosition(this, 0)), false));
returnList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false,
new LeafPosition(this, -1), true));
returnList.add(new KnuthGlue(letterSpaceIPD.mult(areaInfo.letterSpaces),
new LeafPosition(this, -1), true));
returnList.add (
new KnuthInlineBox(0, null, notifyPos(new LeafPosition(this, -1)), true));
if (areaInfo.isHyphenated) {
returnList.add(new KnuthPenalty(hyphIPD, KnuthPenalty.FLAGGED_PENALTY, true,
new LeafPosition(this, -1), false));
}
}
addKnuthElementsForBorderPaddingEnd(returnList);