pdf-parser.js 5.2.25 → 5.2.26
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.cjs +1 -1
- package/dist/afm-widths.js +1 -1
- package/dist/builtin-encoding.cjs +1 -1
- package/dist/builtin-encoding.d.cts +2 -2
- package/dist/builtin-encoding.d.ts +2 -2
- package/dist/builtin-encoding.js +1 -1
- package/dist/cff-bounds.d.cts +1 -1
- package/dist/cff-bounds.d.ts +1 -1
- package/dist/cff.d.cts +1 -1
- package/dist/cff.d.ts +1 -1
- package/dist/cmap-table.d.cts +1 -1
- package/dist/cmap-table.d.ts +1 -1
- package/dist/cmap.d.cts +1 -1
- package/dist/cmap.d.ts +1 -1
- package/dist/content-write.cjs +1 -1
- package/dist/content-write.d.cts +3 -3
- package/dist/content-write.d.ts +3 -3
- package/dist/content-write.js +1 -1
- package/dist/document.d.cts +4 -4
- package/dist/document.d.ts +4 -4
- package/dist/{embedded-font-BRhZfEN2.d.ts → embedded-font-Bnhh4juV.d.ts} +3 -3
- package/dist/{embedded-font-DJUn9kMH.d.cts → embedded-font-CEf-zBCA.d.cts} +3 -3
- package/dist/embedded-font-write.d.cts +1 -1
- package/dist/embedded-font-write.d.ts +1 -1
- package/dist/embedded-font.cjs +1 -1
- package/dist/embedded-font.d.cts +1 -1
- package/dist/embedded-font.d.ts +1 -1
- package/dist/embedded-font.js +1 -1
- package/dist/encoding.cjs +1 -1
- package/dist/encoding.js +1 -1
- package/dist/encrypt-write.d.cts +2 -2
- package/dist/encrypt-write.d.ts +2 -2
- package/dist/encrypt.d.cts +2 -2
- package/dist/encrypt.d.ts +2 -2
- package/dist/font-read.cjs +1 -1
- package/dist/font-read.d.cts +2 -2
- package/dist/font-read.d.ts +2 -2
- package/dist/font-read.js +1 -1
- package/dist/font-registry.d.cts +2 -2
- package/dist/font-registry.d.ts +2 -2
- package/dist/gdef-table.d.cts +3 -3
- package/dist/gdef-table.d.ts +3 -3
- package/dist/{glyf-vMGtP1pb.d.ts → glyf-Bv1katwK.d.ts} +4 -4
- package/dist/{glyf-nXC-IDRW.d.cts → glyf-DFyknMrW.d.cts} +4 -4
- package/dist/{glyf-contours-zRQbj-Yp.d.cts → glyf-contours-BRpvd0rt.d.cts} +1 -1
- package/dist/{glyf-contours-OSdG6Edr.d.ts → glyf-contours-C0epBNqP.d.ts} +1 -1
- package/dist/glyf-contours.d.cts +1 -1
- package/dist/glyf-contours.d.ts +1 -1
- package/dist/glyf.d.cts +1 -1
- package/dist/glyf.d.ts +1 -1
- package/dist/gsub-table.cjs +1 -1
- package/dist/gsub-table.js +1 -1
- package/dist/hmtx-table.d.cts +1 -1
- package/dist/hmtx-table.d.ts +1 -1
- package/dist/image/jbig2-generic.cjs +2 -2
- package/dist/image/jbig2-generic.js +2 -2
- package/dist/image/jpeg2000-tagtree.cjs +1 -1
- package/dist/image/jpeg2000-tagtree.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interpret.cjs +2 -2
- package/dist/interpret.d.cts +4 -4
- package/dist/interpret.d.ts +4 -4
- package/dist/interpret.js +2 -2
- package/dist/math-content-write.cjs +3 -3
- package/dist/math-content-write.js +3 -3
- package/dist/math-font.d.cts +4 -4
- package/dist/math-font.d.ts +4 -4
- package/dist/measure.cjs +1 -1
- package/dist/measure.js +1 -1
- package/dist/navigation.d.cts +1 -1
- package/dist/navigation.d.ts +1 -1
- package/dist/ot-layout-common.d.cts +2 -2
- package/dist/ot-layout-common.d.ts +2 -2
- package/dist/parse.cjs +5 -0
- package/dist/parse.d.cts +2 -1
- package/dist/parse.d.ts +2 -1
- package/dist/parse.js +5 -1
- package/dist/raster.cjs +10 -40
- package/dist/raster.d.cts +4 -4
- package/dist/raster.d.ts +4 -4
- package/dist/raster.js +10 -40
- package/dist/structure.cjs +4 -4
- package/dist/structure.js +4 -4
- package/dist/winansi.cjs +1 -1
- package/dist/winansi.js +1 -1
- package/dist/write.cjs +4 -4
- package/dist/write.d.cts +1 -1
- package/dist/write.d.ts +1 -1
- package/dist/write.js +4 -4
- package/package.json +2 -2
- package/dist/{afm-widths-BTu0IDp2.cjs → afm-widths-BYiX2L9D.cjs} +1 -1
- package/dist/{afm-widths-De_QMWgC.js → afm-widths-blUDDjlI.js} +1 -1
package/dist/afm-widths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_afm_widths = require("./afm-widths-
|
|
2
|
+
const require_afm_widths = require("./afm-widths-BYiX2L9D.cjs");
|
|
3
3
|
exports.STANDARD_METRICS = require_afm_widths.STANDARD_METRICS;
|
|
4
4
|
exports.widthOfCode = require_afm_widths.widthOfCode;
|
package/dist/afm-widths.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as widthOfCode, t as STANDARD_METRICS } from "./afm-widths-
|
|
1
|
+
import { n as widthOfCode, t as STANDARD_METRICS } from "./afm-widths-blUDDjlI.js";
|
|
2
2
|
export { STANDARD_METRICS, widthOfCode };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_afm_widths = require("./afm-widths-
|
|
2
|
+
const require_afm_widths = require("./afm-widths-BYiX2L9D.cjs");
|
|
3
3
|
const require_sfnt = require("./sfnt.cjs");
|
|
4
4
|
const require_cff = require("./cff.cjs");
|
|
5
5
|
const require_cmap_table = require("./cmap-table.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/builtin-encoding.d.ts
|
|
2
2
|
interface BuiltinEncoding {
|
|
3
|
-
codeToUnicode(code: number)
|
|
4
|
-
glyphIdToUnicode(glyphId: number)
|
|
3
|
+
codeToUnicode: (code: number) => number | undefined;
|
|
4
|
+
glyphIdToUnicode: (glyphId: number) => number | undefined;
|
|
5
5
|
}
|
|
6
6
|
declare function readFontProgramEncoding(program: Uint8Array<ArrayBuffer>): BuiltinEncoding | undefined;
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/builtin-encoding.d.ts
|
|
2
2
|
interface BuiltinEncoding {
|
|
3
|
-
codeToUnicode(code: number)
|
|
4
|
-
glyphIdToUnicode(glyphId: number)
|
|
3
|
+
codeToUnicode: (code: number) => number | undefined;
|
|
4
|
+
glyphIdToUnicode: (glyphId: number) => number | undefined;
|
|
5
5
|
}
|
|
6
6
|
declare function readFontProgramEncoding(program: Uint8Array<ArrayBuffer>): BuiltinEncoding | undefined;
|
|
7
7
|
//#endregion
|
package/dist/builtin-encoding.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as glyphNameToUnicode, d as standardGlyphName } from "./afm-widths-
|
|
1
|
+
import { c as glyphNameToUnicode, d as standardGlyphName } from "./afm-widths-blUDDjlI.js";
|
|
2
2
|
import { hasBytes, parseSfnt, sfntTableBytes, u16, u8 } from "./sfnt.js";
|
|
3
3
|
import { cffStringForSid, parseCffDict, readCffIndex } from "./cff.js";
|
|
4
4
|
import { readCmapSubtables } from "./cmap-table.js";
|
package/dist/cff-bounds.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.cjs";
|
|
|
2
2
|
//#region src/cff-bounds.d.ts
|
|
3
3
|
interface CffGlyphBounds {
|
|
4
4
|
readonly numGlyphs: number;
|
|
5
|
-
bounds(glyphId: number)
|
|
5
|
+
bounds: (glyphId: number) => GlyphInkBounds | undefined;
|
|
6
6
|
}
|
|
7
7
|
declare function parseCffGlyphBounds(bytes: Uint8Array<ArrayBuffer>): CffGlyphBounds | undefined;
|
|
8
8
|
//#endregion
|
package/dist/cff-bounds.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.js";
|
|
|
2
2
|
//#region src/cff-bounds.d.ts
|
|
3
3
|
interface CffGlyphBounds {
|
|
4
4
|
readonly numGlyphs: number;
|
|
5
|
-
bounds(glyphId: number)
|
|
5
|
+
bounds: (glyphId: number) => GlyphInkBounds | undefined;
|
|
6
6
|
}
|
|
7
7
|
declare function parseCffGlyphBounds(bytes: Uint8Array<ArrayBuffer>): CffGlyphBounds | undefined;
|
|
8
8
|
//#endregion
|
package/dist/cff.d.cts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
interface CffIndex {
|
|
3
3
|
readonly count: number;
|
|
4
4
|
readonly endOffset: number;
|
|
5
|
-
entry(index: number)
|
|
5
|
+
entry: (index: number) => Uint8Array<ArrayBuffer> | undefined;
|
|
6
6
|
}
|
|
7
7
|
type CffDict = ReadonlyMap<number, readonly number[]>;
|
|
8
8
|
declare const CFF_ESCAPED_OPERATOR_BASE = 1200;
|
package/dist/cff.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
interface CffIndex {
|
|
3
3
|
readonly count: number;
|
|
4
4
|
readonly endOffset: number;
|
|
5
|
-
entry(index: number)
|
|
5
|
+
entry: (index: number) => Uint8Array<ArrayBuffer> | undefined;
|
|
6
6
|
}
|
|
7
7
|
type CffDict = ReadonlyMap<number, readonly number[]>;
|
|
8
8
|
declare const CFF_ESCAPED_OPERATOR_BASE = 1200;
|
package/dist/cmap-table.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ interface CmapSubtable {
|
|
|
6
6
|
readonly encodingId: number;
|
|
7
7
|
readonly format: number;
|
|
8
8
|
readonly lookup: CmapLookup;
|
|
9
|
-
forEachMapping(visit: (code: number, glyphId: number) => void)
|
|
9
|
+
forEachMapping: (visit: (code: number, glyphId: number) => void) => void;
|
|
10
10
|
}
|
|
11
11
|
declare function readCmapSubtables(font: SfntFont): readonly CmapSubtable[];
|
|
12
12
|
declare function buildCmapLookup(font: SfntFont): CmapLookup | undefined;
|
package/dist/cmap-table.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface CmapSubtable {
|
|
|
6
6
|
readonly encodingId: number;
|
|
7
7
|
readonly format: number;
|
|
8
8
|
readonly lookup: CmapLookup;
|
|
9
|
-
forEachMapping(visit: (code: number, glyphId: number) => void)
|
|
9
|
+
forEachMapping: (visit: (code: number, glyphId: number) => void) => void;
|
|
10
10
|
}
|
|
11
11
|
declare function readCmapSubtables(font: SfntFont): readonly CmapSubtable[];
|
|
12
12
|
declare function buildCmapLookup(font: SfntFont): CmapLookup | undefined;
|
package/dist/cmap.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PdfDiagnosticSink } from "./diagnostics.cjs";
|
|
2
2
|
//#region src/cmap.d.ts
|
|
3
3
|
interface ToUnicodeCMap {
|
|
4
|
-
lookup(code: number)
|
|
4
|
+
lookup: (code: number) => string | undefined;
|
|
5
5
|
}
|
|
6
6
|
declare function parseToUnicodeCMap(bytes: Uint8Array<ArrayBuffer>, sink: PdfDiagnosticSink): ToUnicodeCMap;
|
|
7
7
|
//#endregion
|
package/dist/cmap.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PdfDiagnosticSink } from "./diagnostics.js";
|
|
2
2
|
//#region src/cmap.d.ts
|
|
3
3
|
interface ToUnicodeCMap {
|
|
4
|
-
lookup(code: number)
|
|
4
|
+
lookup: (code: number) => string | undefined;
|
|
5
5
|
}
|
|
6
6
|
declare function parseToUnicodeCMap(bytes: Uint8Array<ArrayBuffer>, sink: PdfDiagnosticSink): ToUnicodeCMap;
|
|
7
7
|
//#endregion
|
package/dist/content-write.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_afm_widths = require("./afm-widths-
|
|
2
|
+
const require_afm_widths = require("./afm-widths-BYiX2L9D.cjs");
|
|
3
3
|
const require_objects = require("./objects.cjs");
|
|
4
4
|
const require_bytes_writer = require("./bytes/writer.cjs");
|
|
5
5
|
const require_serialize = require("./serialize.cjs");
|
package/dist/content-write.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as StandardFontName } from "./afm-widths-CneRyu5l.cjs";
|
|
2
2
|
import { LayoutItem } from "./layout.cjs";
|
|
3
|
-
import { r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-
|
|
3
|
+
import { r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-CEf-zBCA.cjs";
|
|
4
4
|
import { WinAnsiSubstitution } from "./winansi.cjs";
|
|
5
5
|
import { LayoutFont, TextMeasurer } from "document-schema.js";
|
|
6
6
|
//#region src/content-write.d.ts
|
|
@@ -18,8 +18,8 @@ interface ResolvedImageResource {
|
|
|
18
18
|
}
|
|
19
19
|
interface ContentWriteContext {
|
|
20
20
|
readonly measurer: TextMeasurer;
|
|
21
|
-
resolveFont(font: LayoutFont)
|
|
22
|
-
resolveImage(imageId: string)
|
|
21
|
+
resolveFont: (font: LayoutFont) => ResolvedFontResource;
|
|
22
|
+
resolveImage: (imageId: string) => ResolvedImageResource;
|
|
23
23
|
readonly layerObjectNumberOf?: (name: string) => number | undefined;
|
|
24
24
|
readonly nextMcid?: () => number;
|
|
25
25
|
}
|
package/dist/content-write.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as StandardFontName } from "./afm-widths-CneRyu5l.js";
|
|
2
2
|
import { LayoutItem } from "./layout.js";
|
|
3
|
-
import { r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-
|
|
3
|
+
import { r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-Bnhh4juV.js";
|
|
4
4
|
import { WinAnsiSubstitution } from "./winansi.js";
|
|
5
5
|
import { LayoutFont, TextMeasurer } from "document-schema.js";
|
|
6
6
|
//#region src/content-write.d.ts
|
|
@@ -18,8 +18,8 @@ interface ResolvedImageResource {
|
|
|
18
18
|
}
|
|
19
19
|
interface ContentWriteContext {
|
|
20
20
|
readonly measurer: TextMeasurer;
|
|
21
|
-
resolveFont(font: LayoutFont)
|
|
22
|
-
resolveImage(imageId: string)
|
|
21
|
+
resolveFont: (font: LayoutFont) => ResolvedFontResource;
|
|
22
|
+
resolveImage: (imageId: string) => ResolvedImageResource;
|
|
23
23
|
readonly layerObjectNumberOf?: (name: string) => number | undefined;
|
|
24
24
|
readonly nextMcid?: () => number;
|
|
25
25
|
}
|
package/dist/content-write.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as encodeForShow } from "./afm-widths-
|
|
1
|
+
import { h as encodeForShow } from "./afm-widths-blUDDjlI.js";
|
|
2
2
|
import { pdfArray, pdfHexString, pdfNum } from "./objects.js";
|
|
3
3
|
import { ByteWriter } from "./bytes/writer.js";
|
|
4
4
|
import { formatNumber, writeObject } from "./serialize.js";
|
package/dist/document.d.cts
CHANGED
|
@@ -4,10 +4,10 @@ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.cjs";
|
|
|
4
4
|
interface PdfDocument {
|
|
5
5
|
readonly trailer: PdfDict;
|
|
6
6
|
readonly catalog: PdfDict;
|
|
7
|
-
resolve(obj: PdfObject | undefined)
|
|
8
|
-
resolveDict(obj: PdfObject | undefined)
|
|
9
|
-
pages()
|
|
10
|
-
pageIndex(obj: PdfObject | undefined)
|
|
7
|
+
resolve: (obj: PdfObject | undefined) => PdfObject | undefined;
|
|
8
|
+
resolveDict: (obj: PdfObject | undefined) => PdfDict | undefined;
|
|
9
|
+
pages: () => PdfDict[];
|
|
10
|
+
pageIndex: (obj: PdfObject | undefined) => number | undefined;
|
|
11
11
|
}
|
|
12
12
|
declare function openPdfDocument(bytes: Uint8Array<ArrayBuffer>, sink: PdfDiagnosticSink): PdfDocument;
|
|
13
13
|
//#endregion
|
package/dist/document.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.js";
|
|
|
4
4
|
interface PdfDocument {
|
|
5
5
|
readonly trailer: PdfDict;
|
|
6
6
|
readonly catalog: PdfDict;
|
|
7
|
-
resolve(obj: PdfObject | undefined)
|
|
8
|
-
resolveDict(obj: PdfObject | undefined)
|
|
9
|
-
pages()
|
|
10
|
-
pageIndex(obj: PdfObject | undefined)
|
|
7
|
+
resolve: (obj: PdfObject | undefined) => PdfObject | undefined;
|
|
8
|
+
resolveDict: (obj: PdfObject | undefined) => PdfDict | undefined;
|
|
9
|
+
pages: () => PdfDict[];
|
|
10
|
+
pageIndex: (obj: PdfObject | undefined) => number | undefined;
|
|
11
11
|
}
|
|
12
12
|
declare function openPdfDocument(bytes: Uint8Array<ArrayBuffer>, sink: PdfDiagnosticSink): PdfDocument;
|
|
13
13
|
//#endregion
|
|
@@ -25,9 +25,9 @@ interface EmbeddedFace {
|
|
|
25
25
|
readonly postScriptName: string;
|
|
26
26
|
readonly numGlyphs: number;
|
|
27
27
|
readonly metrics: EmbeddedFaceMetrics;
|
|
28
|
-
glyphId(codePoint: number)
|
|
29
|
-
glyphSpaceWidth(glyphId: number)
|
|
30
|
-
kernGlyphSpace(leftGlyphId: number, rightGlyphId: number)
|
|
28
|
+
glyphId: (codePoint: number) => number | undefined;
|
|
29
|
+
glyphSpaceWidth: (glyphId: number) => number;
|
|
30
|
+
kernGlyphSpace: (leftGlyphId: number, rightGlyphId: number) => number;
|
|
31
31
|
readonly gsubShaper: GsubShaper | undefined;
|
|
32
32
|
}
|
|
33
33
|
declare function loadEmbeddedFace(font: SfntFont): EmbeddedFace | undefined;
|
|
@@ -25,9 +25,9 @@ interface EmbeddedFace {
|
|
|
25
25
|
readonly postScriptName: string;
|
|
26
26
|
readonly numGlyphs: number;
|
|
27
27
|
readonly metrics: EmbeddedFaceMetrics;
|
|
28
|
-
glyphId(codePoint: number)
|
|
29
|
-
glyphSpaceWidth(glyphId: number)
|
|
30
|
-
kernGlyphSpace(leftGlyphId: number, rightGlyphId: number)
|
|
28
|
+
glyphId: (codePoint: number) => number | undefined;
|
|
29
|
+
glyphSpaceWidth: (glyphId: number) => number;
|
|
30
|
+
kernGlyphSpace: (leftGlyphId: number, rightGlyphId: number) => number;
|
|
31
31
|
readonly gsubShaper: GsubShaper | undefined;
|
|
32
32
|
}
|
|
33
33
|
declare function loadEmbeddedFace(font: SfntFont): EmbeddedFace | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.cjs";
|
|
2
|
-
import { t as EmbeddedFace } from "./embedded-font-
|
|
2
|
+
import { t as EmbeddedFace } from "./embedded-font-CEf-zBCA.cjs";
|
|
3
3
|
import { SfntSubsetResult } from "./sfnt-subset.cjs";
|
|
4
4
|
//#region src/embedded-font-write.d.ts
|
|
5
5
|
declare function embeddedSubsetTag(postScriptName: string, glyphIds: readonly number[]): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.js";
|
|
2
|
-
import { t as EmbeddedFace } from "./embedded-font-
|
|
2
|
+
import { t as EmbeddedFace } from "./embedded-font-Bnhh4juV.js";
|
|
3
3
|
import { SfntSubsetResult } from "./sfnt-subset.js";
|
|
4
4
|
//#region src/embedded-font-write.d.ts
|
|
5
5
|
declare function embeddedSubsetTag(postScriptName: string, glyphIds: readonly number[]): string;
|
package/dist/embedded-font.cjs
CHANGED
|
@@ -7,6 +7,7 @@ const require_gpos_table = require("./gpos-table.cjs");
|
|
|
7
7
|
const require_gsub_table = require("./gsub-table.cjs");
|
|
8
8
|
const require_hmtx_table = require("./hmtx-table.cjs");
|
|
9
9
|
//#region src/embedded-font.ts
|
|
10
|
+
const LONG_HOR_METRIC_SIZE = 4;
|
|
10
11
|
const GLYPH_SPACE_UNITS_PER_EM = 1e3;
|
|
11
12
|
const NOTDEF_GLYPH_ID = 0;
|
|
12
13
|
const CAP_HEIGHT_REFERENCE_CODE_POINT = 72;
|
|
@@ -97,7 +98,6 @@ const HHEA_ASCENDER_OFFSET = 4;
|
|
|
97
98
|
const HHEA_DESCENDER_OFFSET = 6;
|
|
98
99
|
const HHEA_LINE_GAP_OFFSET = 8;
|
|
99
100
|
const HHEA_NUMBER_OF_HMETRICS_OFFSET = 34;
|
|
100
|
-
const LONG_HOR_METRIC_SIZE = 4;
|
|
101
101
|
function parseHhea(font) {
|
|
102
102
|
const bytes = require_sfnt.sfntTableBytes(font, "hhea");
|
|
103
103
|
if (bytes === void 0 || !require_sfnt.hasBytes(bytes, 0, HHEA_TABLE_SIZE)) return;
|
package/dist/embedded-font.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EmbeddedShow, c as encodeForShowEmbedded, i as EmbeddedKern, l as loadEmbeddedFace, n as EmbeddedFaceMetrics, o as NOTDEF_GLYPH_ID, r as EmbeddedFaceSubstitution, s as collectEmbeddedGlyphs, t as EmbeddedFace } from "./embedded-font-
|
|
1
|
+
import { a as EmbeddedShow, c as encodeForShowEmbedded, i as EmbeddedKern, l as loadEmbeddedFace, n as EmbeddedFaceMetrics, o as NOTDEF_GLYPH_ID, r as EmbeddedFaceSubstitution, s as collectEmbeddedGlyphs, t as EmbeddedFace } from "./embedded-font-CEf-zBCA.cjs";
|
|
2
2
|
export { EmbeddedFace, EmbeddedFaceMetrics, EmbeddedFaceSubstitution, EmbeddedKern, EmbeddedShow, NOTDEF_GLYPH_ID, collectEmbeddedGlyphs, encodeForShowEmbedded, loadEmbeddedFace };
|
package/dist/embedded-font.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EmbeddedShow, c as encodeForShowEmbedded, i as EmbeddedKern, l as loadEmbeddedFace, n as EmbeddedFaceMetrics, o as NOTDEF_GLYPH_ID, r as EmbeddedFaceSubstitution, s as collectEmbeddedGlyphs, t as EmbeddedFace } from "./embedded-font-
|
|
1
|
+
import { a as EmbeddedShow, c as encodeForShowEmbedded, i as EmbeddedKern, l as loadEmbeddedFace, n as EmbeddedFaceMetrics, o as NOTDEF_GLYPH_ID, r as EmbeddedFaceSubstitution, s as collectEmbeddedGlyphs, t as EmbeddedFace } from "./embedded-font-Bnhh4juV.js";
|
|
2
2
|
export { EmbeddedFace, EmbeddedFaceMetrics, EmbeddedFaceSubstitution, EmbeddedKern, EmbeddedShow, NOTDEF_GLYPH_ID, collectEmbeddedGlyphs, encodeForShowEmbedded, loadEmbeddedFace };
|
package/dist/embedded-font.js
CHANGED
|
@@ -6,6 +6,7 @@ import { buildGposKernLookup } from "./gpos-table.js";
|
|
|
6
6
|
import { buildGsubShaper } from "./gsub-table.js";
|
|
7
7
|
import { parseHmtx } from "./hmtx-table.js";
|
|
8
8
|
//#region src/embedded-font.ts
|
|
9
|
+
const LONG_HOR_METRIC_SIZE = 4;
|
|
9
10
|
const GLYPH_SPACE_UNITS_PER_EM = 1e3;
|
|
10
11
|
const NOTDEF_GLYPH_ID = 0;
|
|
11
12
|
const CAP_HEIGHT_REFERENCE_CODE_POINT = 72;
|
|
@@ -96,7 +97,6 @@ const HHEA_ASCENDER_OFFSET = 4;
|
|
|
96
97
|
const HHEA_DESCENDER_OFFSET = 6;
|
|
97
98
|
const HHEA_LINE_GAP_OFFSET = 8;
|
|
98
99
|
const HHEA_NUMBER_OF_HMETRICS_OFFSET = 34;
|
|
99
|
-
const LONG_HOR_METRIC_SIZE = 4;
|
|
100
100
|
function parseHhea(font) {
|
|
101
101
|
const bytes = sfntTableBytes(font, "hhea");
|
|
102
102
|
if (bytes === void 0 || !hasBytes(bytes, 0, HHEA_TABLE_SIZE)) return;
|
package/dist/encoding.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_afm_widths = require("./afm-widths-
|
|
2
|
+
const require_afm_widths = require("./afm-widths-BYiX2L9D.cjs");
|
|
3
3
|
exports.MACROMAN_GLYPH_NAMES = require_afm_widths.MACROMAN_GLYPH_NAMES;
|
|
4
4
|
exports.STANDARD_GLYPH_NAMES = require_afm_widths.STANDARD_GLYPH_NAMES;
|
|
5
5
|
exports.SYMBOL_GLYPH_NAMES = require_afm_widths.SYMBOL_GLYPH_NAMES;
|
package/dist/encoding.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SYMBOL_GLYPH_NAMES, c as glyphNameToUnicode, d as standardGlyphName, f as symbolGlyphName, i as STANDARD_GLYPH_NAMES, l as macRomanGlyphName, m as zapfDingbatsGlyphName, o as WINANSI_GLYPH_NAMES, p as winAnsiGlyphName, r as MACROMAN_GLYPH_NAMES, s as ZAPFDINGBATS_GLYPH_NAMES, u as namedEncodingGlyphName } from "./afm-widths-
|
|
1
|
+
import { a as SYMBOL_GLYPH_NAMES, c as glyphNameToUnicode, d as standardGlyphName, f as symbolGlyphName, i as STANDARD_GLYPH_NAMES, l as macRomanGlyphName, m as zapfDingbatsGlyphName, o as WINANSI_GLYPH_NAMES, p as winAnsiGlyphName, r as MACROMAN_GLYPH_NAMES, s as ZAPFDINGBATS_GLYPH_NAMES, u as namedEncodingGlyphName } from "./afm-widths-blUDDjlI.js";
|
|
2
2
|
export { MACROMAN_GLYPH_NAMES, STANDARD_GLYPH_NAMES, SYMBOL_GLYPH_NAMES, WINANSI_GLYPH_NAMES, ZAPFDINGBATS_GLYPH_NAMES, glyphNameToUnicode, macRomanGlyphName, namedEncodingGlyphName, standardGlyphName, symbolGlyphName, winAnsiGlyphName, zapfDingbatsGlyphName };
|
package/dist/encrypt-write.d.cts
CHANGED
|
@@ -22,8 +22,8 @@ interface PdfEncryptionOptions {
|
|
|
22
22
|
}
|
|
23
23
|
interface PdfEncryptor {
|
|
24
24
|
readonly encryptDict: PdfDict;
|
|
25
|
-
encryptString(bytes: Uint8Array<ArrayBuffer>, num: number, gen: number)
|
|
26
|
-
encryptStream(bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number)
|
|
25
|
+
encryptString: (bytes: Uint8Array<ArrayBuffer>, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
26
|
+
encryptStream: (bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
27
27
|
}
|
|
28
28
|
declare function createStandardEncryptor(options: PdfEncryptionOptions, fileId: Uint8Array<ArrayBuffer>): PdfEncryptor;
|
|
29
29
|
declare function encryptIndirectObject(value: PdfObject, num: number, gen: number, encryptor: PdfEncryptor): PdfObject;
|
package/dist/encrypt-write.d.ts
CHANGED
|
@@ -22,8 +22,8 @@ interface PdfEncryptionOptions {
|
|
|
22
22
|
}
|
|
23
23
|
interface PdfEncryptor {
|
|
24
24
|
readonly encryptDict: PdfDict;
|
|
25
|
-
encryptString(bytes: Uint8Array<ArrayBuffer>, num: number, gen: number)
|
|
26
|
-
encryptStream(bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number)
|
|
25
|
+
encryptString: (bytes: Uint8Array<ArrayBuffer>, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
26
|
+
encryptStream: (bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
27
27
|
}
|
|
28
28
|
declare function createStandardEncryptor(options: PdfEncryptionOptions, fileId: Uint8Array<ArrayBuffer>): PdfEncryptor;
|
|
29
29
|
declare function encryptIndirectObject(value: PdfObject, num: number, gen: number, encryptor: PdfEncryptor): PdfObject;
|
package/dist/encrypt.d.cts
CHANGED
|
@@ -3,8 +3,8 @@ import { n as PdfDict } from "./objects-B7HdMeWS.cjs";
|
|
|
3
3
|
//#region src/encrypt.d.ts
|
|
4
4
|
type CipherMethod = "identity" | "rc4" | "aes";
|
|
5
5
|
interface PdfDecryptor {
|
|
6
|
-
decryptString(bytes: Uint8Array<ArrayBuffer>, num: number, gen: number)
|
|
7
|
-
decryptStream(bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number)
|
|
6
|
+
decryptString: (bytes: Uint8Array<ArrayBuffer>, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
7
|
+
decryptStream: (bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
8
8
|
}
|
|
9
9
|
declare const PASSWORD_PADDING: Uint8Array<ArrayBuffer>;
|
|
10
10
|
declare const AES_OBJECT_KEY_SALT: Uint8Array<ArrayBuffer>;
|
package/dist/encrypt.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { n as PdfDict } from "./objects-B7HdMeWS.js";
|
|
|
3
3
|
//#region src/encrypt.d.ts
|
|
4
4
|
type CipherMethod = "identity" | "rc4" | "aes";
|
|
5
5
|
interface PdfDecryptor {
|
|
6
|
-
decryptString(bytes: Uint8Array<ArrayBuffer>, num: number, gen: number)
|
|
7
|
-
decryptStream(bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number)
|
|
6
|
+
decryptString: (bytes: Uint8Array<ArrayBuffer>, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
7
|
+
decryptStream: (bytes: Uint8Array<ArrayBuffer>, dict: PdfDict, num: number, gen: number) => Uint8Array<ArrayBuffer>;
|
|
8
8
|
}
|
|
9
9
|
declare const PASSWORD_PADDING: Uint8Array<ArrayBuffer>;
|
|
10
10
|
declare const AES_OBJECT_KEY_SALT: Uint8Array<ArrayBuffer>;
|
package/dist/font-read.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_afm_widths = require("./afm-widths-
|
|
2
|
+
const require_afm_widths = require("./afm-widths-BYiX2L9D.cjs");
|
|
3
3
|
const require_objects = require("./objects.cjs");
|
|
4
4
|
const require_filters = require("./filters.cjs");
|
|
5
5
|
const require_builtin_encoding = require("./builtin-encoding.cjs");
|
package/dist/font-read.d.cts
CHANGED
|
@@ -12,8 +12,8 @@ interface PdfFont {
|
|
|
12
12
|
readonly family: string;
|
|
13
13
|
readonly bold: boolean;
|
|
14
14
|
readonly italic: boolean;
|
|
15
|
-
widthOf(code: number)
|
|
16
|
-
decodeToUnicode(codes: Uint8Array<ArrayBuffer>)
|
|
15
|
+
widthOf: (code: number) => number;
|
|
16
|
+
decodeToUnicode: (codes: Uint8Array<ArrayBuffer>) => string;
|
|
17
17
|
readonly verticalMetricsOf?: (code: number) => VerticalGlyphMetrics;
|
|
18
18
|
}
|
|
19
19
|
interface FontReadContext {
|
package/dist/font-read.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ interface PdfFont {
|
|
|
12
12
|
readonly family: string;
|
|
13
13
|
readonly bold: boolean;
|
|
14
14
|
readonly italic: boolean;
|
|
15
|
-
widthOf(code: number)
|
|
16
|
-
decodeToUnicode(codes: Uint8Array<ArrayBuffer>)
|
|
15
|
+
widthOf: (code: number) => number;
|
|
16
|
+
decodeToUnicode: (codes: Uint8Array<ArrayBuffer>) => string;
|
|
17
17
|
readonly verticalMetricsOf?: (code: number) => VerticalGlyphMetrics;
|
|
18
18
|
}
|
|
19
19
|
interface FontReadContext {
|
package/dist/font-read.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as glyphNameToUnicode, f as symbolGlyphName, m as zapfDingbatsGlyphName, n as widthOfCode, p as winAnsiGlyphName, u as namedEncodingGlyphName } from "./afm-widths-
|
|
1
|
+
import { c as glyphNameToUnicode, f as symbolGlyphName, m as zapfDingbatsGlyphName, n as widthOfCode, p as winAnsiGlyphName, u as namedEncodingGlyphName } from "./afm-widths-blUDDjlI.js";
|
|
2
2
|
import { asArray, asName, asNumber, dictGet, isName } from "./objects.js";
|
|
3
3
|
import { decodeStream } from "./filters.js";
|
|
4
4
|
import { readFontProgramEncoding } from "./builtin-encoding.js";
|
package/dist/font-registry.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as StandardFontName } from "./afm-widths-CneRyu5l.cjs";
|
|
2
|
-
import { t as EmbeddedFace } from "./embedded-font-
|
|
2
|
+
import { t as EmbeddedFace } from "./embedded-font-CEf-zBCA.cjs";
|
|
3
3
|
import { FontRegistryOptions, LayoutFont } from "document-schema.js";
|
|
4
4
|
//#region src/font-registry.d.ts
|
|
5
5
|
type ResolvedFace = {
|
|
@@ -11,7 +11,7 @@ type ResolvedFace = {
|
|
|
11
11
|
readonly matched: boolean;
|
|
12
12
|
};
|
|
13
13
|
interface FontRegistry {
|
|
14
|
-
resolve(font: LayoutFont)
|
|
14
|
+
resolve: (font: LayoutFont) => ResolvedFace;
|
|
15
15
|
}
|
|
16
16
|
declare function createFontRegistry(options?: FontRegistryOptions): FontRegistry;
|
|
17
17
|
declare function resolveFaceWithRegistry(registry: FontRegistry | undefined, font: LayoutFont): ResolvedFace;
|
package/dist/font-registry.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as StandardFontName } from "./afm-widths-CneRyu5l.js";
|
|
2
|
-
import { t as EmbeddedFace } from "./embedded-font-
|
|
2
|
+
import { t as EmbeddedFace } from "./embedded-font-Bnhh4juV.js";
|
|
3
3
|
import { FontRegistryOptions, LayoutFont } from "document-schema.js";
|
|
4
4
|
//#region src/font-registry.d.ts
|
|
5
5
|
type ResolvedFace = {
|
|
@@ -11,7 +11,7 @@ type ResolvedFace = {
|
|
|
11
11
|
readonly matched: boolean;
|
|
12
12
|
};
|
|
13
13
|
interface FontRegistry {
|
|
14
|
-
resolve(font: LayoutFont)
|
|
14
|
+
resolve: (font: LayoutFont) => ResolvedFace;
|
|
15
15
|
}
|
|
16
16
|
declare function createFontRegistry(options?: FontRegistryOptions): FontRegistry;
|
|
17
17
|
declare function resolveFaceWithRegistry(registry: FontRegistry | undefined, font: LayoutFont): ResolvedFace;
|
package/dist/gdef-table.d.cts
CHANGED
|
@@ -6,9 +6,9 @@ declare const GLYPH_CLASS_LIGATURE = 2;
|
|
|
6
6
|
declare const GLYPH_CLASS_MARK = 3;
|
|
7
7
|
declare const GLYPH_CLASS_COMPONENT = 4;
|
|
8
8
|
interface GdefTable {
|
|
9
|
-
glyphClass(glyphId: number)
|
|
10
|
-
markAttachClass(glyphId: number)
|
|
11
|
-
markFilteringSetCovers(setIndex: number, glyphId: number)
|
|
9
|
+
glyphClass: (glyphId: number) => number;
|
|
10
|
+
markAttachClass: (glyphId: number) => number;
|
|
11
|
+
markFilteringSetCovers: (setIndex: number, glyphId: number) => boolean;
|
|
12
12
|
}
|
|
13
13
|
declare function parseGdefTable(font: SfntFont): GdefTable | undefined;
|
|
14
14
|
//#endregion
|
package/dist/gdef-table.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ declare const GLYPH_CLASS_LIGATURE = 2;
|
|
|
6
6
|
declare const GLYPH_CLASS_MARK = 3;
|
|
7
7
|
declare const GLYPH_CLASS_COMPONENT = 4;
|
|
8
8
|
interface GdefTable {
|
|
9
|
-
glyphClass(glyphId: number)
|
|
10
|
-
markAttachClass(glyphId: number)
|
|
11
|
-
markFilteringSetCovers(setIndex: number, glyphId: number)
|
|
9
|
+
glyphClass: (glyphId: number) => number;
|
|
10
|
+
markAttachClass: (glyphId: number) => number;
|
|
11
|
+
markFilteringSetCovers: (setIndex: number, glyphId: number) => boolean;
|
|
12
12
|
}
|
|
13
13
|
declare function parseGdefTable(font: SfntFont): GdefTable | undefined;
|
|
14
14
|
//#endregion
|
|
@@ -18,10 +18,10 @@ interface CompositeComponent {
|
|
|
18
18
|
}
|
|
19
19
|
interface GlyfTable {
|
|
20
20
|
readonly numGlyphs: number;
|
|
21
|
-
glyphBytes(glyphId: number)
|
|
22
|
-
glyphHeader(glyphId: number)
|
|
23
|
-
compositeComponents(glyphId: number)
|
|
24
|
-
glyphInkBounds(glyphId: number)
|
|
21
|
+
glyphBytes: (glyphId: number) => Uint8Array<ArrayBuffer> | undefined;
|
|
22
|
+
glyphHeader: (glyphId: number) => GlyphHeader | undefined;
|
|
23
|
+
compositeComponents: (glyphId: number) => readonly CompositeComponent[] | undefined;
|
|
24
|
+
glyphInkBounds: (glyphId: number) => GlyphInkBounds | undefined;
|
|
25
25
|
}
|
|
26
26
|
interface GlyfOptions {
|
|
27
27
|
readonly numGlyphs: number;
|
|
@@ -18,10 +18,10 @@ interface CompositeComponent {
|
|
|
18
18
|
}
|
|
19
19
|
interface GlyfTable {
|
|
20
20
|
readonly numGlyphs: number;
|
|
21
|
-
glyphBytes(glyphId: number)
|
|
22
|
-
glyphHeader(glyphId: number)
|
|
23
|
-
compositeComponents(glyphId: number)
|
|
24
|
-
glyphInkBounds(glyphId: number)
|
|
21
|
+
glyphBytes: (glyphId: number) => Uint8Array<ArrayBuffer> | undefined;
|
|
22
|
+
glyphHeader: (glyphId: number) => GlyphHeader | undefined;
|
|
23
|
+
compositeComponents: (glyphId: number) => readonly CompositeComponent[] | undefined;
|
|
24
|
+
glyphInkBounds: (glyphId: number) => GlyphInkBounds | undefined;
|
|
25
25
|
}
|
|
26
26
|
interface GlyfOptions {
|
|
27
27
|
readonly numGlyphs: number;
|
package/dist/glyf-contours.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as GlyphOutline, r as decodeGlyphOutline, t as GlyphContourPoint } from "./glyf-contours-
|
|
1
|
+
import { n as GlyphOutline, r as decodeGlyphOutline, t as GlyphContourPoint } from "./glyf-contours-BRpvd0rt.cjs";
|
|
2
2
|
export { GlyphContourPoint, GlyphOutline, decodeGlyphOutline };
|
package/dist/glyf-contours.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as GlyphOutline, r as decodeGlyphOutline, t as GlyphContourPoint } from "./glyf-contours-
|
|
1
|
+
import { n as GlyphOutline, r as decodeGlyphOutline, t as GlyphContourPoint } from "./glyf-contours-C0epBNqP.js";
|
|
2
2
|
export { GlyphContourPoint, GlyphOutline, decodeGlyphOutline };
|
package/dist/glyf.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as parseGlyf, i as GlyphHeader, n as GlyfOptions, o as parseLoca, r as GlyfTable, t as CompositeComponent } from "./glyf-
|
|
1
|
+
import { a as parseGlyf, i as GlyphHeader, n as GlyfOptions, o as parseLoca, r as GlyfTable, t as CompositeComponent } from "./glyf-DFyknMrW.cjs";
|
|
2
2
|
export { CompositeComponent, GlyfOptions, GlyfTable, GlyphHeader, parseGlyf, parseLoca };
|
package/dist/glyf.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as parseGlyf, i as GlyphHeader, n as GlyfOptions, o as parseLoca, r as GlyfTable, t as CompositeComponent } from "./glyf-
|
|
1
|
+
import { a as parseGlyf, i as GlyphHeader, n as GlyfOptions, o as parseLoca, r as GlyfTable, t as CompositeComponent } from "./glyf-Bv1katwK.js";
|
|
2
2
|
export { CompositeComponent, GlyfOptions, GlyfTable, GlyphHeader, parseGlyf, parseLoca };
|
package/dist/gsub-table.cjs
CHANGED
|
@@ -3,6 +3,7 @@ const require_sfnt = require("./sfnt.cjs");
|
|
|
3
3
|
const require_ot_layout_common = require("./ot-layout-common.cjs");
|
|
4
4
|
const require_gdef_table = require("./gdef-table.cjs");
|
|
5
5
|
//#region src/gsub-table.ts
|
|
6
|
+
const constantZeroClassDef = () => 0;
|
|
6
7
|
const DEFAULT_GSUB_FEATURE_TAGS = [
|
|
7
8
|
"liga",
|
|
8
9
|
"rlig",
|
|
@@ -422,7 +423,6 @@ function parseContextualSubtable(bytes, chained, subtableOffset, skip, lookupOf)
|
|
|
422
423
|
}, skip, lookupOf);
|
|
423
424
|
}
|
|
424
425
|
}
|
|
425
|
-
const constantZeroClassDef = () => 0;
|
|
426
426
|
function findScriptOffset(bytes, scriptListOffset) {
|
|
427
427
|
if (!require_sfnt.hasBytes(bytes, scriptListOffset, 2)) return;
|
|
428
428
|
const scriptCount = require_sfnt.u16(bytes, scriptListOffset);
|
package/dist/gsub-table.js
CHANGED
|
@@ -2,6 +2,7 @@ import { hasBytes, i16, sfntTableBytes, u16, u32 } from "./sfnt.js";
|
|
|
2
2
|
import { parseClassDef, parseCoverage } from "./ot-layout-common.js";
|
|
3
3
|
import { parseGdefTable } from "./gdef-table.js";
|
|
4
4
|
//#region src/gsub-table.ts
|
|
5
|
+
const constantZeroClassDef = () => 0;
|
|
5
6
|
const DEFAULT_GSUB_FEATURE_TAGS = [
|
|
6
7
|
"liga",
|
|
7
8
|
"rlig",
|
|
@@ -421,7 +422,6 @@ function parseContextualSubtable(bytes, chained, subtableOffset, skip, lookupOf)
|
|
|
421
422
|
}, skip, lookupOf);
|
|
422
423
|
}
|
|
423
424
|
}
|
|
424
|
-
const constantZeroClassDef = () => 0;
|
|
425
425
|
function findScriptOffset(bytes, scriptListOffset) {
|
|
426
426
|
if (!hasBytes(bytes, scriptListOffset, 2)) return;
|
|
427
427
|
const scriptCount = u16(bytes, scriptListOffset);
|
package/dist/hmtx-table.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as SfntFont } from "./sfnt-V08bb5ut.cjs";
|
|
2
2
|
//#region src/hmtx-table.d.ts
|
|
3
3
|
interface HmtxTable {
|
|
4
|
-
advanceWidth(glyphId: number)
|
|
4
|
+
advanceWidth: (glyphId: number) => number;
|
|
5
5
|
}
|
|
6
6
|
declare function parseHmtx(font: SfntFont): HmtxTable;
|
|
7
7
|
//#endregion
|
package/dist/hmtx-table.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as SfntFont } from "./sfnt-V08bb5ut.js";
|
|
2
2
|
//#region src/hmtx-table.d.ts
|
|
3
3
|
interface HmtxTable {
|
|
4
|
-
advanceWidth(glyphId: number)
|
|
4
|
+
advanceWidth: (glyphId: number) => number;
|
|
5
5
|
}
|
|
6
6
|
declare function parseHmtx(font: SfntFont): HmtxTable;
|
|
7
7
|
//#endregion
|