(mensagem de log vazia)
@@ -134,10 +134,10 @@ | ||
134 | 134 | { |
135 | 135 | net.zamasoft.font.OpenTypeFont font = this.getOpenTypeFont(); |
136 | 136 | Glyph gx = font.getGlyph(this.cmap.mapCharCode('x')); |
137 | - this.xHeight = gx.getPath() == null ? DEFAULT_X_HEIGHT : (short) gx | |
137 | + this.xHeight = (gx == null || gx.getPath() == null) ? DEFAULT_X_HEIGHT : (short) gx | |
138 | 138 | .getPath().getBounds().height; |
139 | 139 | Glyph gh = font.getGlyph(this.cmap.mapCharCode('H')); |
140 | - this.capHeight = gh.getPath() == null ? DEFAULT_CAP_HEIGHT | |
140 | + this.capHeight = (gh == null || gh.getPath() == null) ? DEFAULT_CAP_HEIGHT | |
141 | 141 | : (short) gh.getPath().getBounds().height; |
142 | 142 | } |
143 | 143 |
@@ -33,8 +33,7 @@ | ||
33 | 33 | |
34 | 34 | private short factor = 0; |
35 | 35 | |
36 | - protected LocaTable(DirectoryEntry de, RandomAccessFile raf) | |
37 | - throws IOException { | |
36 | + protected LocaTable(DirectoryEntry de, RandomAccessFile raf) throws IOException { | |
38 | 37 | synchronized (raf) { |
39 | 38 | raf.seek(de.getOffset()); |
40 | 39 | buf = new byte[de.getLength()]; |
@@ -56,8 +55,7 @@ | ||
56 | 55 | } else { |
57 | 56 | factor = 1; |
58 | 57 | for (int i = 0; i <= numGlyphs; i++) { |
59 | - offsets[i] = (bais.read() << 24 | bais.read() << 16 | |
60 | - | bais.read() << 8 | bais.read()); | |
58 | + offsets[i] = (bais.read() << 24 | bais.read() << 16 | bais.read() << 8 | bais.read()); | |
61 | 59 | } |
62 | 60 | } |
63 | 61 | buf = null; |