@weasel-js/text 1.15.0 → 1.15.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.
- package/dist/{chunk-ZNSU5C43.js → chunk-WUFANHTE.js} +60 -28
- package/dist/chunk-WUFANHTE.js.map +1 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.js +2 -2
- package/dist/{test-seams-Ck0mfD3U.d.ts → test-seams-B2R_EedN.d.ts} +3 -1
- package/dist/test-seams.d.ts +1 -1
- package/dist/test-seams.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-ZNSU5C43.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StyledRun, T as TextStyle, L as LaidOutRuns, R as ResolvedTextStyle, a as ResolvedRun, b as LayoutRunsOpts, c as TextShaper, C as CacheUse, d as TextPaint, P as PlacedGlyph } from './test-seams-
|
|
2
|
-
export { B as BidiAnalysis, e as BidiReordering, f as BidiResolver, D as DEFAULT_TEXT_FILL, g as DEFAULT_TEXT_STYLE, F as FontVariantCaps, h as LAYOUT_CACHE_STRUCTURAL_LIMIT, i as LAYOUT_CACHE_VARIANT_LIMIT, j as LaidOutCell, k as LaidOutLineBox, M as MARKDOWN_RUN_GRAMMAR, l as RunFlag, m as RunGrammar, n as RunMarker, o as RunSourceMap, p as SCRIPT_METRICS, q as SMALL_CAPS_SCALE, r as ScriptPreset, s as ShapedCluster, t as ShapedGlyph, u as SmallCapsText, v as TextAlign, w as TextDirection, x as TextTransform, y as TransformedRunText, z as cachedLayoutRuns, A as clearRuns, E as dropRuns, G as fontString, H as halfLeadingFor, I as isBoldWeight, J as isSmallCapsLetter, K as layoutRuns, N as markdownToRuns, O as numericWeight, Q as paragraphDirection, U as registerBidi, V as registeredBidi, W as resolveAlign, X as resolveRunFace, Y as resolveRuns, Z as resolveRunsInto, _ as resolveTextStyle, $ as resolveTextStyleInto, a0 as runsToMarkdown, a1 as runsToPlainText, a2 as scriptMetrics, a3 as scriptMetricsFor, a4 as smallCapsScale, a5 as smallCapsScaleFor, a6 as smallCapsText, a7 as toRuns, a8 as transformRunTexts, a9 as warnRtlWithoutEngine } from './test-seams-
|
|
1
|
+
import { S as StyledRun, T as TextStyle, L as LaidOutRuns, R as ResolvedTextStyle, a as ResolvedRun, b as LayoutRunsOpts, c as TextShaper, C as CacheUse, d as TextPaint, P as PlacedGlyph } from './test-seams-B2R_EedN.js';
|
|
2
|
+
export { B as BidiAnalysis, e as BidiReordering, f as BidiResolver, D as DEFAULT_TEXT_FILL, g as DEFAULT_TEXT_STYLE, F as FontVariantCaps, h as LAYOUT_CACHE_STRUCTURAL_LIMIT, i as LAYOUT_CACHE_VARIANT_LIMIT, j as LaidOutCell, k as LaidOutLineBox, M as MARKDOWN_RUN_GRAMMAR, l as RunFlag, m as RunGrammar, n as RunMarker, o as RunSourceMap, p as SCRIPT_METRICS, q as SMALL_CAPS_SCALE, r as ScriptPreset, s as ShapedCluster, t as ShapedGlyph, u as SmallCapsText, v as TextAlign, w as TextDirection, x as TextTransform, y as TransformedRunText, z as cachedLayoutRuns, A as clearRuns, E as dropRuns, G as fontString, H as halfLeadingFor, I as isBoldWeight, J as isSmallCapsLetter, K as layoutRuns, N as markdownToRuns, O as numericWeight, Q as paragraphDirection, U as registerBidi, V as registeredBidi, W as resolveAlign, X as resolveRunFace, Y as resolveRuns, Z as resolveRunsInto, _ as resolveTextStyle, $ as resolveTextStyleInto, a0 as runsToMarkdown, a1 as runsToPlainText, a2 as scriptMetrics, a3 as scriptMetricsFor, a4 as smallCapsScale, a5 as smallCapsScaleFor, a6 as smallCapsText, a7 as toRuns, a8 as transformRunTexts, a9 as warnRtlWithoutEngine } from './test-seams-B2R_EedN.js';
|
|
3
3
|
import { FaceRuleMetrics, FaceMetrics, BmFontChar, FontStyle, ResolveResult } from '@weasel-js/font';
|
|
4
4
|
import { Fill, Stroke } from '@weasel-js/paint';
|
|
5
5
|
import { Rect, PolygonPath, PathInWorldPose } from '@weasel-js/geom';
|
|
@@ -142,10 +142,13 @@ declare function layoutTextPose(pose: TextPose, scale?: number): TextPoseLayout;
|
|
|
142
142
|
* it whenever its options carry none. Pass `null`, or call the function
|
|
143
143
|
* returned, to take it out again.
|
|
144
144
|
*
|
|
145
|
-
* Shaping reaches the text whose face
|
|
146
|
-
* `registerFontOutlines`
|
|
147
|
-
*
|
|
148
|
-
*
|
|
145
|
+
* Shaping reaches the text whose face has TrueType or OpenType bytes behind
|
|
146
|
+
* it: a face registered with `registerFontOutlines` alone, or a baked or
|
|
147
|
+
* canvas atlas face whose exact variant is also registered there. The atlas
|
|
148
|
+
* must be cut from that same file, or its advances disagree with the
|
|
149
|
+
* shaper's. On an atlas face, a cluster the shaping left as its code point's
|
|
150
|
+
* own glyph draws from the atlas as before; the rest draw from the shaper's
|
|
151
|
+
* glyphs.
|
|
149
152
|
*/
|
|
150
153
|
declare function registerShaper(shaper: TextShaper | null): () => void;
|
|
151
154
|
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_TAB_SIZE, shapesWithFeature, resolveTextStyle, cachedLayoutRuns, graphemeCount, wrapLines, hangs, emboldenGlyph, layoutRuns, lineDecorations, runFaces, tabAdvance, widthWithTabs, DECORATION_KINDS, decorationRule, faceOutlineD, hasGlyphQuad } from './chunk-
|
|
2
|
-
export { BREAK_ALLOWED, BREAK_MANDATORY, DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, LAYOUT_CACHE_STRUCTURAL_LIMIT, LAYOUT_CACHE_VARIANT_LIMIT, NO_BREAK, QUAD_STRIDE, cachedLayoutRuns, cachedPaintRuns, clearRuns, decorationMetrics, dropRuns, emboldenGlyphD, fontString, isHardLineBreak, layoutRuns, lineBreakOpportunities, paintRuns, paragraphDirection, registerBidi, registerShaper, registeredBidi, resolveAlign, resolveTextStyle, resolveTextStyleInto, syntheticBoldOffset, warnRtlWithoutEngine } from './chunk-
|
|
1
|
+
import { DEFAULT_TAB_SIZE, shapesWithFeature, resolveTextStyle, cachedLayoutRuns, graphemeCount, wrapLines, hangs, emboldenGlyph, layoutRuns, lineDecorations, runFaces, tabAdvance, widthWithTabs, DECORATION_KINDS, decorationRule, faceOutlineD, hasGlyphQuad } from './chunk-WUFANHTE.js';
|
|
2
|
+
export { BREAK_ALLOWED, BREAK_MANDATORY, DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_STYLE, LAYOUT_CACHE_STRUCTURAL_LIMIT, LAYOUT_CACHE_VARIANT_LIMIT, NO_BREAK, QUAD_STRIDE, cachedLayoutRuns, cachedPaintRuns, clearRuns, decorationMetrics, dropRuns, emboldenGlyphD, fontString, isHardLineBreak, layoutRuns, lineBreakOpportunities, paintRuns, paragraphDirection, registerBidi, registerShaper, registeredBidi, resolveAlign, resolveTextStyle, resolveTextStyleInto, syntheticBoldOffset, warnRtlWithoutEngine } from './chunk-WUFANHTE.js';
|
|
3
3
|
import { resolveScreenLength, paintKey, strokeKey } from '@weasel-js/paint';
|
|
4
4
|
import { faceMetricsOf, cachedFontVariant, loadFontOutlines, glyphGeneration, faceMetricsFor, outlineStatus, cssFamilyName } from '@weasel-js/font';
|
|
5
5
|
import { MIXED, deepEqual } from '@weasel-js/registry';
|
|
@@ -621,11 +621,13 @@ interface ShapedCluster {
|
|
|
621
621
|
d: string | null;
|
|
622
622
|
/** Names `d` among the glyphs of one face, for caching what is built from it. */
|
|
623
623
|
key: string;
|
|
624
|
-
/** Each glyph
|
|
624
|
+
/** Each glyph, where it is drawn, and how far the shaper moved the pen past it, in ems
|
|
625
|
+
* from the pen, y down. A mark the shaper set over its base has no advance. */
|
|
625
626
|
glyphs: readonly {
|
|
626
627
|
gid: number;
|
|
627
628
|
x: number;
|
|
628
629
|
y: number;
|
|
630
|
+
advance: number;
|
|
629
631
|
}[];
|
|
630
632
|
/** Whether it was shaped right to left. */
|
|
631
633
|
rtl: boolean;
|
package/dist/test-seams.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { aa as _resetBidiWarningForTests, ab as _resetLayoutCacheForTests } from './test-seams-
|
|
1
|
+
export { aa as _resetBidiWarningForTests, ab as _resetLayoutCacheForTests } from './test-seams-B2R_EedN.js';
|
|
2
2
|
import '@weasel-js/paint';
|
|
3
3
|
import '@weasel-js/font';
|
package/dist/test-seams.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weasel-js/text",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "Typography for weasel: styled runs, style resolution, kerned glyph layout, wrap and measurement. No scene graph, no React.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"./package.json": "./package.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@weasel-js/geom": "1.15.
|
|
24
|
-
"@weasel-js/paint": "1.15.
|
|
25
|
-
"@weasel-js/registry": "1.15.
|
|
23
|
+
"@weasel-js/geom": "1.15.1",
|
|
24
|
+
"@weasel-js/paint": "1.15.1",
|
|
25
|
+
"@weasel-js/registry": "1.15.1"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"test": "vitest run",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"provenance": true
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@weasel-js/bidi": "1.15.
|
|
54
|
+
"@weasel-js/bidi": "1.15.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@weasel-js/font": "1.15.
|
|
57
|
+
"@weasel-js/font": "1.15.1"
|
|
58
58
|
}
|
|
59
59
|
}
|