@pdfme/pdf-lib 6.1.13-dev.23 → 6.1.13-dev.25

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.
@@ -8,4 +8,5 @@ export * from './base64.js';
8
8
  export * from './objects.js';
9
9
  export * from './validators.js';
10
10
  export * from './pdfDocEncoding.js';
11
+ export * from './scriptRuns.js';
11
12
  export { default as Cache } from './Cache.js';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Targeted script itemizer for mixed-script shaping.
3
+ *
4
+ * pdf-lib calls fontkit `layout()` once per string and emits only glyph IDs
5
+ * (GPOS offsets are discarded). fontkit then picks a single script from the
6
+ * first strong character, which skips Thai/Lao GSUB mark-variant substitutions
7
+ * when Latin or CJK leads the string.
8
+ *
9
+ * Only mark-critical scripts are split out. Everything else stays one run so
10
+ * existing Latin/CJK output stays bit-identical. Add a row (and a font-level
11
+ * test) to extend the allowlist.
12
+ */
13
+ /**
14
+ * Split `text` into shaping runs at Thai/Lao script boundaries.
15
+ * Concatenating the result always reproduces the input.
16
+ */
17
+ export declare const splitTextIntoShapingRuns: (text: string) => string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/pdf-lib",
3
- "version": "6.1.13-dev.23",
3
+ "version": "6.1.13-dev.25",
4
4
  "description": "Create and modify PDF files with JavaScript",
5
5
  "keywords": [
6
6
  "create",