diff options
author | Sven Gothel <[email protected]> | 2023-04-14 17:39:58 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-14 17:39:58 +0200 |
commit | be865f7fdb672ce41110231ba71903671942268b (patch) | |
tree | c9ddaf075379ac8fae0a50e743da3aa071b0aa0c /src/jogl/classes/jogamp/graph/font | |
parent | 5b85091196a128c2d68258ed19f1d8d1726a05d8 (diff) |
Typecast GlyfTable: Use `final` qualifier (cleanup)
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
-rw-r--r-- | src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java index ad59f95cd..d35ce9baf 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java @@ -63,25 +63,25 @@ public class GlyfTable implements Table { private final GlyfDescript[] _descript; public GlyfTable( - DataInput di, - int length, - MaxpTable maxp, - LocaTable loca) throws IOException { + final DataInput di, + final int length, + final MaxpTable maxp, + final LocaTable loca) throws IOException { _descript = new GlyfDescript[maxp.getNumGlyphs()]; - + // Buffer the whole table so we can randomly access it - byte[] buf = new byte[length]; + final byte[] buf = new byte[length]; di.readFully(buf); - ByteArrayInputStream bais = new ByteArrayInputStream(buf); - + final ByteArrayInputStream bais = new ByteArrayInputStream(buf); + // Process all the simple glyphs for (int i = 0; i < maxp.getNumGlyphs(); i++) { - int len = loca.getOffset(i + 1) - loca.getOffset(i); + final int len = loca.getOffset(i + 1) - loca.getOffset(i); if (len > 0) { bais.reset(); bais.skip(loca.getOffset(i)); - DataInputStream dis = new DataInputStream(bais); - short numberOfContours = dis.readShort(); + final DataInputStream dis = new DataInputStream(bais); + final short numberOfContours = dis.readShort(); if (numberOfContours >= 0) { _descript[i] = new GlyfSimpleDescript(this, i, numberOfContours, dis); } @@ -92,12 +92,12 @@ public class GlyfTable implements Table { // Now do all the composite glyphs for (int i = 0; i < maxp.getNumGlyphs(); i++) { - int len = loca.getOffset(i + 1) - loca.getOffset(i); + final int len = loca.getOffset(i + 1) - loca.getOffset(i); if (len > 0) { bais.reset(); bais.skip(loca.getOffset(i)); - DataInputStream dis = new DataInputStream(bais); - short numberOfContours = dis.readShort(); + final DataInputStream dis = new DataInputStream(bais); + final short numberOfContours = dis.readShort(); if (numberOfContours < 0) { _descript[i] = new GlyfCompositeDescript(this, i, dis); } |