mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Accent positioning in Type1 seac
glyphs
In `display/canvas.js` the accent offsets must be multiplied by `fontSize` to make the offsets large enough. Another problem is in `core/type1_parser.js` when the Type1 command `seac` is handled. There is an error in the Adobe Type1 spec. See chapter 6 in Type1 Font Format Supplement, which provides an errata: The arguments of `seac` specify the offset of the left side bearing (LSB) points, not the offset of origins. This can be fixed in `core/type1_parser.js` by adding the difference of the LSB values.
This commit is contained in:
parent
7df8aa34a5
commit
e7febbf0f7
2 changed files with 6 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue