mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Remove cmap format 100, fixes some nits to merge with upstream
This commit is contained in:
parent
3726686d22
commit
3e78538c1c
3 changed files with 21 additions and 24 deletions
11
pdf.js
11
pdf.js
|
@ -3404,7 +3404,7 @@ var CanvasGraphics = (function() {
|
|||
BX: "beginCompat",
|
||||
EX: "endCompat",
|
||||
},
|
||||
|
||||
|
||||
translateFont: function(fontDict, xref, resources) {
|
||||
var fd = fontDict.get("FontDescriptor");
|
||||
if (!fd)
|
||||
|
@ -3545,7 +3545,7 @@ var CanvasGraphics = (function() {
|
|||
flags: descriptor.get("Flags"),
|
||||
italicAngle: descriptor.get("ItalicAngle"),
|
||||
fixedPitch: false,
|
||||
textMatrix: IDENTITY_MATRIX.slice()
|
||||
textMatrix: IDENTITY_MATRIX
|
||||
};
|
||||
|
||||
return {
|
||||
|
@ -3870,8 +3870,11 @@ var CanvasGraphics = (function() {
|
|||
} else {
|
||||
text = Fonts.charsToUnicode(text);
|
||||
this.ctx.translate(this.current.x, -1 * this.current.y);
|
||||
var matrix = Fonts.lookup(this.current.fontName).properties.textMatrix;
|
||||
this.ctx.transform.apply(this.ctx, matrix);
|
||||
|
||||
var font = Fonts.lookup(this.current.fontName);
|
||||
if (font)
|
||||
this.ctx.transform.apply(this.ctx, font.properties.textMatrix);
|
||||
|
||||
this.ctx.fillText(text, 0, 0);
|
||||
this.current.x += Fonts.measureText(text);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue