Status: Untriaged
Owner: ----
Priority: Medium
Type: Defect
New issue 12954 by kaise...@
gmail.com: CanvasKit: strokeText & drawParagraph have different letter spacing
https://bugs.chromium.org/p/skia/issues/detail?id=12954What steps will reproduce the problem?
Load a custom font using CanvasKit, use the normal paragrpah apis to draw text to the canvas, then try using `ctx.strokeText` to add a stroke on top of the canvas. There will be a noticeable difference in the letter spacing the more text that is on the page.
What is the expected output? What do you see instead?
I would expect `ctx.drawParagraph` and `ctx.strokeText` to render text using the same letter spacing. This is not the case. You can see the result in the attached `out.png` file.
What version of the product are you using? On what operating system?
Please submit a code sample via
fiddle.skia.org showing the issue.
this is a deno code example. I am not well versed in C/C++, so unfortunately I am just going to give you the deno repro. This is largely a bug about inconsistencies with the web api, so I probably am stuck giving a javascript repro regardless. It is attached under the file `repro.ts`.
The file can be ran using the following command:
```bash
deno run --allow-run --allow-read --allow-write --watch repro.ts
```
You must also download the font and place it in the same folder as repro.ts (or just download any old font)
Provide any additional information below.
If there is another way to render text strokes using the Paragraph API, or some other canvaskit api, I am just as happy to use that, I just could not find any searching through the type defs (`modules/canvaskit/canvaskit/types/index.d.ts`).
The library I am using to access CanvasKit is
https://github.com/DjDeveloperr/deno-canvasAttachments:
repro.ts 1.4 KB
out.png 54.9 KB
Qdbettercomicsans-jEEeG.ttf 29.7 KB
--
You received this message because:
1. The project was configured to send all issue notifications to this address
You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings