msdfgen-ts 0.3.0 → 0.3.1

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.
@@ -47,3 +47,14 @@ export declare function normalizeShape(shape: Shape): void;
47
47
  * @param contours Contours of one even-odd path (mutated in place).
48
48
  */
49
49
  export declare function orientContours(contours: Contour[]): void;
50
+ /**
51
+ * Winds the outer contours of one nonzero fill clockwise (y-up), as TrueType outlines and
52
+ * `orientContours` leave them, by reversing all of `contours` when its largest contour runs
53
+ * counter-clockwise. Holes keep their direction against the outer contours, so the fill does
54
+ * not change. What changes is that fills drawn in opposite directions no longer cancel out
55
+ * where they overlap once their contours are concatenated into one nonzero shape. The largest
56
+ * contour decides: a path that winds its own outer contours in both directions stays as it is.
57
+ *
58
+ * @param contours Contours of one nonzero fill (mutated in place).
59
+ */
60
+ export declare function alignWinding(contours: Contour[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "msdfgen-ts",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Runtime MSDF font atlases for WebGL/WebGPU: a TypeScript port of msdfgen with a built-in TrueType parser. No WASM.",
5
5
  "keywords": [
6
6
  "atlas",