for (int i = 0; i < numGlyphs; ++i) { if (Character.isWhitespace(chars[offset + v2l(i)])) { newPositions[i*2] += deltaPos; float deltaAdv = deltas[deltaStart + i*2] + deltas[deltaStart + i*2 + 1]; newCharinfo[i * numvals + posx] += deltaPos; newCharinfo[i * numvals + visx] += deltaPos; newCharinfo[i * numvals + advx] += deltaAdv; deltaPos += deltaAdv; } else { deltaPos += deltas[deltaStart + i*2]; newPositions[i*2] += deltaPos; newCharinfo[i * numvals + posx] += deltaPos; newCharinfo[i * numvals + visx] += deltaPos; deltaPos += deltas[deltaStart + i*2 + 1]; } } newPositions[numGlyphs * 2] += deltaPos; newgv.setGlyphPositions(newPositions); /* newPositions = newgv.getGlyphPositions(null); System.out.println(">> newpositions: " + newPositions); for (int i = 0; i < newPositions.length; i += 2) { System.out.println("[" + (i/2) + "] " + newPositions[i] + ", " + newPositions[i+1]); } */ ExtendedTextSourceLabel result = new ExtendedTextSourceLabel(source, decorator); result.gv = newgv; result.charinfo = newCharinfo; return result; }}Lines 1001–1040 of 1040. Previous lines
for (int i = 0; i < numGlyphs; ++i) { if (Character.isWhitespace(chars[offset + v2l(i)])) { newPositions[i*2] += deltaPos; float deltaAdv = deltas[deltaStart + i*2] + deltas[deltaStart + i*2 + 1]; newCharinfo[i * numvals + posx] += deltaPos; newCharinfo[i * numvals + visx] += deltaPos; newCharinfo[i * numvals + advx] += deltaAdv; deltaPos += deltaAdv; } else { deltaPos += deltas[deltaStart + i*2]; newPositions[i*2] += deltaPos; newCharinfo[i * numvals + posx] += deltaPos; newCharinfo[i * numvals + visx] += deltaPos; deltaPos += deltas[deltaStart + i*2 + 1]; } } newPositions[numGlyphs * 2] += deltaPos; newgv.setGlyphPositions(newPositions); /* newPositions = newgv.getGlyphPositions(null); System.out.println(">> newpositions: " + newPositions); for (int i = 0; i < newPositions.length; i += 2) { System.out.println("[" + (i/2) + "] " + newPositions[i] + ", " + newPositions[i+1]); } */ ExtendedTextSourceLabel result = new ExtendedTextSourceLabel(source, decorator); result.gv = newgv; result.charinfo = newCharinfo; return result; } }