msdfgen-ts 0.1.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/LICENSE +22 -0
- package/README.md +85 -0
- package/dist/atlas-worker.js +2142 -0
- package/dist/msdfgen-ts.iife.js +2 -0
- package/dist/msdfgen-ts.js +2114 -0
- package/dist/types/atlas-gen.d.ts +165 -0
- package/dist/types/atlas-worker.d.ts +51 -0
- package/dist/types/font/font.d.ts +105 -0
- package/dist/types/font/reader.d.ts +55 -0
- package/dist/types/font/sfnt.d.ts +20 -0
- package/dist/types/font/tables/cmap.d.ts +21 -0
- package/dist/types/font/tables/glyf.d.ts +70 -0
- package/dist/types/font/tables/head.d.ts +30 -0
- package/dist/types/font/tables/hhea.d.ts +30 -0
- package/dist/types/font/tables/hmtx.d.ts +18 -0
- package/dist/types/font/tables/kern.d.ts +17 -0
- package/dist/types/font/tables/loca.d.ts +19 -0
- package/dist/types/font/tables/maxp.d.ts +10 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/math/cubic.d.ts +12 -0
- package/dist/types/math/scalar.d.ts +101 -0
- package/dist/types/msdf/edge-coloring.d.ts +36 -0
- package/dist/types/msdf/error-correction.d.ts +61 -0
- package/dist/types/msdf/generate.d.ts +42 -0
- package/dist/types/msdf/sdf.d.ts +53 -0
- package/dist/types/shape/contour.d.ts +7 -0
- package/dist/types/shape/normalize.d.ts +38 -0
- package/dist/types/shape/scanline.d.ts +75 -0
- package/dist/types/shape/segments.d.ts +148 -0
- package/dist/types/shape/shape.d.ts +12 -0
- package/package.json +100 -0
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "msdfgen-ts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Runtime MSDF font atlases for WebGL/WebGPU: a TypeScript port of msdfgen with a built-in TrueType parser. No WASM.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"msdf",
|
|
7
|
+
"msdfgen",
|
|
8
|
+
"sdf",
|
|
9
|
+
"signed-distance-field",
|
|
10
|
+
"font",
|
|
11
|
+
"text",
|
|
12
|
+
"truetype",
|
|
13
|
+
"atlas",
|
|
14
|
+
"webgl",
|
|
15
|
+
"webgpu"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/w8r/msdfgen-ts#readme",
|
|
18
|
+
"bugs": "https://github.com/w8r/msdfgen-ts/issues",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/w8r/msdfgen-ts.git"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": "Alexander Milevski",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"main": "./dist/msdfgen-ts.js",
|
|
30
|
+
"module": "./dist/msdfgen-ts.js",
|
|
31
|
+
"types": "./dist/types/index.d.ts",
|
|
32
|
+
"unpkg": "./dist/msdfgen-ts.iife.js",
|
|
33
|
+
"jsdelivr": "./dist/msdfgen-ts.iife.js",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/types/index.d.ts",
|
|
37
|
+
"import": "./dist/msdfgen-ts.js",
|
|
38
|
+
"default": "./dist/msdfgen-ts.js"
|
|
39
|
+
},
|
|
40
|
+
"./worker": {
|
|
41
|
+
"types": "./dist/types/atlas-worker.d.ts",
|
|
42
|
+
"import": "./dist/atlas-worker.js",
|
|
43
|
+
"default": "./dist/atlas-worker.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"sideEffects": [
|
|
47
|
+
"./dist/atlas-worker.js"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"gate:m0": "vitest run test/diff.test.ts",
|
|
51
|
+
"gate:m1": "vitest run test/parser/",
|
|
52
|
+
"gate:m2a": "vitest run test/shape/normalize.test.ts",
|
|
53
|
+
"gate:m2b": "vitest run test/msdf/sdf.test.ts",
|
|
54
|
+
"gate:m2": "vitest run test/shape/normalize.test.ts test/msdf/sdf.test.ts",
|
|
55
|
+
"gate:m3": "vitest run test/msdf/msdf.test.ts",
|
|
56
|
+
"gate:m4": "vitest run test/atlas/",
|
|
57
|
+
"gate:m5": "vitest run test/e2e.test.ts",
|
|
58
|
+
"gate:m6": "vitest run test/size.test.ts && tsx --expose-gc tools/bench.mjs",
|
|
59
|
+
"gate:all": "vitest run test/diff.test.ts test/parser/ test/shape/normalize.test.ts test/msdf/ test/atlas/ test/e2e.test.ts",
|
|
60
|
+
"bench:vitest": "vitest bench test/bench/",
|
|
61
|
+
"gen-golden": "node tools/gen-golden.mjs",
|
|
62
|
+
"setup-reference": "bash tools/setup-reference.sh",
|
|
63
|
+
"atlas-preview": "tsx tools/atlas-preview.mjs",
|
|
64
|
+
"screenshot": "node tools/screenshot.mjs",
|
|
65
|
+
"screenshot:setup": "playwright install chromium",
|
|
66
|
+
"dev": "vite --open /demo/canvas/index.html",
|
|
67
|
+
"dev:webgpu": "vite --open /demo/webgpu/index.html",
|
|
68
|
+
"dev:webgl": "vite --open /demo/webgl/index.html",
|
|
69
|
+
"dev:webgl-zoom": "vite --open /demo/webgl-zoom/index.html",
|
|
70
|
+
"dev:webgpu-zoom": "vite --open /demo/webgpu-zoom/index.html",
|
|
71
|
+
"dev:lucide": "vite --open /demo/lucide/index.html",
|
|
72
|
+
"dev:bench": "vite --open /demo/bench/index.html",
|
|
73
|
+
"build": "vite build && vite build --config vite.worker.config.ts && tsc -p tsconfig.build.json && tsx tools/fix-dts-extensions.ts",
|
|
74
|
+
"build:demo": "vite build --config vite.demo.config.ts",
|
|
75
|
+
"predeploy": "npm run build:demo",
|
|
76
|
+
"deploy": "gh-pages -d demo-dist --nojekyll",
|
|
77
|
+
"size": "vite build && gzip -c dist/msdfgen-ts.iife.js | wc -c | awk '{printf \"%.1f KB (iife, gzip)\\n\", $1/1024}'",
|
|
78
|
+
"lint": "oxlint src/ test/",
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"dev:hello-webgl": "vite --open /demo/hello-webgl/index.html",
|
|
81
|
+
"dev:hello-webgpu": "vite --open /demo/hello-webgpu/index.html",
|
|
82
|
+
"prepublishOnly": "npm run build"
|
|
83
|
+
},
|
|
84
|
+
"dependencies": {
|
|
85
|
+
"potpack": "2.1.0"
|
|
86
|
+
},
|
|
87
|
+
"devDependencies": {
|
|
88
|
+
"@types/node": "22.0.0",
|
|
89
|
+
"@types/opentype.js": "1.3.10",
|
|
90
|
+
"@webgpu/types": "0.1.71",
|
|
91
|
+
"gh-pages": "6.3.0",
|
|
92
|
+
"opentype.js": "1.3.4",
|
|
93
|
+
"oxlint": "1.0.0",
|
|
94
|
+
"playwright": "1.62.1",
|
|
95
|
+
"tsx": "4.23.12",
|
|
96
|
+
"typescript": "7.0.2",
|
|
97
|
+
"vite": "6.3.0",
|
|
98
|
+
"vitest": "3.2.0"
|
|
99
|
+
}
|
|
100
|
+
}
|