Skip to content

Commit 1aef01f

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@1929277 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8bffbe4 commit 1aef01f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -942,13 +942,13 @@ private byte[] buildHmtxTable() throws IOException
942942
}
943943

944944
long lastOffset = 0;
945-
for (Integer glyphId : glyphIds)
945+
for (Integer gid : glyphIds)
946946
{
947947
// offset in original file
948948
long offset;
949-
if (glyphId <= lastgid)
949+
if (gid <= lastgid)
950950
{
951-
if (invisibleGlyphIds.contains(glyphId))
951+
if (invisibleGlyphIds.contains(gid))
952952
{
953953
// force zero width (no change to last offset)
954954
// 4 bytes total, 2 bytes each for: advance width = 0, left side bearing = 0
@@ -957,7 +957,7 @@ private byte[] buildHmtxTable() throws IOException
957957
else
958958
{
959959
// copy width and lsb
960-
offset = glyphId * 4l;
960+
offset = gid * 4l;
961961
lastOffset = copyBytes(is, bos, offset, lastOffset, 4);
962962
}
963963
}
@@ -975,7 +975,7 @@ private byte[] buildHmtxTable() throws IOException
975975
}
976976

977977
// copy lsb only, as we are beyond numOfHMetrics
978-
offset = h.getNumberOfHMetrics() * 4l + (glyphId - h.getNumberOfHMetrics()) * 2l;
978+
offset = h.getNumberOfHMetrics() * 4l + (gid - h.getNumberOfHMetrics()) * 2l;
979979
lastOffset = copyBytes(is, bos, offset, lastOffset, 2);
980980
}
981981
}

0 commit comments

Comments
 (0)