File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ var CanvasExtraState = (function CanvasExtraStateClosure() {
157
157
this .wordSpacing = 0 ;
158
158
this .textHScale = 1 ;
159
159
this .textRenderingMode = TextRenderingMode .FILL ;
160
+ this .textRise = 0 ;
160
161
// Color spaces
161
162
this .fillColorSpace = new DeviceGrayCS ();
162
163
this .fillColorSpaceObj = null ;
@@ -601,7 +602,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
601
602
this .current .textRenderingMode = mode ;
602
603
},
603
604
setTextRise : function CanvasGraphics_setTextRise (rise ) {
604
- TODO ( 'text rise: ' + rise ) ;
605
+ this . current . textRise = rise ;
605
606
},
606
607
moveText : function CanvasGraphics_moveText (x , y ) {
607
608
this .current .x = this .current .lineX += x ;
@@ -628,7 +629,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
628
629
629
630
ctx .transform .apply (ctx , current .textMatrix );
630
631
ctx .scale (1 , -1 );
631
- ctx .translate (current .x , -1 * current .y );
632
+ ctx .translate (current .x , -current . y - current .textRise );
632
633
ctx .transform .apply (ctx , fontMatrix );
633
634
ctx .scale (textHScale , 1 );
634
635
},
Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
765
765
if (widths ) {
766
766
var start = 0 , end = 0 ;
767
767
for (var i = 0 , ii = widths .length ; i < ii ; i ++) {
768
- var code = widths [i ];
768
+ var code = xref . fetchIfRef ( widths [i ]) ;
769
769
if (isArray (code )) {
770
770
for (var j = 0 , jj = code .length ; j < jj ; j ++)
771
771
glyphsWidths [start ++] = code [j ];
You can’t perform that action at this time.
0 commit comments