Skip to content

Commit 7bd8982

Browse files
committed
PDFBOX-6085: rename variables so that similar code looks even more similar
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1929271 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9b2b9fc commit 7bd8982

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fontbox/src/main/java/org/apache/fontbox/ttf/TTFSubsetter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,10 @@ private void addCompoundReferences() throws IOException
516516
}
517517

518518
long lastOff = 0L;
519-
for (Integer glyphId : glyphIds)
519+
for (Integer gid : glyphIds)
520520
{
521-
long offset = offsets[glyphId];
522-
long len = offsets[glyphId + 1] - offset;
521+
long offset = offsets[gid];
522+
long length = offsets[gid + 1] - offset;
523523
isResult = is.skip(offset - lastOff);
524524

525525
if (Long.compare(isResult, offset - lastOff) != 0)
@@ -528,12 +528,12 @@ private void addCompoundReferences() throws IOException
528528
offset - lastOff, isResult);
529529
}
530530

531-
byte[] buf = new byte[(int)len];
531+
byte[] buf = new byte[(int) length];
532532
isResult = is.read(buf);
533533

534-
if (Long.compare(isResult, len) != 0)
534+
if (Long.compare(isResult, length) != 0)
535535
{
536-
LOG.debug("Tried reading {} bytes but only {} bytes read", len, isResult);
536+
LOG.debug("Tried reading {} bytes but only {} bytes read", length, isResult);
537537
}
538538

539539
// rewrite glyphIds for compound glyphs
@@ -583,7 +583,7 @@ else if ((flags & 1 << 3) != 0)
583583
while ((flags & 1 << 5) != 0); // MORE_COMPONENTS
584584

585585
}
586-
lastOff = offsets[glyphId + 1];
586+
lastOff = offsets[gid + 1];
587587
}
588588
}
589589
hasNested = glyphIdsToAdd != null;

0 commit comments

Comments
 (0)