tegaki 0.11.1 → 0.12.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/CHANGELOG.md +39 -0
- package/README.md +4 -4
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +2 -2
- package/dist/{core-I9K3LqxK.mjs → core-CIzLDu_Q.mjs} +250 -152
- package/dist/core-CIzLDu_Q.mjs.map +1 -0
- package/dist/fonts/caveat/bundle.d.mts +5 -2
- package/dist/fonts/caveat/bundle.mjs +7 -3
- package/dist/fonts/caveat/bundle.mjs.map +1 -1
- package/dist/fonts/caveat/caveat-3dc76002.ttf +0 -0
- package/dist/fonts/italianno/bundle.d.mts +5 -2
- package/dist/fonts/italianno/bundle.mjs +7 -3
- package/dist/fonts/italianno/bundle.mjs.map +1 -1
- package/dist/fonts/italianno/italianno-3dc76002.ttf +0 -0
- package/dist/fonts/parisienne/bundle.d.mts +5 -2
- package/dist/fonts/parisienne/bundle.mjs +7 -3
- package/dist/fonts/parisienne/bundle.mjs.map +1 -1
- package/dist/fonts/parisienne/parisienne-3dc76002.ttf +0 -0
- package/dist/fonts/tangerine/bundle.d.mts +5 -2
- package/dist/fonts/tangerine/bundle.mjs +7 -3
- package/dist/fonts/tangerine/bundle.mjs.map +1 -1
- package/dist/fonts/tangerine/tangerine-3dc76002.ttf +0 -0
- package/dist/{index-CZFVynOK.d.mts → index-DtvcCtXG.d.mts} +109 -7
- package/dist/{index-vDbG4xkP.d.mts → index-d5-O-2U1.d.mts} +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/react/index.d.mts +3 -3
- package/dist/react/index.mjs +3 -3
- package/dist/{react-DGPG66n-.mjs → react-CVoAINjv.mjs} +5 -4
- package/dist/react-CVoAINjv.mjs.map +1 -0
- package/dist/solid/index.d.mts +2 -2
- package/dist/solid/index.mjs +6 -4
- package/dist/solid/index.mjs.map +1 -1
- package/dist/wc/index.d.mts +12 -3
- package/dist/wc/index.mjs +38 -7
- package/dist/wc/index.mjs.map +1 -1
- package/fonts/caveat/bundle.ts +7 -3
- package/fonts/caveat/caveat-3dc76002.ttf +0 -0
- package/fonts/italianno/bundle.ts +7 -3
- package/fonts/italianno/italianno-3dc76002.ttf +0 -0
- package/fonts/parisienne/bundle.ts +7 -3
- package/fonts/parisienne/parisienne-3dc76002.ttf +0 -0
- package/fonts/tangerine/bundle.ts +7 -3
- package/fonts/tangerine/tangerine-3dc76002.ttf +0 -0
- package/package.json +1 -1
- package/src/astro/TegakiRenderer.astro +2 -2
- package/src/core/bundle-registry.ts +16 -1
- package/src/core/createBundle.ts +13 -2
- package/src/core/engine.ts +81 -16
- package/src/core/index.ts +2 -1
- package/src/core/render-elements.ts +5 -3
- package/src/core/types.ts +33 -1
- package/src/lib/drawGlyph.ts +140 -166
- package/src/lib/strokeCache.ts +77 -0
- package/src/lib/textLayout.ts +5 -3
- package/src/lib/timeline.ts +13 -1
- package/src/lib/utils.ts +10 -1
- package/src/react/TegakiRenderer.tsx +4 -2
- package/src/solid/TegakiRenderer.tsx +4 -2
- package/src/svelte/TegakiRenderer.svelte +4 -3
- package/src/types.ts +24 -0
- package/src/vue/TegakiRenderer.vue +5 -3
- package/src/wc/TegakiElement.ts +34 -2
- package/dist/core-I9K3LqxK.mjs.map +0 -1
- package/dist/react-DGPG66n-.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# tegaki
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- be16624: Add bundle format versioning. Generated bundles now include a `version` field (currently `0`) so the engine can detect incompatible bundles. The engine checks the version when a bundle is registered or resolved and logs a console warning (once per bundle) if the version is missing or unsupported.
|
|
8
|
+
|
|
9
|
+
New exports: `BUNDLE_VERSION`, `COMPATIBLE_BUNDLE_VERSIONS`. New optional `TegakiBundle` field: `version`. Existing bundles without a version field trigger the warning but continue to work.
|
|
10
|
+
|
|
11
|
+
- 9776ca3: Cache stroke subdivision across glyph instances. Subdivision now depends
|
|
12
|
+
only on (stroke points, fontSize, segmentSize) and is reused by every
|
|
13
|
+
occurrence of the same glyph in the rendered text. Wobble, progress
|
|
14
|
+
truncation, pressure, taper, and gradient are applied at draw time on
|
|
15
|
+
top of the shared geometry, and effect config changes no longer
|
|
16
|
+
invalidate the cache. Glow draws the full truncated polyline in a single
|
|
17
|
+
stroke() call, removing the previous per-sub-segment shadowBlur cost.
|
|
18
|
+
|
|
19
|
+
Wobble is now sampled per sub-vertex (fractional original-point index
|
|
20
|
+
keeps phase continuous), giving smoother curves than the previous
|
|
21
|
+
lerp-between-wobbled-raw-vertices.
|
|
22
|
+
|
|
23
|
+
- 1ce1324: Add subset font bundling with full-font fallback. Bundles generated from a character subset now ship two font files: a subsetted TTF for the generated glyphs and the full TTF as a CSS fallback. The subset font is registered under a scoped family name (`<family> Tegaki <hash>`) to avoid colliding with user-loaded fonts, while the full font uses the original family name. The renderer composes both in `font-family` so the browser automatically falls back to the full font for non-generated characters.
|
|
24
|
+
|
|
25
|
+
New `TegakiBundle` fields: `fullFamily`, `fullFontUrl`. Existing bundles without these fields continue to work unchanged.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 73a6b7e: Introduces TegakiQuality ({ pixelRatio, segmentSize }) on the engine
|
|
30
|
+
options, replacing the top-level segmentSize. pixelRatio multiplies
|
|
31
|
+
devicePixelRatio when sizing the canvas backing store and root
|
|
32
|
+
transform, letting the browser downsample to the displayed size for
|
|
33
|
+
higher-quality antialiasing at a quadratic cost in pixels filled.
|
|
34
|
+
segmentSize retains its prior meaning under the new namespace.
|
|
35
|
+
- d9b7c85: feat: add stroke and glyph easing functions
|
|
36
|
+
- 7aaf5d2: add rtl direction support
|
|
37
|
+
- 23757ca: Breaking: `quality.segmentSize` is now measured in CSS pixels instead of
|
|
38
|
+
font units. Subdivision count now scales with rendered size, so small
|
|
39
|
+
glyphs are no longer over-subdivided. A 100px stroke with segmentSize=1
|
|
40
|
+
yields ~100 sub-segments; the same stroke at 10px yields ~10.
|
|
41
|
+
|
|
3
42
|
## 0.11.1
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Handwriting animation for any font**
|
|
4
4
|
|
|
5
|
-
Tegaki (手書き) turns any
|
|
5
|
+
Tegaki (手書き) turns any font into animated handwriting.
|
|
6
6
|
No manual path authoring. No native dependencies. Just pick a font.
|
|
7
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/tegaki)
|
|
@@ -72,7 +72,7 @@ Four handwriting fonts are bundled and ready to use:
|
|
|
72
72
|
- **Tangerine** — `tegaki/fonts/tangerine`
|
|
73
73
|
- **Parisienne** — `tegaki/fonts/parisienne`
|
|
74
74
|
|
|
75
|
-
For other
|
|
75
|
+
For other fonts, use the [interactive generator](https://gkurt.com/tegaki/generator/) to create a custom bundle.
|
|
76
76
|
|
|
77
77
|
## Documentation
|
|
78
78
|
|
|
@@ -80,8 +80,8 @@ Visit **[gkurt.com/tegaki](https://gkurt.com/tegaki)** for full documentation:
|
|
|
80
80
|
|
|
81
81
|
- [Getting Started](https://gkurt.com/tegaki/getting-started/)
|
|
82
82
|
- [Framework Guides](https://gkurt.com/tegaki/frameworks/react/) (React, Svelte, Vue, SolidJS, Astro, Web Components, Vanilla)
|
|
83
|
-
- [Generating Fonts](https://gkurt.com/tegaki/guides/generating
|
|
84
|
-
- [API Reference](https://gkurt.com/tegaki/api/
|
|
83
|
+
- [Generating Fonts](https://gkurt.com/tegaki/guides/generating/)
|
|
84
|
+
- [API Reference](https://gkurt.com/tegaki/api/renderer/)
|
|
85
85
|
|
|
86
86
|
## License
|
|
87
87
|
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { BBox, CSSLength, CreateElementFn, FontOutput, GlyphData, LineCap, PathCommand, Point, ResolvedEffect, Stroke, TegakiBundle, TegakiEffectConfigs, TegakiEffectName, TegakiEffects, TegakiEngine, TegakiEngineOptions, TegakiGlyphData, TegakiMultiEffectName, TegakiSingletonEffectName, TextLayout, TimeControlMode, TimeControlProp, TimedPoint, Timeline, TimelineConfig, TimelineEntry, buildChildren, buildRootProps, computeTextLayout, computeTimeline, createBundle, domCreateElement, drawGlyph, ensureFontFace, getBundle, registerBundle, resolveBundle, resolveEffects };
|
|
1
|
+
import { A as LineCap, B as TegakiSingletonEffectName, C as resolveEffects, D as CSSLength, E as COMPATIBLE_BUNDLE_VERSIONS, F as TegakiEffectConfigs, I as TegakiEffectName, L as TegakiEffects, M as Point, N as Stroke, O as FontOutput, P as TegakiBundle, R as TegakiGlyphData, S as ResolvedEffect, T as BUNDLE_VERSION, V as TimedPoint, _ as computeTimeline, a as CreateElementFn, b as ensureFontFace, c as TimeControlMode, d as getBundle, f as registerBundle, g as TimelineEntry, h as TimelineConfig, i as TegakiEngine, j as PathCommand, k as GlyphData, l as TimeControlProp, m as Timeline, n as buildRootProps, o as TegakiEngineOptions, p as resolveBundle, r as domCreateElement, s as TegakiQuality, t as buildChildren, u as createBundle, v as TextLayout, w as BBox, x as drawGlyph, y as computeTextLayout, z as TegakiMultiEffectName } from "../index-DtvcCtXG.mjs";
|
|
2
|
+
export { BBox, BUNDLE_VERSION, COMPATIBLE_BUNDLE_VERSIONS, CSSLength, CreateElementFn, FontOutput, GlyphData, LineCap, PathCommand, Point, ResolvedEffect, Stroke, TegakiBundle, TegakiEffectConfigs, TegakiEffectName, TegakiEffects, TegakiEngine, TegakiEngineOptions, TegakiGlyphData, TegakiMultiEffectName, TegakiQuality, TegakiSingletonEffectName, TextLayout, TimeControlMode, TimeControlProp, TimedPoint, Timeline, TimelineConfig, TimelineEntry, buildChildren, buildRootProps, computeTextLayout, computeTimeline, createBundle, domCreateElement, drawGlyph, ensureFontFace, getBundle, registerBundle, resolveBundle, resolveEffects };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createBundle, c as resolveBundle, d as
|
|
2
|
-
export { TegakiEngine, buildChildren, buildRootProps, computeTextLayout, computeTimeline, createBundle, domCreateElement, drawGlyph, ensureFontFace, getBundle, registerBundle, resolveBundle, resolveEffects };
|
|
1
|
+
import { a as createBundle, c as resolveBundle, d as computeTimeline, f as computeTextLayout, g as resolveEffects, i as domCreateElement, l as BUNDLE_VERSION, m as drawGlyph, n as buildChildren, o as getBundle, p as ensureFontFace, r as buildRootProps, s as registerBundle, t as TegakiEngine, u as COMPATIBLE_BUNDLE_VERSIONS } from "../core-CIzLDu_Q.mjs";
|
|
2
|
+
export { BUNDLE_VERSION, COMPATIBLE_BUNDLE_VERSIONS, TegakiEngine, buildChildren, buildRootProps, computeTextLayout, computeTimeline, createBundle, domCreateElement, drawGlyph, ensureFontFace, getBundle, registerBundle, resolveBundle, resolveEffects };
|