msdfgen-ts 0.2.0 → 0.3.0
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.
- package/README.md +3 -3
- package/dist/atlas-worker.js +2572 -1415
- package/dist/msdfgen-ts.iife.js +3 -3
- package/dist/msdfgen-ts.js +2652 -1495
- package/dist/types/atlas-gen.d.ts +7 -3
- package/dist/types/font/font.d.ts +38 -3
- package/dist/types/font/glyph-run.d.ts +50 -0
- package/dist/types/font/script.d.ts +47 -0
- package/dist/types/font/shaper.d.ts +41 -0
- package/dist/types/font/tables/gdef.d.ts +25 -0
- package/dist/types/font/tables/gpos.d.ts +85 -0
- package/dist/types/font/tables/kern.d.ts +31 -14
- package/dist/types/font/tables/otl.d.ts +27 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@ Crisp text at any size for WebGL and WebGPU. Load a TrueType font, get a multi-c
|
|
|
5
5
|
**[Live demos](https://w8r.github.io/msdfgen-ts/)** · minimal examples: [WebGPU](demo/hello-webgpu/main.ts), [WebGL2](demo/hello-webgl/main.ts)
|
|
6
6
|
|
|
7
7
|
- TypeScript port of [msdfgen](https://github.com/Chlumsky/msdfgen) that matches the C++ output to 1e-4 per texel
|
|
8
|
-
- Built-in TrueType parser with kerning
|
|
9
|
-
-
|
|
8
|
+
- Built-in TrueType parser, with kerning that matches Chrome's (GPOS and `kern`)
|
|
9
|
+
- 30 KB gzipped, no WASM, one tiny dependency ([potpack](https://github.com/mapbox/potpack))
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -82,7 +82,7 @@ The complete setup, colour layers included, is in [demo/hello-svg/main.ts](demo/
|
|
|
82
82
|
|
|
83
83
|
- TrueType (`glyf`) outlines only. No CFF/OTF, no variable fonts.
|
|
84
84
|
- SVG: fills only (paths and basic shapes, transforms, `.class` CSS, solid / linear / radial gradient fills, clip paths, group opacity, percentage lengths, clipped to the viewBox). No strokes, masks, filters, blend modes, `<use>` (outside clip paths) or `<text>`.
|
|
85
|
-
-
|
|
85
|
+
- Text layout is kerning only: no ligatures or other glyph substitution (GSUB), no complex scripts, no mark positioning. Kerning (GPOS or the `kern` table, per script run) matches Chrome's.
|
|
86
86
|
- Generation takes about 2–10 ms per glyph at 48 px/em, depending on complexity. Build atlases up front or in the worker, not per frame.
|
|
87
87
|
|
|
88
88
|
## Demos
|