@ot-builder/io-bin-ttf 1.8.0 → 1.9.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.
@@ -1,6 +1,6 @@
1
- import { BinaryView, Frag } from "@ot-builder/bin-util";
2
- import * as ImpLib from "@ot-builder/common-impl";
3
- import { Cvt } from "@ot-builder/ot-glyphs";
1
+ import type { BinaryView, Frag } from "@ot-builder/bin-util";
2
+ import type * as ImpLib from "@ot-builder/common-impl";
3
+ import type { Cvt } from "@ot-builder/ot-glyphs";
4
4
  import { OtVar } from "@ot-builder/variance";
5
5
  export declare const CvarIo: {
6
6
  read(view: BinaryView, cvt: Cvt.Table, designSpace: OtVar.DesignSpace): void;
@@ -1,4 +1,4 @@
1
- import { BinaryView, Frag } from "@ot-builder/bin-util";
1
+ import type { BinaryView, Frag } from "@ot-builder/bin-util";
2
2
  import { Cvt } from "@ot-builder/ot-glyphs";
3
3
  export declare const CvtIo: {
4
4
  read(view: BinaryView): Cvt.Table;
@@ -1,4 +1,4 @@
1
- import { BinaryView, Frag } from "@ot-builder/bin-util";
1
+ import type { BinaryView, Frag } from "@ot-builder/bin-util";
2
2
  import { Fpgm, Prep } from "@ot-builder/ot-glyphs";
3
3
  export declare const FpgmIo: {
4
4
  read(view: BinaryView): Fpgm.Table;
@@ -1,5 +1,5 @@
1
1
  import { OtGlyph } from "@ot-builder/ot-glyphs";
2
- import { Data } from "@ot-builder/prelude";
2
+ import type { Data } from "@ot-builder/prelude";
3
3
  export declare class GlyphClassifier {
4
4
  private gOrd;
5
5
  constructor(gOrd: Data.Order<OtGlyph>);
@@ -1,5 +1,5 @@
1
- import { BinaryView, Frag } from "@ot-builder/bin-util";
2
- import { Head, Maxp } from "@ot-builder/ot-metadata";
1
+ import type { BinaryView, Frag } from "@ot-builder/bin-util";
2
+ import type { Head, Maxp } from "@ot-builder/ot-metadata";
3
3
  export declare const LocaTag = "loca";
4
4
  export interface LocaTable {
5
5
  glyphOffsets: number[];
@@ -1,6 +1,6 @@
1
1
  import { Read } from "@ot-builder/bin-util";
2
2
  import { OtGlyph } from "@ot-builder/ot-glyphs";
3
- import { Data } from "@ot-builder/prelude";
4
- import { LocaTable } from "./loca";
3
+ import type { Data } from "@ot-builder/prelude";
4
+ import type { LocaTable } from "./loca";
5
5
  export declare const GlyfTableRead: Read<void, [loca: LocaTable, gOrd: Data.Order<OtGlyph>, coStat: OtGlyph.CoStat.Source]>;
6
6
  //# sourceMappingURL=read.d.ts.map
package/lib/glyf/read.js CHANGED
@@ -178,6 +178,7 @@ const CompositeGlyph = (0, bin_util_1.Read)((view, gOrd) => {
178
178
  return { references, instructions };
179
179
  });
180
180
  exports.GlyfTableRead = (0, bin_util_1.Read)((view, loca, gOrd, coStat) => {
181
+ var _a;
181
182
  for (let gid = 0; gid < gOrd.length; gid++) {
182
183
  const glyph = gOrd.at(gid);
183
184
  const offset = loca.glyphOffsets[gid];
@@ -193,14 +194,14 @@ exports.GlyfTableRead = (0, bin_util_1.Read)((view, loca, gOrd, coStat) => {
193
194
  if (numberOfContours >= 0) {
194
195
  const { geometry, instructions } = vGlyph.next(SimpleGlyph, numberOfContours);
195
196
  glyph.geometry = geometry;
196
- if (instructions && instructions.byteLength) {
197
+ if (instructions.byteLength) {
197
198
  glyph.hints = new ot_glyphs_1.OtGlyph.TtInstruction(instructions);
198
199
  }
199
200
  }
200
201
  else {
201
202
  const r = vGlyph.next(CompositeGlyph, gOrd);
202
203
  glyph.geometry = new ot_glyphs_1.OtGlyph.GeometryList(r.references);
203
- if (r.instructions && r.instructions.byteLength) {
204
+ if ((_a = r.instructions) === null || _a === void 0 ? void 0 : _a.byteLength) {
204
205
  glyph.hints = new ot_glyphs_1.OtGlyph.TtInstruction(r.instructions);
205
206
  }
206
207
  }
@@ -1,8 +1,8 @@
1
1
  import { Write } from "@ot-builder/bin-util";
2
2
  import { OtGlyph } from "@ot-builder/ot-glyphs";
3
- import { Data } from "@ot-builder/prelude";
4
- import { TtfCfg } from "../cfg";
5
- import { TtfWritingExtraInfoSink } from "../extra-info-sink/index";
6
- import { LocaTable } from "./loca";
3
+ import type { Data } from "@ot-builder/prelude";
4
+ import type { TtfCfg } from "../cfg";
5
+ import type { TtfWritingExtraInfoSink } from "../extra-info-sink/index";
6
+ import type { LocaTable } from "./loca";
7
7
  export declare const GlyfTableWrite: Write<Data.Order<OtGlyph>, [cfg: TtfCfg, outLoca: LocaTable, stat: OtGlyph.Stat.Sink, extraInfoSink: TtfWritingExtraInfoSink]>;
8
8
  //# sourceMappingURL=write.d.ts.map
package/lib/glyf/write.js CHANGED
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GlyfTableWrite = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const bin_util_1 = require("@ot-builder/bin-util");
5
- const ImpLib = require("@ot-builder/common-impl");
6
+ const ImpLib = tslib_1.__importStar(require("@ot-builder/common-impl"));
6
7
  const ot_glyphs_1 = require("@ot-builder/ot-glyphs");
7
8
  const primitive_1 = require("@ot-builder/primitive");
8
9
  const variance_1 = require("@ot-builder/variance");
@@ -1,8 +1,8 @@
1
1
  import { Read } from "@ot-builder/bin-util";
2
2
  import { OtGlyph } from "@ot-builder/ot-glyphs";
3
- import { Data } from "@ot-builder/prelude";
3
+ import type { Data } from "@ot-builder/prelude";
4
4
  import { OtVar } from "@ot-builder/variance";
5
- import { TtfCfg } from "../cfg";
5
+ import type { TtfCfg } from "../cfg";
6
6
  export interface GvarReadIgnore {
7
7
  horizontalMetric?: boolean;
8
8
  verticalMetric?: boolean;
@@ -1,8 +1,8 @@
1
1
  import { Write } from "@ot-builder/bin-util";
2
- import * as ImpLib from "@ot-builder/common-impl";
2
+ import type * as ImpLib from "@ot-builder/common-impl";
3
3
  import { OtGlyph } from "@ot-builder/ot-glyphs";
4
- import { Data } from "@ot-builder/prelude";
5
- import { OtVar } from "@ot-builder/variance";
6
- import { TtfCfg } from "../cfg";
4
+ import type { Data } from "@ot-builder/prelude";
5
+ import type { OtVar } from "@ot-builder/variance";
6
+ import type { TtfCfg } from "../cfg";
7
7
  export declare const GvarTableWrite: Write<Data.Order<OtGlyph>, [cfg: TtfCfg, designSpace: OtVar.DesignSpace, acEmpty?: ImpLib.Access<boolean> | undefined]>;
8
8
  //# sourceMappingURL=write.d.ts.map
package/lib/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { LocaTable } from "./glyf/loca";
2
- export * from "./cvt/index";
3
- export * from "./cvar/index";
4
- export * from "./fpgm-prep/index";
1
+ import { type LocaTable } from "./glyf/loca";
5
2
  export * from "./cfg/index";
3
+ export * from "./cvar/index";
4
+ export * from "./cvt/index";
6
5
  export * from "./extra-info-sink/index";
7
- export * from "./rectify/rectify";
6
+ export * from "./fpgm-prep/index";
8
7
  export * from "./glyf/shared";
8
+ export * from "./rectify/rectify";
9
9
  export declare namespace Loca {
10
10
  type Table = LocaTable;
11
11
  const Tag = "loca";
package/lib/index.js CHANGED
@@ -9,13 +9,13 @@ const write_1 = require("./glyf/write");
9
9
  const read_2 = require("./gvar/read");
10
10
  const shared_2 = require("./gvar/shared");
11
11
  const write_2 = require("./gvar/write");
12
- tslib_1.__exportStar(require("./cvt/index"), exports);
13
- tslib_1.__exportStar(require("./cvar/index"), exports);
14
- tslib_1.__exportStar(require("./fpgm-prep/index"), exports);
15
12
  tslib_1.__exportStar(require("./cfg/index"), exports);
13
+ tslib_1.__exportStar(require("./cvar/index"), exports);
14
+ tslib_1.__exportStar(require("./cvt/index"), exports);
16
15
  tslib_1.__exportStar(require("./extra-info-sink/index"), exports);
17
- tslib_1.__exportStar(require("./rectify/rectify"), exports);
16
+ tslib_1.__exportStar(require("./fpgm-prep/index"), exports);
18
17
  tslib_1.__exportStar(require("./glyf/shared"), exports);
18
+ tslib_1.__exportStar(require("./rectify/rectify"), exports);
19
19
  var Loca;
20
20
  (function (Loca) {
21
21
  Loca.Tag = loca_1.LocaTag;
@@ -1,4 +1,4 @@
1
1
  import { OtGlyph } from "@ot-builder/ot-glyphs";
2
- import { Data } from "@ot-builder/prelude";
2
+ import type { Data } from "@ot-builder/prelude";
3
3
  export declare function rectifyGlyphOrder(gOrd: Data.Order<OtGlyph>): void;
4
4
  //# sourceMappingURL=rectify.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ot-builder/io-bin-ttf",
3
3
  "description": "",
4
- "version": "1.8.0",
4
+ "version": "1.9.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,23 +24,23 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@ot-builder/bin-util": "1.7.8",
28
- "@ot-builder/common-impl": "1.7.7",
29
- "@ot-builder/errors": "1.7.7",
30
- "@ot-builder/ot-glyphs": "1.7.8",
31
- "@ot-builder/ot-metadata": "1.7.8",
32
- "@ot-builder/prelude": "1.7.7",
33
- "@ot-builder/primitive": "1.7.8",
34
- "@ot-builder/stat-glyphs": "1.7.8",
35
- "@ot-builder/var-store": "1.7.8",
36
- "@ot-builder/variance": "1.7.8",
27
+ "@ot-builder/bin-util": "1.8.0",
28
+ "@ot-builder/common-impl": "1.8.0",
29
+ "@ot-builder/errors": "1.8.0",
30
+ "@ot-builder/ot-glyphs": "1.8.0",
31
+ "@ot-builder/ot-metadata": "1.8.0",
32
+ "@ot-builder/prelude": "1.8.0",
33
+ "@ot-builder/primitive": "1.8.0",
34
+ "@ot-builder/stat-glyphs": "1.8.0",
35
+ "@ot-builder/var-store": "1.8.0",
36
+ "@ot-builder/variance": "1.8.0",
37
37
  "tslib": "^2.8.1"
38
38
  },
39
39
  "devDependencies": {
40
- "@ot-builder/ot-sfnt": "1.7.8",
41
- "@ot-builder/io-bin-metadata": "1.7.8",
42
- "@ot-builder/io-bin-sfnt": "1.7.8",
43
- "@ot-builder/test-util": "1.7.8",
40
+ "@ot-builder/ot-sfnt": "1.8.0",
41
+ "@ot-builder/io-bin-metadata": "1.8.0",
42
+ "@ot-builder/io-bin-sfnt": "1.8.0",
43
+ "@ot-builder/test-util": "1.8.0",
44
44
  "@types/jest": "^30.0.0",
45
45
  "jest": "^30.2.0"
46
46
  }