theWI.setFlowLine(aci.getAttribute(FLOW_LINE_BREAK));
if (prevWI == null) {
prevWI = theWI;
} else if (prevWI != theWI) {
GVTLineMetrics lm = gvtFont.getLineMetrics
(aci, aciWordStart, aciIdx, frc);
prevWI.addLineMetrics(gvtFont, lm);
prevWI.addLineHeight(lineHeight);
aciWordStart = aciIdx;
prevWI = theWI;
}
int chCnt = gv.getCharacterCount(i,i);
if (chCnt == 1) {
char nch;
float kern;
switch(ch) {
case SOFT_HYPHEN:
hideLast[i] = true;
nch = aci.next(); aci.previous();
kern = gvtFont.getHKern(pch, nch);
advAdj[i] = -(glyphPos[2*i+2]-glyphPos[2*i]+kern);
break;
case ZERO_WIDTH_JOINER:
hide[i] = true;
break;
case ZERO_WIDTH_SPACE:
hide[i] = true;
break;
case SPACE:
space[i] = true;
nch = aci.next(); aci.previous();
kern = gvtFont.getHKern(pch, nch);
lastAdvAdj[i] = -(glyphPos[2*i+2]-glyphPos[2*i]+kern);
default:
}
}
aciIdx += chCnt;
if ((aciIdx > runLimit) && (aciIdx < aciEnd)) {
// Possible font size/style change so record current
// line metrics and start fresh.
GVTLineMetrics lm = gvtFont.getLineMetrics
(aci,aciWordStart, runLimit, frc);
prevWI.addLineMetrics(gvtFont, lm);
prevWI.addLineHeight(lineHeight);
prevWI = null;
aciWordStart = aciIdx;
aci.setIndex(aciIdx);
gvtFont = (GVTFont)aci.getAttribute(GVT_FONT);
Float f = (Float)aci.getAttribute(LINE_HEIGHT);
lineHeight = f.floatValue();
runLimit = aci.getRunLimit(szAtts);
}
}
GVTLineMetrics lm = gvtFont.getLineMetrics
(aci,aciWordStart, runLimit, frc);
prevWI.addLineMetrics(gvtFont, lm);
prevWI.addLineHeight(lineHeight);
int [] wordGlyphCounts = new int[words];