@simple-mark/canvas 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -0
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -365,6 +365,7 @@ const PLACEHOLDER = "rgba(129, 139, 152, 0.15)";
365
365
  * the layout's estimate where a browser doesn't give font metrics.
366
366
  */
367
367
  function baseline(ctx, run) {
368
+ ctx.textBaseline = "alphabetic";
368
369
  const metrics = ctx.measureText("x");
369
370
  const ascent = metrics.fontBoundingBoxAscent;
370
371
  const descent = metrics.fontBoundingBoxDescent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-mark/canvas",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Draws Markdown on a <canvas> without hiding its syntax: layout (no DOM) and Canvas 2D painting.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@simple-mark/math": "^0.3.1",
27
- "@simple-mark/model": "^0.3.1"
26
+ "@simple-mark/math": "^0.3.2",
27
+ "@simple-mark/model": "^0.3.2"
28
28
  }
29
29
  }