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

The rendered text looks more pixelated/jagged #809

Open
gebederry opened this issue Apr 4, 2024 · 3 comments
Open

The rendered text looks more pixelated/jagged #809

gebederry opened this issue Apr 4, 2024 · 3 comments

Comments

@gebederry
Copy link

gebederry commented Apr 4, 2024

您好,
我感觉 napi-rs/canvas 渲染绘制的文字好像有点锯齿化,字体的边缘不太平滑,像是在 PhotoShop 中绘制文字时的 浑厚 或是 锐利 的效果。谢谢!
Hello,
I feel like the text rendered via napi-rs/canvas looks more pixelated/jagged, like using the strong or sharp style when drawing text in Photoshop. Thanks!

'smooth' style via type tool in PhotoShop

pFvbOwd.png

node/canvas

pFvbzfP.png

napi-rs/canvas

pFvbxYt.png

@Brooooooklyn Brooooooklyn added the bug Something isn't working label Apr 17, 2024
@Brooooooklyn
Copy link
Owner

@gebederry 你试过使用浏览器渲染出来是什么效果吗? node-canvas 的渲染效果不一定跟浏览器一样

@Brooooooklyn Brooooooklyn removed the bug Something isn't working label Apr 17, 2024
@gebederry
Copy link
Author

gebederry commented Apr 17, 2024

@gebederry 你试过使用浏览器渲染出来是什么效果吗? node-canvas 的渲染效果不一定跟浏览器一样

您说的对,刚才试了下浏览器的 canvas,和 node-canvas napi-rs-canvas 细微之处又有不同,好像更贴近 napi-rs-canvas。字号越小差别越明显。
不知能否让字更 '瘦' 一些🙏

100px - 25px

pFzpKMR.png

@Brooooooklyn
Copy link
Owner

不知能否让字更 '瘦' 一些

感觉这个只能通过 font-weight 来控制, 字体渲染这块我不太熟悉 @yisibl 有什么想法吗

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

No branches or pull requests

2 participants