• R/O
  • SSH
  • HTTPS

copper: Commit


Commit MetaInfo

Revision1580 (tree)
Time2018-12-23 20:42:28
Authormiyabe

Log Message

(empty log message)

Change Summary

Incremental Difference

--- copper/branches/3.1/sakae/sakae-core/src/main/java/jp/cssj/sakae/font/otf/OpenTypeFontSource.java (revision 1579)
+++ copper/branches/3.1/sakae/sakae-core/src/main/java/jp/cssj/sakae/font/otf/OpenTypeFontSource.java (revision 1580)
@@ -134,10 +134,10 @@
134134 {
135135 net.zamasoft.font.OpenTypeFont font = this.getOpenTypeFont();
136136 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
138138 .getPath().getBounds().height;
139139 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
141141 : (short) gh.getPath().getBounds().height;
142142 }
143143
--- copper/branches/3.1/sakae/zs-font/src/main/java/net/zamasoft/font/table/LocaTable.java (revision 1579)
+++ copper/branches/3.1/sakae/zs-font/src/main/java/net/zamasoft/font/table/LocaTable.java (revision 1580)
@@ -33,8 +33,7 @@
3333
3434 private short factor = 0;
3535
36- protected LocaTable(DirectoryEntry de, RandomAccessFile raf)
37- throws IOException {
36+ protected LocaTable(DirectoryEntry de, RandomAccessFile raf) throws IOException {
3837 synchronized (raf) {
3938 raf.seek(de.getOffset());
4039 buf = new byte[de.getLength()];
@@ -56,8 +55,7 @@
5655 } else {
5756 factor = 1;
5857 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());
6159 }
6260 }
6361 buf = null;
Show on old repository browser