tegaki 0.15.0 → 0.17.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 +16 -0
- package/FONTS-LICENSE.md +24 -0
- package/README.md +14 -5
- package/dist/core/index.d.mts +3 -2
- package/dist/core/index.mjs +1 -1
- package/dist/{core-B7NiOWkP.mjs → core-BrU5Htjs.mjs} +678 -90
- package/dist/core-BrU5Htjs.mjs.map +1 -0
- package/dist/fonts/amiri/amiri-7df37680.ttf +0 -0
- package/dist/fonts/amiri/amiri.ttf +0 -0
- package/dist/fonts/amiri/bundle.d.mts +10631 -0
- package/dist/fonts/amiri/bundle.mjs +130866 -0
- package/dist/fonts/amiri/bundle.mjs.map +1 -0
- package/dist/fonts/caveat/bundle.d.mts +1992 -10
- package/dist/fonts/caveat/bundle.mjs +31054 -105
- package/dist/fonts/caveat/bundle.mjs.map +1 -1
- package/dist/fonts/italianno/bundle.d.mts +1548 -10
- package/dist/fonts/italianno/bundle.mjs +32832 -198
- package/dist/fonts/italianno/bundle.mjs.map +1 -1
- package/dist/fonts/klee-one/bundle.d.mts +11442 -0
- package/dist/fonts/klee-one/bundle.mjs +234910 -0
- package/dist/fonts/klee-one/bundle.mjs.map +1 -0
- package/dist/fonts/klee-one/klee-one-d192e144.ttf +0 -0
- package/dist/fonts/klee-one/klee-one.ttf +0 -0
- package/dist/fonts/parisienne/bundle.d.mts +939 -10
- package/dist/fonts/parisienne/bundle.mjs +19540 -192
- package/dist/fonts/parisienne/bundle.mjs.map +1 -1
- package/dist/fonts/suez-one/bundle.d.mts +2181 -0
- package/dist/fonts/suez-one/bundle.mjs +30466 -0
- package/dist/fonts/suez-one/bundle.mjs.map +1 -0
- package/dist/fonts/suez-one/suez-one-ac7f1d1c.ttf +0 -0
- package/dist/fonts/suez-one/suez-one.ttf +0 -0
- package/dist/fonts/tangerine/bundle.d.mts +40 -10
- package/dist/fonts/tangerine/bundle.mjs +52 -119
- package/dist/fonts/tangerine/bundle.mjs.map +1 -1
- package/dist/fonts/tillana/bundle.d.mts +8557 -0
- package/dist/fonts/tillana/bundle.mjs +224308 -0
- package/dist/fonts/tillana/bundle.mjs.map +1 -0
- package/dist/fonts/tillana/tillana-12e48378.ttf +0 -0
- package/dist/fonts/tillana/tillana.ttf +0 -0
- package/dist/{index-DMa72T_I.d.mts → index-JT-cQ_gO.d.mts} +3 -2
- package/dist/{index-B_c_g7Y-.d.mts → index-vDGB0qjx.d.mts} +150 -191
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +2 -2
- package/dist/react/index.d.mts +4 -3
- package/dist/react/index.mjs +2 -2
- package/dist/{react-ZkNwynZ5.mjs → react-DBKcqp07.mjs} +6 -4
- package/dist/react-DBKcqp07.mjs.map +1 -0
- package/dist/shaper-harfbuzz/index.d.mts +44 -0
- package/dist/shaper-harfbuzz/index.mjs +194 -0
- package/dist/shaper-harfbuzz/index.mjs.map +1 -0
- package/dist/shaper-registry-DVS5R37Q.d.mts +246 -0
- package/dist/solid/index.d.mts +3 -2
- package/dist/solid/index.mjs +7 -2
- package/dist/solid/index.mjs.map +1 -1
- package/dist/wc/index.d.mts +8 -3
- package/dist/wc/index.mjs +16 -3
- package/dist/wc/index.mjs.map +1 -1
- package/fonts/amiri/amiri-7df37680.ttf +0 -0
- package/fonts/amiri/amiri.ttf +0 -0
- package/fonts/amiri/bundle.ts +23 -0
- package/fonts/amiri/glyphData.json +1 -0
- package/fonts/amiri/glyphDataById.json +1 -0
- package/fonts/caveat/bundle.ts +3 -0
- package/fonts/caveat/glyphData.json +1 -1
- package/fonts/caveat/glyphDataById.json +1 -0
- package/fonts/italianno/bundle.ts +3 -0
- package/fonts/italianno/glyphData.json +1 -1
- package/fonts/italianno/glyphDataById.json +1 -0
- package/fonts/klee-one/bundle.ts +23 -0
- package/fonts/klee-one/glyphData.json +1 -0
- package/fonts/klee-one/glyphDataById.json +1 -0
- package/fonts/klee-one/klee-one-d192e144.ttf +0 -0
- package/fonts/klee-one/klee-one.ttf +0 -0
- package/fonts/parisienne/bundle.ts +3 -0
- package/fonts/parisienne/glyphData.json +1 -1
- package/fonts/parisienne/glyphDataById.json +1 -0
- package/fonts/suez-one/bundle.ts +23 -0
- package/fonts/suez-one/glyphData.json +1 -0
- package/fonts/suez-one/glyphDataById.json +1 -0
- package/fonts/suez-one/suez-one-ac7f1d1c.ttf +0 -0
- package/fonts/suez-one/suez-one.ttf +0 -0
- package/fonts/tangerine/glyphData.json +1 -1
- package/fonts/tillana/bundle.ts +23 -0
- package/fonts/tillana/glyphData.json +1 -0
- package/fonts/tillana/glyphDataById.json +1 -0
- package/fonts/tillana/tillana-12e48378.ttf +0 -0
- package/fonts/tillana/tillana.ttf +0 -0
- package/package.json +42 -2
- package/src/astro/TegakiRenderer.astro +5 -4
- package/src/core/engine.ts +213 -65
- package/src/core/index.ts +2 -0
- package/src/core/render-elements.ts +2 -0
- package/src/core/shaper-registry.ts +45 -0
- package/src/core/types.ts +18 -1
- package/src/lib/drawGlyph.ts +20 -4
- package/src/lib/features.ts +28 -0
- package/src/lib/font.ts +27 -15
- package/src/lib/harfbuzzjs.d.ts +71 -0
- package/src/lib/shaper.ts +22 -0
- package/src/lib/textLayout.ts +216 -0
- package/src/lib/timeline.test.ts +203 -0
- package/src/lib/timeline.ts +366 -23
- package/src/lib/utils.test.ts +73 -0
- package/src/lib/utils.ts +20 -1
- package/src/react/TegakiRenderer.tsx +4 -0
- package/src/shaper-harfbuzz/index.test.ts +148 -0
- package/src/shaper-harfbuzz/index.ts +277 -0
- package/src/solid/TegakiRenderer.tsx +5 -1
- package/src/svelte/TegakiRenderer.svelte +5 -3
- package/src/types.ts +42 -1
- package/src/vue/TegakiRenderer.vue +6 -2
- package/src/wc/TegakiElement.ts +15 -0
- package/dist/core-B7NiOWkP.mjs.map +0 -1
- package/dist/react-ZkNwynZ5.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# tegaki
|
|
2
2
|
|
|
3
|
+
## 0.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2b4b435: Support Devanagari writing system and add Tillana as built-in font. Also fixed a bug with generating n-grams, which affected Arabic fonts.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- ee2db76: Fix GPOS and advance width features for some Arabic fonts like "Aref Ruqaa"
|
|
12
|
+
|
|
13
|
+
## 0.16.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 39e075e: Added support for font features and ligatures, RTL languages like Arabic and Hebrew, and text shaping with Harfbuzz. Three new built-in font bundles ship for non-Latin scripts: `tegaki/fonts/suez-one` (Hebrew), `tegaki/fonts/amiri` (Arabic), and `tegaki/fonts/klee-one` (Japanese — kana, JP punctuation, and Kyōiku grade 1–2 kanji).
|
|
18
|
+
|
|
3
19
|
## 0.15.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/FONTS-LICENSE.md
CHANGED
|
@@ -27,6 +27,30 @@ All fonts are licensed under the [SIL Open Font License, Version 1.1](https://op
|
|
|
27
27
|
- **Copyright**: Copyright (c) 2012 by Brian J. Bonislawsky DBA Astigmatic (AOETI)
|
|
28
28
|
- **License**: SIL Open Font License, Version 1.1
|
|
29
29
|
|
|
30
|
+
## Suez One
|
|
31
|
+
|
|
32
|
+
- **Designer**: Michal Sahar
|
|
33
|
+
- **Copyright**: Copyright 2016 Michal Sahar. All rights reserved.
|
|
34
|
+
- **License**: SIL Open Font License, Version 1.1
|
|
35
|
+
|
|
36
|
+
## Klee One
|
|
37
|
+
|
|
38
|
+
- **Designer**: Fontworks Inc.
|
|
39
|
+
- **Copyright**: Copyright 2020 The Klee Project Authors (https://github.com/fontworks-fonts/Klee)
|
|
40
|
+
- **License**: SIL Open Font License, Version 1.1
|
|
41
|
+
|
|
42
|
+
## Amiri
|
|
43
|
+
|
|
44
|
+
- **Designer**: Khaled Hosny
|
|
45
|
+
- **Copyright**: Copyright 2010-2022 The Amiri Project Authors (https://github.com/aliftype/amiri)
|
|
46
|
+
- **License**: SIL Open Font License, Version 1.1
|
|
47
|
+
|
|
48
|
+
## Tillana
|
|
49
|
+
|
|
50
|
+
- **Designer**: Indian Type Foundry, Shiva Nallaperumal
|
|
51
|
+
- **Copyright**: Copyright (c) 2014, Indian Type Foundry (info@indiantypefoundry.com)
|
|
52
|
+
- **License**: SIL Open Font License, Version 1.1
|
|
53
|
+
|
|
30
54
|
---
|
|
31
55
|
|
|
32
56
|
## SIL Open Font License, Version 1.1
|
package/README.md
CHANGED
|
@@ -65,12 +65,16 @@ import { registerTegakiElement } from 'tegaki/wc'; // Web Components
|
|
|
65
65
|
|
|
66
66
|
## Built-in Fonts
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Several handwriting fonts are bundled and ready to use:
|
|
69
69
|
|
|
70
|
-
- **Caveat** — `tegaki/fonts/caveat`
|
|
71
|
-
- **Italianno** — `tegaki/fonts/italianno`
|
|
72
|
-
- **Tangerine** — `tegaki/fonts/tangerine`
|
|
73
|
-
- **Parisienne** — `tegaki/fonts/parisienne`
|
|
70
|
+
- **Caveat** — `tegaki/fonts/caveat` _(Latin)_
|
|
71
|
+
- **Italianno** — `tegaki/fonts/italianno` _(Latin)_
|
|
72
|
+
- **Tangerine** — `tegaki/fonts/tangerine` _(Latin)_
|
|
73
|
+
- **Parisienne** — `tegaki/fonts/parisienne` _(Latin)_
|
|
74
|
+
- **Suez One** — `tegaki/fonts/suez-one` _(Hebrew + Latin)_
|
|
75
|
+
- **Amiri** — `tegaki/fonts/amiri` _(Arabic + Latin)_
|
|
76
|
+
- **Tillana** — `tegaki/fonts/tillana` _(Devanagari + Latin)_
|
|
77
|
+
- **Klee One** — `tegaki/fonts/klee-one` _(Japanese: kana + Kyōiku grade 1–2 kanji + Latin)_
|
|
74
78
|
|
|
75
79
|
For other fonts, use the [interactive generator](https://gkurt.com/tegaki/generator/) to create a custom bundle.
|
|
76
80
|
|
|
@@ -83,6 +87,11 @@ Visit **[gkurt.com/tegaki](https://gkurt.com/tegaki)** for full documentation:
|
|
|
83
87
|
- [Generating Fonts](https://gkurt.com/tegaki/guides/generating/)
|
|
84
88
|
- [API Reference](https://gkurt.com/tegaki/api/renderer/)
|
|
85
89
|
|
|
90
|
+
## Integrations
|
|
91
|
+
|
|
92
|
+
- [Sli.dev](https://sli.dev/) - Create presentations using markdown. [See Tegaki integration example](https://andreas-taranetz.github.io/slidev-addon-animated-text/)
|
|
93
|
+
- [Remotion](https://www.remotion.dev/) - Create videos programmatically with React. [See Tegaki integration example](https://github.com/KurtGokhan/tegaki/blob/gokhan/support-font-features/examples/remotion/src/Root.tsx)
|
|
94
|
+
|
|
86
95
|
## License
|
|
87
96
|
|
|
88
97
|
[MIT](LICENSE)
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { S as TimedPoint, _ as TegakiEffectName, a as BBox, b as TegakiMultiEffectName, c as CSSLength, d as LineCap, f as PathCommand, g as TegakiEffectConfigs, h as TegakiBundle, i as ShapedGlyph, l as FontOutput, m as Stroke, o as BUNDLE_VERSION, p as Point, r as BundleShaper, s as COMPATIBLE_BUNDLE_VERSIONS, t as ShaperFactory, u as GlyphData, v as TegakiEffects, x as TegakiSingletonEffectName, y as TegakiGlyphData } from "../shaper-registry-DVS5R37Q.mjs";
|
|
2
|
+
import { A as TimelineEntry, C as resolveEffects, D as computeTextLayout, E as computeLayoutBbox, O as Timeline, S as hasRenderHooks, T as TextLayout, _ as RenderStageContext, a as CreateElementFn, b as findEffects, c as TimeControlMode, d as getBundle, f as registerBundle, g as EffectDefinition, h as drawGlyph, i as TegakiEngine, j as computeTimeline, k as TimelineConfig, l as TimeControlProp, m as ensureFontFace, n as buildRootProps, o as TegakiEngineOptions, p as resolveBundle, r as domCreateElement, s as TegakiQuality, t as buildChildren, u as createBundle, v as ResolvedEffect, w as LayoutBBox, x as getEffectDefinition, y as findEffect } from "../index-vDGB0qjx.mjs";
|
|
3
|
+
export { BBox, BUNDLE_VERSION, BundleShaper, COMPATIBLE_BUNDLE_VERSIONS, CSSLength, CreateElementFn, EffectDefinition, FontOutput, GlyphData, LayoutBBox, LineCap, PathCommand, Point, RenderStageContext, ResolvedEffect, ShapedGlyph, ShaperFactory, Stroke, TegakiBundle, TegakiEffectConfigs, TegakiEffectName, TegakiEffects, TegakiEngine, TegakiEngineOptions, TegakiGlyphData, TegakiMultiEffectName, TegakiQuality, TegakiSingletonEffectName, TextLayout, TimeControlMode, TimeControlProp, TimedPoint, Timeline, TimelineConfig, TimelineEntry, buildChildren, buildRootProps, computeLayoutBbox, computeTextLayout, computeTimeline, createBundle, domCreateElement, drawGlyph, ensureFontFace, findEffect, findEffects, getBundle, getEffectDefinition, hasRenderHooks, registerBundle, resolveBundle, resolveEffects };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as findEffect, a as createBundle, b as hasRenderHooks, c as resolveBundle, d as computeTimeline, f as computeLayoutBbox, h as drawGlyph, i as domCreateElement, l as BUNDLE_VERSION, m as ensureFontFace, n as buildChildren, o as getBundle, p as computeTextLayout, r as buildRootProps, s as registerBundle, t as TegakiEngine, u as COMPATIBLE_BUNDLE_VERSIONS, v as findEffects, x as resolveEffects, y as getEffectDefinition } from "../core-
|
|
1
|
+
import { _ as findEffect, a as createBundle, b as hasRenderHooks, c as resolveBundle, d as computeTimeline, f as computeLayoutBbox, h as drawGlyph, i as domCreateElement, l as BUNDLE_VERSION, m as ensureFontFace, n as buildChildren, o as getBundle, p as computeTextLayout, r as buildRootProps, s as registerBundle, t as TegakiEngine, u as COMPATIBLE_BUNDLE_VERSIONS, v as findEffects, x as resolveEffects, y as getEffectDefinition } from "../core-BrU5Htjs.mjs";
|
|
2
2
|
export { BUNDLE_VERSION, COMPATIBLE_BUNDLE_VERSIONS, TegakiEngine, buildChildren, buildRootProps, computeLayoutBbox, computeTextLayout, computeTimeline, createBundle, domCreateElement, drawGlyph, ensureFontFace, findEffect, findEffects, getBundle, getEffectDefinition, hasRenderHooks, registerBundle, resolveBundle, resolveEffects };
|