mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Make fonts getting loaded by a very nasty hack
This commit is contained in:
parent
e15328800a
commit
61b76c7e87
4 changed files with 33 additions and 24 deletions
6
pdf.js
6
pdf.js
|
@ -2835,7 +2835,7 @@ var CanvasGraphics = (function() {
|
|||
this.current.textMatrix = [ a, b, c, d, e, f ];
|
||||
|
||||
if (this.ctx.$setCurrentX) {
|
||||
this.$setCurrentX(0)
|
||||
this.ctx.$setCurrentX(0)
|
||||
}
|
||||
this.current.x = this.current.lineX = 0;
|
||||
this.current.y = this.current.lineY = 0;
|
||||
|
@ -2851,9 +2851,9 @@ var CanvasGraphics = (function() {
|
|||
if (this.ctx.$showText) {
|
||||
this.ctx.$showText(this.current.y, Fonts.charsToUnicode(text));
|
||||
} else {
|
||||
console.log(text, this.current.x);
|
||||
text = Fonts.charsToUnicode(text);
|
||||
this.ctx.fillText(text, 0, 0);
|
||||
this.ctx.translate(this.current.x, -1 * this.current.y);
|
||||
this.ctx.fillText(Fonts.charsToUnicode(text), 0, 0);
|
||||
this.current.x += this.ctx.measureText(text).width;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue