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

Context2D initial font and initial lineWidth problem #2701

Closed
tompng opened this issue Mar 21, 2020 · 4 comments
Closed

Context2D initial font and initial lineWidth problem #2701

tompng opened this issue Mar 21, 2020 · 4 comments

Comments

@tompng
Copy link
Contributor

tompng commented Mar 21, 2020

The initial doc.context2d.font and doc.context2d.lineWidth seems wrong.

The following code should draw 3 same text, but it doesn't.

var doc = new jsPDF()
var ctx = doc.context2d
ctx.strokeText(`font: ${ctx.font}, line: ${ctx.lineWidth}`, 10, 10)
ctx.font = ctx.font // font size is changed(16px → 10px)
ctx.strokeText(`font: ${ctx.font}, line: ${ctx.lineWidth}`, 10, 20)
ctx.lineWidth = ctx.lineWidth // line width is changed(0.2px → 1px)
ctx.strokeText(`font: ${ctx.font}, line: ${ctx.lineWidth}`, 10, 30)

スクリーンショット 2020-03-21 16 59 49

@github-actions
Copy link

github-actions bot commented Jul 3, 2020

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

@github-actions
Copy link

github-actions bot commented Oct 2, 2020

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

@github-actions
Copy link

github-actions bot commented Jan 4, 2021

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

@HackbrettXXX
Copy link
Collaborator

Closing this in favor of #3319.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants