• R/O
  • SSH
  • HTTPS

copper: Commit


Commit MetaInfo

Revision1584 (tree)
Time2019-01-25 11:05:08
Authormiyabe

Log Message

(empty log message)

Change Summary

Incremental Difference

--- copper/trunk/homare/pom.xml (revision 1583)
+++ copper/trunk/homare/pom.xml (revision 1584)
@@ -9,7 +9,7 @@
99 <groupId>net.zamasoft</groupId>
1010 <artifactId>homare</artifactId>
1111 <packaging>jar</packaging>
12- <version>3.2.3</version>
12+ <version>3.2.4</version>
1313 <name>Homare</name>
1414 <description>印刷向けのHTML/CSSレンダリングエンジンです。</description>
1515 <url>http://copper.osdn.jp/homare/</url>
--- copper/trunk/sakae/zs-font/src/main/java/net/zamasoft/font/cff/Type2CharString.java (revision 1583)
+++ copper/trunk/sakae/zs-font/src/main/java/net/zamasoft/font/cff/Type2CharString.java (revision 1584)
@@ -134,6 +134,9 @@
134134
135135 public Glyph getGlyph(final int ix, final int offset, final short upm, final int[] globalSubrOffsets,
136136 final int[] localSubrOffsets) {
137+ if (DEBUG) {
138+ System.err.println("GLYPH: "+ix);
139+ }
137140 ByteArrayOutputStream buff = new ByteArrayOutputStream();
138141 GeneralPath path = new GeneralPath();
139142 path.moveTo(0, 0);
@@ -473,19 +476,18 @@
473476 }
474477 break;
475478 case FLEX: {
476- int i = this.operandStack.size();
477- float x1 = cx += this.operandStack.get(i);
478- float y1 = cy += -this.operandStack.get(i + 1);
479- float x2 = cx += this.operandStack.get(i + 2);
480- float y2 = cy += -this.operandStack.get(i + 3);
481- float x3 = cx += this.operandStack.get(i + 4);
482- float y3 = cy += -this.operandStack.get(i + 5);
483- float x4 = cx += this.operandStack.get(i + 6);
484- float y4 = cy += -this.operandStack.get(i + 7);
485- float x5 = cx += this.operandStack.get(i + 8);
486- float y5 = cy += -this.operandStack.get(i + 9);
487- float x6 = cx += this.operandStack.get(i + 10);
488- float y6 = cy += -this.operandStack.get(i + 11);
479+ float x1 = cx += this.operandStack.get(0);
480+ float y1 = cy += -this.operandStack.get(1);
481+ float x2 = cx += this.operandStack.get(2);
482+ float y2 = cy += -this.operandStack.get(3);
483+ float x3 = cx += this.operandStack.get(4);
484+ float y3 = cy += -this.operandStack.get(5);
485+ float x4 = cx += this.operandStack.get(6);
486+ float y4 = cy += -this.operandStack.get(7);
487+ float x5 = cx += this.operandStack.get(8);
488+ float y5 = cy += -this.operandStack.get(9);
489+ float x6 = cx += this.operandStack.get(10);
490+ float y6 = cy += -this.operandStack.get(11);
489491 path.curveTo(x1, y1, x2, y2, x3, y3);
490492 if (DEBUG) {
491493 System.err.println("flex " + x1 + " " + y1 + " " + x2 + " " + y2 + " " + x3 + " " + y3);
@@ -500,18 +502,17 @@
500502 }
501503 break;
502504 case HFLEX: {
503- int i = this.operandStack.size();
504- float x1 = cx += this.operandStack.get(i);
505+ float x1 = cx += this.operandStack.get(0);
505506 float y1 = cy;
506- float x2 = cx += this.operandStack.get(i + 1);
507- float y2 = cy += -this.operandStack.get(i + 2);
508- float x3 = cx += this.operandStack.get(i + 3);
507+ float x2 = cx += this.operandStack.get(1);
508+ float y2 = cy += -this.operandStack.get(2);
509+ float x3 = cx += this.operandStack.get(3);
509510 float y3 = cy;
510- float x4 = cx += this.operandStack.get(i + 4);
511+ float x4 = cx += this.operandStack.get(4);
511512 float y4 = cy;
512- float x5 = cx += this.operandStack.get(i + 5);
513+ float x5 = cx += this.operandStack.get(5);
513514 float y5 = cy;
514- float x6 = cx += this.operandStack.get(i + 6);
515+ float x6 = cx += this.operandStack.get(6);
515516 float y6 = cy;
516517 path.curveTo(x1, y1, x2, y2, x3, y3);
517518 if (DEBUG) {
@@ -527,18 +528,17 @@
527528 }
528529 break;
529530 case HFLEX1: {
530- int i = this.operandStack.size();
531- float x1 = cx += this.operandStack.get(i);
532- float y1 = cy += -this.operandStack.get(i + 1);
533- float x2 = cx += this.operandStack.get(i + 2);
534- float y2 = cy += -this.operandStack.get(i + 3);
535- float x3 = cx += this.operandStack.get(i + 4);
531+ float x1 = cx += this.operandStack.get(0);
532+ float y1 = cy += -this.operandStack.get(1);
533+ float x2 = cx += this.operandStack.get(2);
534+ float y2 = cy += -this.operandStack.get(3);
535+ float x3 = cx += this.operandStack.get(4);
536536 float y3 = cy;
537- float x4 = cx += this.operandStack.get(i + 5);
537+ float x4 = cx += this.operandStack.get(5);
538538 float y4 = cy;
539- float x5 = cx += this.operandStack.get(i + 6);
540- float y5 = cy += -this.operandStack.get(i + 7);
541- float x6 = cx += this.operandStack.get(i + 8);
539+ float x5 = cx += this.operandStack.get(6);
540+ float y5 = cy += -this.operandStack.get(7);
541+ float x6 = cx += this.operandStack.get(8);
542542 float y6 = cy;
543543 path.curveTo(x1, y1, x2, y2, x3, y3);
544544 if (DEBUG) {
@@ -554,19 +554,18 @@
554554 }
555555 break;
556556 case FLEX1: {
557- int i = this.operandStack.size();
558- float x1 = cx += this.operandStack.get(i);
559- float y1 = cy += -this.operandStack.get(i + 1);
560- float x2 = cx += this.operandStack.get(i + 2);
561- float y2 = cy += -this.operandStack.get(i + 3);
562- float x3 = cx += this.operandStack.get(i + 4);
563- float y3 = cy += -this.operandStack.get(i + 5);
564- float x4 = cx += this.operandStack.get(i + 6);
565- float y4 = cy += -this.operandStack.get(i + 7);
566- float x5 = cx += this.operandStack.get(i + 8);
567- float y5 = cy += -this.operandStack.get(i + 9);
568- float x6 = cx += this.operandStack.get(i + 10);
569- float y6 = cy += -this.operandStack.get(i + 11);
557+ float x1 = cx += this.operandStack.get(0);
558+ float y1 = cy += -this.operandStack.get(1);
559+ float x2 = cx += this.operandStack.get(2);
560+ float y2 = cy += -this.operandStack.get(3);
561+ float x3 = cx += this.operandStack.get(4);
562+ float y3 = cy += -this.operandStack.get(5);
563+ float x4 = cx += this.operandStack.get(6);
564+ float y4 = cy += -this.operandStack.get(7);
565+ float x5 = cx += this.operandStack.get(8);
566+ float y5 = cy += -this.operandStack.get(9);
567+ float x6 = cx += this.operandStack.get(10);
568+ float y6 = cy += -this.operandStack.get(10);
570569 path.curveTo(x1, y1, x2, y2, x3, y3);
571570 if (DEBUG) {
572571 System.err.println("flex1 " + x1 + " " + y1 + " " + x2 + " " + y2 + " " + x3 + " " + y3);
@@ -671,6 +670,12 @@
671670
672671 buff.write(ENDCHAR);
673672 byte[] charString = buff.toByteArray();
673+ if (DEBUG) {
674+ for (byte b : charString) {
675+ System.err.print(Integer.toHexString((int)b & 0xFF)+ " ");
676+ }
677+ System.err.println();
678+ }
674679 return new Glyph(path, charString);
675680 }
676681
--- copper/trunk/sakae/zs-font/src/main/java/net/zamasoft/font/cff/Type2Stack.java (revision 1583)
+++ copper/trunk/sakae/zs-font/src/main/java/net/zamasoft/font/cff/Type2Stack.java (revision 1584)
@@ -18,6 +18,7 @@
1818 }
1919
2020 public int get(int ix) {
21+ assert ix < this.size;
2122 return this.values[ix];
2223 }
2324
Show on old repository browser