1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #12270 from janpe2/type1-accents

Accent positioning in Type1 `seac` glyphs
This commit is contained in:
Tim van der Meij 2020-08-24 21:55:33 +02:00 committed by GitHub
commit 34cec29288
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -232,7 +232,9 @@ var Type1CharString = (function Type1CharStringClosure() {
// seac is like type 2's special endchar but it doesn't use the
// first argument asb, so remove it.
if (seacAnalysisEnabled) {
const asb = this.stack[this.stack.length - 5];
this.seac = this.stack.splice(-4, 4);
this.seac[0] += this.lsb - asb;
error = this.executeCommand(0, COMMAND_MAP.endchar);
} else {
error = this.executeCommand(4, COMMAND_MAP.endchar);

View file

@ -1798,8 +1798,10 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
} else {
this.paintChar(character, scaledX, scaledY, patternTransform);
if (accent) {
scaledAccentX = scaledX + accent.offset.x / fontSizeScale;
scaledAccentY = scaledY - accent.offset.y / fontSizeScale;
scaledAccentX =
scaledX + (fontSize * accent.offset.x) / fontSizeScale;
scaledAccentY =
scaledY - (fontSize * accent.offset.y) / fontSizeScale;
this.paintChar(
accent.fontChar,
scaledAccentX,