Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't scale SVG stroke width by text matrix #10621

Merged
merged 1 commit into from
Mar 8, 2019

Conversation

janpe2
Copy link
Contributor

@janpe2 janpe2 commented Mar 5, 2019

When operator Tr specifies that text glyphs should be stroked, the line width must not be transformed by the current text matrix. The PDF standard mentions this when it describes text rendering modes:

...The graphics state parameters affecting those operations, such as line width, are interpreted in user space rather than in text space.

This patch uses a technique similar to textMatrixScale in display/canvas.js.

Fixes #10588
Fixes #10619

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Mar 5, 2019

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/687403ff8e5dfc4/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 5, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/687403ff8e5dfc4/output.txt

Total script time: 1.97 mins

Published

@doublex
Copy link

doublex commented Mar 6, 2019

Excellent! Works for me

@timvandermeij timvandermeij merged commit e41c4ae into mozilla:master Mar 8, 2019
@timvandermeij
Copy link
Contributor

Nice find! Thank you for fixing this.

@janpe2 janpe2 deleted the svg-Tm-stroke branch March 10, 2020 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants