pdf-parser.js 5.2.29 → 5.3.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/dist/{afm-widths-BHD2HZIL.cjs → afm-widths-C6U0SQj9.cjs} +5 -1448
- package/dist/{afm-widths-B_IGbGky.js → afm-widths-p3UfaXme.js} +3 -1398
- package/dist/afm-widths.cjs +1 -1
- package/dist/afm-widths.js +1 -1
- package/dist/annotations.d.cts +3 -3
- package/dist/annotations.d.ts +3 -3
- package/dist/attachments.d.cts +2 -2
- package/dist/attachments.d.ts +2 -2
- package/dist/builtin-encoding.cjs +4 -3
- package/dist/builtin-encoding.js +2 -1
- package/dist/cmap.d.cts +1 -1
- package/dist/cmap.d.ts +1 -1
- package/dist/content-read.d.cts +1 -1
- package/dist/content-read.d.ts +1 -1
- package/dist/content-write.cjs +1 -1
- package/dist/content-write.d.cts +1 -1
- package/dist/content-write.d.ts +1 -1
- package/dist/content-write.js +1 -1
- package/dist/diagnostics-C9FxfZ6H.d.cts +22 -0
- package/dist/diagnostics-C9FxfZ6H.d.ts +22 -0
- package/dist/diagnostics.d.cts +1 -21
- package/dist/diagnostics.d.ts +1 -21
- package/dist/document.d.cts +1 -1
- package/dist/document.d.ts +1 -1
- package/dist/{embedded-font-ByD7ZiQS.d.ts → embedded-font-CQZbTTDM.d.ts} +1 -1
- package/dist/{embedded-font-DgVBedw6.d.cts → embedded-font-CqePfvrl.d.cts} +1 -1
- package/dist/embedded-font-write.d.cts +1 -1
- package/dist/embedded-font-write.d.ts +1 -1
- package/dist/embedded-font.cjs +2 -2
- package/dist/embedded-font.d.cts +1 -1
- package/dist/embedded-font.d.ts +1 -1
- package/dist/embedded-font.js +2 -2
- package/dist/encoding-glyph-unicode.cjs +353 -0
- package/dist/encoding-glyph-unicode.d.cts +4 -0
- package/dist/encoding-glyph-unicode.d.ts +4 -0
- package/dist/encoding-glyph-unicode.js +352 -0
- package/dist/encoding-standard-tables.cjs +531 -0
- package/dist/encoding-standard-tables.d.cts +7 -0
- package/dist/encoding-standard-tables.d.ts +7 -0
- package/dist/encoding-standard-tables.js +527 -0
- package/dist/encoding-symbol-tables.cjs +531 -0
- package/dist/encoding-symbol-tables.d.cts +7 -0
- package/dist/encoding-symbol-tables.d.ts +7 -0
- package/dist/encoding-symbol-tables.js +527 -0
- package/dist/encoding.cjs +1 -9
- package/dist/encoding.d.cts +1 -9
- package/dist/encoding.d.ts +1 -9
- package/dist/encoding.js +2 -2
- package/dist/encrypt.d.cts +1 -1
- package/dist/encrypt.d.ts +1 -1
- package/dist/filters.d.cts +1 -1
- package/dist/filters.d.ts +1 -1
- package/dist/font-read.cjs +4 -3
- package/dist/font-read.d.cts +2 -2
- package/dist/font-read.d.ts +2 -2
- package/dist/font-read.js +2 -1
- package/dist/font-registry.d.cts +1 -1
- package/dist/font-registry.d.ts +1 -1
- package/dist/form.d.cts +2 -2
- package/dist/form.d.ts +2 -2
- package/dist/gdef-table-D0Hzn4KD.d.cts +15 -0
- package/dist/gdef-table-DL0V8wEZ.d.ts +15 -0
- package/dist/gdef-table.d.cts +1 -14
- package/dist/gdef-table.d.ts +1 -14
- package/dist/glyf-contours.d.cts +12 -1
- package/dist/glyf-contours.d.ts +12 -1
- package/dist/gsub-context.cjs +13 -0
- package/dist/gsub-context.d.cts +34 -0
- package/dist/gsub-context.d.ts +34 -0
- package/dist/gsub-context.js +2 -0
- package/dist/gsub-table-BDpJWqpf.d.ts +52 -0
- package/dist/gsub-table-D6niKeLi.js +556 -0
- package/dist/gsub-table-DW7Wmi9V.d.cts +52 -0
- package/dist/gsub-table-hFfYmf1W.cjs +741 -0
- package/dist/gsub-table.cjs +21 -556
- package/dist/gsub-table.d.cts +2 -2
- package/dist/gsub-table.d.ts +2 -2
- package/dist/gsub-table.js +2 -554
- package/dist/images-read.d.cts +2 -2
- package/dist/images-read.d.ts +2 -2
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/interpret-CqXdXgkY.cjs +712 -0
- package/dist/interpret-aWWhdIzr.js +677 -0
- package/dist/interpret-colors.cjs +6 -0
- package/dist/interpret-colors.d.cts +9 -0
- package/dist/interpret-colors.d.ts +9 -0
- package/dist/interpret-colors.js +2 -0
- package/dist/interpret-marked.cjs +25 -0
- package/dist/interpret-marked.d.cts +11 -0
- package/dist/interpret-marked.d.ts +11 -0
- package/dist/interpret-marked.js +23 -0
- package/dist/interpret-shapes.cjs +212 -0
- package/dist/interpret-shapes.d.cts +32 -0
- package/dist/interpret-shapes.d.ts +32 -0
- package/dist/interpret-shapes.js +199 -0
- package/dist/interpret-types.cjs +0 -0
- package/dist/interpret-types.d.cts +123 -0
- package/dist/interpret-types.d.ts +123 -0
- package/dist/interpret-types.js +0 -0
- package/dist/interpret.cjs +3 -887
- package/dist/interpret.d.cts +5 -116
- package/dist/interpret.d.ts +5 -116
- package/dist/interpret.js +2 -887
- package/dist/math-font.cjs +1 -1
- package/dist/math-font.js +1 -1
- package/dist/measure.cjs +1 -1
- package/dist/measure.js +1 -1
- package/dist/names.d.cts +2 -2
- package/dist/names.d.ts +2 -2
- package/dist/navigation.d.cts +2 -2
- package/dist/navigation.d.ts +2 -2
- package/dist/optional-content.d.cts +2 -2
- package/dist/optional-content.d.ts +2 -2
- package/dist/ot-layout-common-BcsGRFBS.d.cts +10 -0
- package/dist/ot-layout-common-BcsGRFBS.d.ts +10 -0
- package/dist/ot-layout-common.d.cts +1 -9
- package/dist/ot-layout-common.d.ts +1 -9
- package/dist/parse.d.cts +1 -1
- package/dist/parse.d.ts +1 -1
- package/dist/predictors.d.cts +1 -1
- package/dist/predictors.d.ts +1 -1
- package/dist/raster-Cdm3idP_.js +794 -0
- package/dist/raster-EG2KYRZ0.cjs +829 -0
- package/dist/raster-text.cjs +5 -0
- package/dist/raster-text.d.cts +20 -0
- package/dist/raster-text.d.ts +20 -0
- package/dist/raster-text.js +2 -0
- package/dist/raster.cjs +4 -795
- package/dist/raster.d.cts +17 -6
- package/dist/raster.d.ts +17 -6
- package/dist/raster.js +2 -792
- package/dist/read-convert.cjs +310 -0
- package/dist/read-convert.d.cts +58 -0
- package/dist/read-convert.d.ts +58 -0
- package/dist/read-convert.js +295 -0
- package/dist/read.cjs +5 -293
- package/dist/read.d.cts +1 -1
- package/dist/read.d.ts +1 -1
- package/dist/read.js +4 -292
- package/dist/structure.d.cts +2 -2
- package/dist/structure.d.ts +2 -2
- package/dist/winansi.cjs +1 -1
- package/dist/winansi.js +1 -1
- package/dist/write-annotations.cjs +132 -0
- package/dist/write-annotations.d.cts +29 -0
- package/dist/write-annotations.d.ts +29 -0
- package/dist/write-annotations.js +121 -0
- package/dist/write-font-objects.cjs +76 -0
- package/dist/write-font-objects.d.cts +35 -0
- package/dist/write-font-objects.d.ts +35 -0
- package/dist/write-font-objects.js +75 -0
- package/dist/write-form.cjs +91 -0
- package/dist/write-form.d.cts +19 -0
- package/dist/write-form.d.ts +19 -0
- package/dist/write-form.js +89 -0
- package/dist/write-images.cjs +148 -0
- package/dist/write-images.d.cts +25 -0
- package/dist/write-images.d.ts +25 -0
- package/dist/write-images.js +140 -0
- package/dist/write-outline.cjs +46 -0
- package/dist/write-outline.d.cts +18 -0
- package/dist/write-outline.d.ts +18 -0
- package/dist/write-outline.js +45 -0
- package/dist/write-page-emit.cjs +97 -0
- package/dist/write-page-emit.d.cts +63 -0
- package/dist/write-page-emit.d.ts +63 -0
- package/dist/write-page-emit.js +96 -0
- package/dist/write-pages.cjs +37 -0
- package/dist/write-pages.d.cts +21 -0
- package/dist/write-pages.d.ts +21 -0
- package/dist/write-pages.js +36 -0
- package/dist/write-strings.cjs +41 -0
- package/dist/write-strings.d.cts +9 -0
- package/dist/write-strings.d.ts +9 -0
- package/dist/write-strings.js +37 -0
- package/dist/write.cjs +53 -553
- package/dist/write.d.cts +1 -1
- package/dist/write.d.ts +1 -1
- package/dist/write.js +49 -549
- package/dist/xref.d.cts +1 -1
- package/dist/xref.d.ts +1 -1
- package/package.json +2 -2
- package/dist/glyf-contours-B1PsI9oA.d.ts +0 -13
- package/dist/glyf-contours-NHBpgks-.d.cts +0 -13
- package/dist/gsub-table-Bm9kSMzk.d.cts +0 -16
- package/dist/gsub-table-CdfESH2-.d.ts +0 -16
package/dist/form.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PdfDiagnosticSink } from "./diagnostics.js";
|
|
1
|
+
import { i as PdfDiagnosticSink } from "./diagnostics-C9FxfZ6H.js";
|
|
2
2
|
import { n as PdfDict } from "./objects-e2RS3-yT.js";
|
|
3
|
-
import { PdfObjectResolver } from "./interpret.js";
|
|
3
|
+
import { PdfObjectResolver } from "./interpret-types.js";
|
|
4
4
|
import { LayoutFormField } from "./layout.js";
|
|
5
5
|
import { PageIndexLookup } from "./navigation.js";
|
|
6
6
|
//#region src/form.d.ts
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as SfntFont } from "./sfnt-V08bb5ut.cjs";
|
|
2
|
+
//#region src/gdef-table.d.ts
|
|
3
|
+
declare const GLYPH_CLASS_UNCLASSIFIED = 0;
|
|
4
|
+
declare const GLYPH_CLASS_BASE = 1;
|
|
5
|
+
declare const GLYPH_CLASS_LIGATURE = 2;
|
|
6
|
+
declare const GLYPH_CLASS_MARK = 3;
|
|
7
|
+
declare const GLYPH_CLASS_COMPONENT = 4;
|
|
8
|
+
interface GdefTable {
|
|
9
|
+
glyphClass: (glyphId: number) => number;
|
|
10
|
+
markAttachClass: (glyphId: number) => number;
|
|
11
|
+
markFilteringSetCovers: (setIndex: number, glyphId: number) => boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function parseGdefTable(font: SfntFont): GdefTable | undefined;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { GLYPH_CLASS_UNCLASSIFIED as a, GLYPH_CLASS_MARK as i, GLYPH_CLASS_COMPONENT as n, GdefTable as o, GLYPH_CLASS_LIGATURE as r, parseGdefTable as s, GLYPH_CLASS_BASE as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as SfntFont } from "./sfnt-V08bb5ut.js";
|
|
2
|
+
//#region src/gdef-table.d.ts
|
|
3
|
+
declare const GLYPH_CLASS_UNCLASSIFIED = 0;
|
|
4
|
+
declare const GLYPH_CLASS_BASE = 1;
|
|
5
|
+
declare const GLYPH_CLASS_LIGATURE = 2;
|
|
6
|
+
declare const GLYPH_CLASS_MARK = 3;
|
|
7
|
+
declare const GLYPH_CLASS_COMPONENT = 4;
|
|
8
|
+
interface GdefTable {
|
|
9
|
+
glyphClass: (glyphId: number) => number;
|
|
10
|
+
markAttachClass: (glyphId: number) => number;
|
|
11
|
+
markFilteringSetCovers: (setIndex: number, glyphId: number) => boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function parseGdefTable(font: SfntFont): GdefTable | undefined;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { GLYPH_CLASS_UNCLASSIFIED as a, GLYPH_CLASS_MARK as i, GLYPH_CLASS_COMPONENT as n, GdefTable as o, GLYPH_CLASS_LIGATURE as r, parseGdefTable as s, GLYPH_CLASS_BASE as t };
|
package/dist/gdef-table.d.cts
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
//#region src/gdef-table.d.ts
|
|
3
|
-
declare const GLYPH_CLASS_UNCLASSIFIED = 0;
|
|
4
|
-
declare const GLYPH_CLASS_BASE = 1;
|
|
5
|
-
declare const GLYPH_CLASS_LIGATURE = 2;
|
|
6
|
-
declare const GLYPH_CLASS_MARK = 3;
|
|
7
|
-
declare const GLYPH_CLASS_COMPONENT = 4;
|
|
8
|
-
interface GdefTable {
|
|
9
|
-
glyphClass: (glyphId: number) => number;
|
|
10
|
-
markAttachClass: (glyphId: number) => number;
|
|
11
|
-
markFilteringSetCovers: (setIndex: number, glyphId: number) => boolean;
|
|
12
|
-
}
|
|
13
|
-
declare function parseGdefTable(font: SfntFont): GdefTable | undefined;
|
|
14
|
-
//#endregion
|
|
1
|
+
import { a as GLYPH_CLASS_UNCLASSIFIED, i as GLYPH_CLASS_MARK, n as GLYPH_CLASS_COMPONENT, o as GdefTable, r as GLYPH_CLASS_LIGATURE, s as parseGdefTable, t as GLYPH_CLASS_BASE } from "./gdef-table-D0Hzn4KD.cjs";
|
|
15
2
|
export { GLYPH_CLASS_BASE, GLYPH_CLASS_COMPONENT, GLYPH_CLASS_LIGATURE, GLYPH_CLASS_MARK, GLYPH_CLASS_UNCLASSIFIED, GdefTable, parseGdefTable };
|
package/dist/gdef-table.d.ts
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
//#region src/gdef-table.d.ts
|
|
3
|
-
declare const GLYPH_CLASS_UNCLASSIFIED = 0;
|
|
4
|
-
declare const GLYPH_CLASS_BASE = 1;
|
|
5
|
-
declare const GLYPH_CLASS_LIGATURE = 2;
|
|
6
|
-
declare const GLYPH_CLASS_MARK = 3;
|
|
7
|
-
declare const GLYPH_CLASS_COMPONENT = 4;
|
|
8
|
-
interface GdefTable {
|
|
9
|
-
glyphClass: (glyphId: number) => number;
|
|
10
|
-
markAttachClass: (glyphId: number) => number;
|
|
11
|
-
markFilteringSetCovers: (setIndex: number, glyphId: number) => boolean;
|
|
12
|
-
}
|
|
13
|
-
declare function parseGdefTable(font: SfntFont): GdefTable | undefined;
|
|
14
|
-
//#endregion
|
|
1
|
+
import { a as GLYPH_CLASS_UNCLASSIFIED, i as GLYPH_CLASS_MARK, n as GLYPH_CLASS_COMPONENT, o as GdefTable, r as GLYPH_CLASS_LIGATURE, s as parseGdefTable, t as GLYPH_CLASS_BASE } from "./gdef-table-DL0V8wEZ.js";
|
|
15
2
|
export { GLYPH_CLASS_BASE, GLYPH_CLASS_COMPONENT, GLYPH_CLASS_LIGATURE, GLYPH_CLASS_MARK, GLYPH_CLASS_UNCLASSIFIED, GdefTable, parseGdefTable };
|
package/dist/glyf-contours.d.cts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as GlyfTable } from "./glyf-DFyknMrW.cjs";
|
|
2
|
+
//#region src/glyf-contours.d.ts
|
|
3
|
+
interface GlyphContourPoint {
|
|
4
|
+
readonly x: number;
|
|
5
|
+
readonly y: number;
|
|
6
|
+
readonly onCurve: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface GlyphOutline {
|
|
9
|
+
readonly contours: readonly (readonly GlyphContourPoint[])[];
|
|
10
|
+
}
|
|
11
|
+
declare function decodeGlyphOutline(glyf: Readonly<GlyfTable>, glyphId: number): GlyphOutline | undefined;
|
|
12
|
+
//#endregion
|
|
2
13
|
export { GlyphContourPoint, GlyphOutline, decodeGlyphOutline };
|
package/dist/glyf-contours.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as GlyfTable } from "./glyf-Bv1katwK.js";
|
|
2
|
+
//#region src/glyf-contours.d.ts
|
|
3
|
+
interface GlyphContourPoint {
|
|
4
|
+
readonly x: number;
|
|
5
|
+
readonly y: number;
|
|
6
|
+
readonly onCurve: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface GlyphOutline {
|
|
9
|
+
readonly contours: readonly (readonly GlyphContourPoint[])[];
|
|
10
|
+
}
|
|
11
|
+
declare function decodeGlyphOutline(glyf: Readonly<GlyfTable>, glyphId: number): GlyphOutline | undefined;
|
|
12
|
+
//#endregion
|
|
2
13
|
export { GlyphContourPoint, GlyphOutline, decodeGlyphOutline };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_gsub_table = require("./gsub-table-hFfYmf1W.cjs");
|
|
3
|
+
exports.applyContextualRule = require_gsub_table.applyContextualRule;
|
|
4
|
+
exports.applyLookupAtSlot = require_gsub_table.applyLookupAtSlot;
|
|
5
|
+
exports.format3Subtable = require_gsub_table.format3Subtable;
|
|
6
|
+
exports.matchContextualRule = require_gsub_table.matchContextualRule;
|
|
7
|
+
exports.parseContextualSubtable = require_gsub_table.parseContextualSubtable;
|
|
8
|
+
exports.parseFormat3Rule = require_gsub_table.parseFormat3Rule;
|
|
9
|
+
exports.parseSubtable = require_gsub_table.parseSubtable;
|
|
10
|
+
exports.readSequenceRule = require_gsub_table.readSequenceRule;
|
|
11
|
+
exports.readSubstLookupRecords = require_gsub_table.readSubstLookupRecords;
|
|
12
|
+
exports.sequenceSubtable = require_gsub_table.sequenceSubtable;
|
|
13
|
+
exports.visibleInputSlot = require_gsub_table.visibleInputSlot;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as CoverageTable } from "./ot-layout-common-BcsGRFBS.cjs";
|
|
2
|
+
import { b as SlotApplication, d as GsubSubtable, o as GsubLookup, t as ContextualGlyphTest, x as SubstLookupRecord, y as ShapingSlot } from "./gsub-table-DW7Wmi9V.cjs";
|
|
3
|
+
//#region src/gsub-context.d.ts
|
|
4
|
+
declare function matchContextualRule(slots: readonly ShapingSlot[], index: number, skip: (glyphId: number) => boolean, backtrack: readonly ContextualGlyphTest[], inputTests: readonly ContextualGlyphTest[], lookahead: readonly ContextualGlyphTest[]): number[] | undefined;
|
|
5
|
+
declare function applyContextualRule(slots: readonly ShapingSlot[], inputSlots: readonly number[], records: readonly SubstLookupRecord[], lookupOf: (lookupIndex: number) => GsubLookup | undefined, skip: (glyphId: number) => boolean, depth: number): SlotApplication | undefined;
|
|
6
|
+
declare function visibleInputSlot(window: readonly ShapingSlot[], position: number, skip: (glyphId: number) => boolean): number | undefined;
|
|
7
|
+
declare function applyLookupAtSlot(slots: readonly ShapingSlot[], index: number, lookup: GsubLookup, depth: number): SlotApplication | undefined;
|
|
8
|
+
declare function readSubstLookupRecords(bytes: Uint8Array<ArrayBuffer>, offset: number, count: number): SubstLookupRecord[] | undefined;
|
|
9
|
+
interface Format3Rule {
|
|
10
|
+
readonly backtrack: readonly CoverageTable[];
|
|
11
|
+
readonly input: readonly CoverageTable[];
|
|
12
|
+
readonly lookahead: readonly CoverageTable[];
|
|
13
|
+
readonly records: readonly SubstLookupRecord[];
|
|
14
|
+
}
|
|
15
|
+
declare function parseFormat3Rule(bytes: Uint8Array<ArrayBuffer>, subtableOffset: number, chained: boolean): Format3Rule | undefined;
|
|
16
|
+
declare function format3Subtable(rule: Format3Rule, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable;
|
|
17
|
+
interface SequenceRule {
|
|
18
|
+
readonly backtrack: readonly number[];
|
|
19
|
+
readonly input: readonly number[];
|
|
20
|
+
readonly lookahead: readonly number[];
|
|
21
|
+
readonly records: readonly SubstLookupRecord[];
|
|
22
|
+
}
|
|
23
|
+
declare function readSequenceRule(bytes: Uint8Array<ArrayBuffer>, ruleOffset: number, chained: boolean): SequenceRule | undefined;
|
|
24
|
+
interface SequenceRuleAccess {
|
|
25
|
+
readonly setIndexOf: (entryGlyphId: number) => number | undefined;
|
|
26
|
+
readonly backtrackTest: (expected: number) => ContextualGlyphTest;
|
|
27
|
+
readonly inputTest: (expected: number) => ContextualGlyphTest;
|
|
28
|
+
readonly lookaheadTest: (expected: number) => ContextualGlyphTest;
|
|
29
|
+
}
|
|
30
|
+
declare function sequenceSubtable(bytes: Uint8Array<ArrayBuffer>, subtableOffset: number, coverage: Readonly<CoverageTable>, setCount: number, setOffsetsOffset: number, chained: boolean, access: SequenceRuleAccess, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable;
|
|
31
|
+
declare function parseSubtable(bytes: Uint8Array<ArrayBuffer>, lookupType: number, subtableOffset: number, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable | undefined;
|
|
32
|
+
declare function parseContextualSubtable(bytes: Uint8Array<ArrayBuffer>, chained: boolean, subtableOffset: number, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable | undefined;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { applyContextualRule, applyLookupAtSlot, format3Subtable, matchContextualRule, parseContextualSubtable, parseFormat3Rule, parseSubtable, readSequenceRule, readSubstLookupRecords, sequenceSubtable, visibleInputSlot };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as CoverageTable } from "./ot-layout-common-BcsGRFBS.js";
|
|
2
|
+
import { b as SlotApplication, d as GsubSubtable, o as GsubLookup, t as ContextualGlyphTest, x as SubstLookupRecord, y as ShapingSlot } from "./gsub-table-BDpJWqpf.js";
|
|
3
|
+
//#region src/gsub-context.d.ts
|
|
4
|
+
declare function matchContextualRule(slots: readonly ShapingSlot[], index: number, skip: (glyphId: number) => boolean, backtrack: readonly ContextualGlyphTest[], inputTests: readonly ContextualGlyphTest[], lookahead: readonly ContextualGlyphTest[]): number[] | undefined;
|
|
5
|
+
declare function applyContextualRule(slots: readonly ShapingSlot[], inputSlots: readonly number[], records: readonly SubstLookupRecord[], lookupOf: (lookupIndex: number) => GsubLookup | undefined, skip: (glyphId: number) => boolean, depth: number): SlotApplication | undefined;
|
|
6
|
+
declare function visibleInputSlot(window: readonly ShapingSlot[], position: number, skip: (glyphId: number) => boolean): number | undefined;
|
|
7
|
+
declare function applyLookupAtSlot(slots: readonly ShapingSlot[], index: number, lookup: GsubLookup, depth: number): SlotApplication | undefined;
|
|
8
|
+
declare function readSubstLookupRecords(bytes: Uint8Array<ArrayBuffer>, offset: number, count: number): SubstLookupRecord[] | undefined;
|
|
9
|
+
interface Format3Rule {
|
|
10
|
+
readonly backtrack: readonly CoverageTable[];
|
|
11
|
+
readonly input: readonly CoverageTable[];
|
|
12
|
+
readonly lookahead: readonly CoverageTable[];
|
|
13
|
+
readonly records: readonly SubstLookupRecord[];
|
|
14
|
+
}
|
|
15
|
+
declare function parseFormat3Rule(bytes: Uint8Array<ArrayBuffer>, subtableOffset: number, chained: boolean): Format3Rule | undefined;
|
|
16
|
+
declare function format3Subtable(rule: Format3Rule, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable;
|
|
17
|
+
interface SequenceRule {
|
|
18
|
+
readonly backtrack: readonly number[];
|
|
19
|
+
readonly input: readonly number[];
|
|
20
|
+
readonly lookahead: readonly number[];
|
|
21
|
+
readonly records: readonly SubstLookupRecord[];
|
|
22
|
+
}
|
|
23
|
+
declare function readSequenceRule(bytes: Uint8Array<ArrayBuffer>, ruleOffset: number, chained: boolean): SequenceRule | undefined;
|
|
24
|
+
interface SequenceRuleAccess {
|
|
25
|
+
readonly setIndexOf: (entryGlyphId: number) => number | undefined;
|
|
26
|
+
readonly backtrackTest: (expected: number) => ContextualGlyphTest;
|
|
27
|
+
readonly inputTest: (expected: number) => ContextualGlyphTest;
|
|
28
|
+
readonly lookaheadTest: (expected: number) => ContextualGlyphTest;
|
|
29
|
+
}
|
|
30
|
+
declare function sequenceSubtable(bytes: Uint8Array<ArrayBuffer>, subtableOffset: number, coverage: Readonly<CoverageTable>, setCount: number, setOffsetsOffset: number, chained: boolean, access: SequenceRuleAccess, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable;
|
|
31
|
+
declare function parseSubtable(bytes: Uint8Array<ArrayBuffer>, lookupType: number, subtableOffset: number, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable | undefined;
|
|
32
|
+
declare function parseContextualSubtable(bytes: Uint8Array<ArrayBuffer>, chained: boolean, subtableOffset: number, skip: (glyphId: number) => boolean, lookupOf: (lookupIndex: number) => GsubLookup | undefined): GsubSubtable | undefined;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { applyContextualRule, applyLookupAtSlot, format3Subtable, matchContextualRule, parseContextualSubtable, parseFormat3Rule, parseSubtable, readSequenceRule, readSubstLookupRecords, sequenceSubtable, visibleInputSlot };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as sequenceSubtable, C as format3Subtable, D as parseSubtable, E as parseFormat3Rule, O as readSequenceRule, S as applyLookupAtSlot, T as parseContextualSubtable, j as visibleInputSlot, k as readSubstLookupRecords, w as matchContextualRule, x as applyContextualRule } from "./gsub-table-D6niKeLi.js";
|
|
2
|
+
export { applyContextualRule, applyLookupAtSlot, format3Subtable, matchContextualRule, parseContextualSubtable, parseFormat3Rule, parseSubtable, readSequenceRule, readSubstLookupRecords, sequenceSubtable, visibleInputSlot };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { t as SfntFont } from "./sfnt-V08bb5ut.js";
|
|
2
|
+
import { o as GdefTable } from "./gdef-table-DL0V8wEZ.js";
|
|
3
|
+
import { t as ClassDefTable } from "./ot-layout-common-BcsGRFBS.js";
|
|
4
|
+
//#region src/gsub-table.d.ts
|
|
5
|
+
declare const constantZeroClassDef: ClassDefTable;
|
|
6
|
+
declare const DEFAULT_GSUB_FEATURE_TAGS: readonly ["liga", "rlig", "calt", "clig"];
|
|
7
|
+
declare const GSUB_OPT_IN_FEATURE_TAGS: readonly ["smcp", "dlig"];
|
|
8
|
+
type GsubOptInFeatureTag = (typeof GSUB_OPT_IN_FEATURE_TAGS)[number];
|
|
9
|
+
interface GsubShaperOptions {
|
|
10
|
+
readonly optInFeatures?: readonly GsubOptInFeatureTag[];
|
|
11
|
+
}
|
|
12
|
+
declare const LOOKUP_TYPE_SINGLE_SUBST = 1;
|
|
13
|
+
declare const LOOKUP_TYPE_LIGATURE_SUBST = 4;
|
|
14
|
+
declare const LOOKUP_TYPE_CONTEXT_SUBST = 5;
|
|
15
|
+
declare const LOOKUP_TYPE_CHAIN_CONTEXT_SUBST = 6;
|
|
16
|
+
declare const LOOKUP_TYPE_EXTENSION_SUBST = 7;
|
|
17
|
+
declare const EXTENSION_SUBST_HEADER_SIZE = 8;
|
|
18
|
+
declare const EXTENSION_SUBST_OFFSET_FIELD_OFFSET = 4;
|
|
19
|
+
declare const SUBST_FORMAT_AND_COVERAGE_SIZE = 4;
|
|
20
|
+
declare const MAX_LOOKUP_NESTING_DEPTH = 6;
|
|
21
|
+
declare function readTag(bytes: Uint8Array<ArrayBuffer>, offset: number): string;
|
|
22
|
+
interface GsubShaping {
|
|
23
|
+
readonly glyphIds: number[];
|
|
24
|
+
readonly spans: number[];
|
|
25
|
+
}
|
|
26
|
+
type GsubShaper = (glyphIds: readonly number[]) => GsubShaping;
|
|
27
|
+
interface ShapingSlot {
|
|
28
|
+
glyphId: number;
|
|
29
|
+
span: number;
|
|
30
|
+
}
|
|
31
|
+
interface SlotApplication {
|
|
32
|
+
readonly consumed: number;
|
|
33
|
+
readonly replacement: readonly ShapingSlot[];
|
|
34
|
+
}
|
|
35
|
+
interface SubstLookupRecord {
|
|
36
|
+
readonly sequenceIndex: number;
|
|
37
|
+
readonly lookupIndex: number;
|
|
38
|
+
}
|
|
39
|
+
type GsubSubtable = (slots: readonly ShapingSlot[], index: number, depth: number) => SlotApplication | undefined;
|
|
40
|
+
interface GsubLookup {
|
|
41
|
+
readonly subtables: readonly GsubSubtable[];
|
|
42
|
+
}
|
|
43
|
+
declare function glyphSkipper(lookupFlag: number, markFilteringSet: number, gdef: GdefTable | undefined): (glyphId: number) => boolean;
|
|
44
|
+
declare function nextVisibleSlot(slots: readonly ShapingSlot[], from: number, skip: (glyphId: number) => boolean): number | undefined;
|
|
45
|
+
declare function prevVisibleSlot(slots: readonly ShapingSlot[], before: number, skip: (glyphId: number) => boolean): number | undefined;
|
|
46
|
+
declare function parseSingleSubstFormat1(bytes: Uint8Array<ArrayBuffer>, subtableOffset: number, skip: (glyphId: number) => boolean): GsubSubtable | undefined;
|
|
47
|
+
declare function parseSingleSubstFormat2(bytes: Uint8Array<ArrayBuffer>, subtableOffset: number, skip: (glyphId: number) => boolean): GsubSubtable | undefined;
|
|
48
|
+
declare function parseLigatureSubstFormat1(bytes: Uint8Array<ArrayBuffer>, subtableOffset: number, skip: (glyphId: number) => boolean): GsubSubtable | undefined;
|
|
49
|
+
type ContextualGlyphTest = (glyphId: number) => boolean;
|
|
50
|
+
declare function buildGsubShaper(font: SfntFont, options?: GsubShaperOptions): GsubShaper | undefined;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { readTag as A, constantZeroClassDef as C, parseSingleSubstFormat1 as D, parseLigatureSubstFormat1 as E, parseSingleSubstFormat2 as O, buildGsubShaper as S, nextVisibleSlot as T, MAX_LOOKUP_NESTING_DEPTH as _, GSUB_OPT_IN_FEATURE_TAGS as a, SlotApplication as b, GsubShaper as c, GsubSubtable as d, LOOKUP_TYPE_CHAIN_CONTEXT_SUBST as f, LOOKUP_TYPE_SINGLE_SUBST as g, LOOKUP_TYPE_LIGATURE_SUBST as h, EXTENSION_SUBST_OFFSET_FIELD_OFFSET as i, prevVisibleSlot as k, GsubShaperOptions as l, LOOKUP_TYPE_EXTENSION_SUBST as m, DEFAULT_GSUB_FEATURE_TAGS as n, GsubLookup as o, LOOKUP_TYPE_CONTEXT_SUBST as p, EXTENSION_SUBST_HEADER_SIZE as r, GsubOptInFeatureTag as s, ContextualGlyphTest as t, GsubShaping as u, SUBST_FORMAT_AND_COVERAGE_SIZE as v, glyphSkipper as w, SubstLookupRecord as x, ShapingSlot as y };
|