Automattic / Automattic/node-canvas

Support dpi other than 96dpi

Open
#99 6 comments 0 reactions 0 assignees View on GitHub
Needs more info
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

I guess V8 thinks we're on a screen with 96dpi. I think wkhtmltopdf provides an option to change this to eg 300dpi instead.

To reproduce:
- ctx.font = '9pt arial';
- open and compare to eg Photoshop text at 9pt
- notice it's much smaller

To (temporarily) fix:

pt = function(screen_pt) {
return screen_pt / 96 \* 300; // presumably?
}
ctx.font = pt(9) + 'pt arial';

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.