Merge pull request #12270 from janpe2/type1-accents
Accent positioning in Type1 `seac` glyphs
This commit is contained in:
commit
34cec29288
@ -232,7 +232,9 @@ var Type1CharString = (function Type1CharStringClosure() {
|
|||||||
// seac is like type 2's special endchar but it doesn't use the
|
// seac is like type 2's special endchar but it doesn't use the
|
||||||
// first argument asb, so remove it.
|
// first argument asb, so remove it.
|
||||||
if (seacAnalysisEnabled) {
|
if (seacAnalysisEnabled) {
|
||||||
|
const asb = this.stack[this.stack.length - 5];
|
||||||
this.seac = this.stack.splice(-4, 4);
|
this.seac = this.stack.splice(-4, 4);
|
||||||
|
this.seac[0] += this.lsb - asb;
|
||||||
error = this.executeCommand(0, COMMAND_MAP.endchar);
|
error = this.executeCommand(0, COMMAND_MAP.endchar);
|
||||||
} else {
|
} else {
|
||||||
error = this.executeCommand(4, COMMAND_MAP.endchar);
|
error = this.executeCommand(4, COMMAND_MAP.endchar);
|
||||||
|
@ -1798,8 +1798,10 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
} else {
|
} else {
|
||||||
this.paintChar(character, scaledX, scaledY, patternTransform);
|
this.paintChar(character, scaledX, scaledY, patternTransform);
|
||||||
if (accent) {
|
if (accent) {
|
||||||
scaledAccentX = scaledX + accent.offset.x / fontSizeScale;
|
scaledAccentX =
|
||||||
scaledAccentY = scaledY - accent.offset.y / fontSizeScale;
|
scaledX + (fontSize * accent.offset.x) / fontSizeScale;
|
||||||
|
scaledAccentY =
|
||||||
|
scaledY - (fontSize * accent.offset.y) / fontSizeScale;
|
||||||
this.paintChar(
|
this.paintChar(
|
||||||
accent.fontChar,
|
accent.fontChar,
|
||||||
scaledAccentX,
|
scaledAccentX,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user