@pptx-studio/cli 0.1.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,123 @@
1
1
  # @pptx-studio/cli
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 725ad6d: `renderDeck` takes only what it draws.
8
+
9
+ Its options were the `render` verb's own, so a caller that wanted SVG strings passed
10
+ `out`, `json` and `quiet` — three fields the function ignores — and five more it had no
11
+ opinion about. `RenderDeckOptions` is the shape now: `slide`, `width`, `fontDirs`,
12
+ `systemFonts` and `text`, all optional. `renderDeck(bytes)` is a whole call, and
13
+ `renderDeck(bytes, { slide: 1, width: 640 })` is a thumbnail.
14
+
15
+ `RenderOptions` is the verb's: it extends `RenderDeckOptions` with `out`, `json` and
16
+ `quiet`, and `runRender` is what takes it. `RENDER_DEFAULTS` is gone, because the
17
+ defaults are in `renderDeck` and `DEFAULT_WIDTH` is still exported. A width that is not
18
+ a positive whole number now throws `CLI_WIDTH` instead of drawing an empty picture.
19
+
20
+ Breaking: a call written against 0.1.0 passes three properties this shape does not have.
21
+ Delete them, and delete any field you were only passing to satisfy the type.
22
+
23
+ - c1d7d7d: The face box is read from the table this machine's rasteriser reads.
24
+
25
+ `pptx-studio render` took a face's ascent and descent from `OS/2.usWinAscent`/`usWinDescent`
26
+ everywhere, or `sTypo` where `fsSelection` bit 7 is set. That is what Chromium answers through
27
+ DirectWrite and it is not what Chromium answers through FreeType, which reads
28
+ `hhea.ascender`/`descender`. Neither reading fits both: the first scores 12/12 against Windows and
29
+ 76/79 against Linux, the second 79/79 against Linux and 7/12 against Windows, and the misses are
30
+ 75.8 px and 100 px on a 1000 px em rather than roundings.
31
+
32
+ On a Linux server — which is where this verb runs — the old reading put the IPA Gothic descent at
33
+ 195.8 px where the browser puts it at 120, 7.6% of the em on every line of Japanese text, moving
34
+ every line break and every autofit decision.
35
+
36
+ `indexFonts` now resolves a `FontBackend` from its platform, and `metricsOf` reads `hhea` under
37
+ FreeType and `usWin` under DirectWrite, with bit 7 moving both onto `sTypo`. `FaceMetrics.source`
38
+ gains `hhea`, which is also what a face carrying no `OS/2` now reports rather than claiming `usWin`
39
+ while returning `hhea`'s numbers. macOS takes the DirectWrite reading and is unmeasured.
40
+
41
+ **Breaking:** `facesIn` and `faceOf` take the backend as a third argument. There is no defensible
42
+ default — a silent one would be a guess about the host — and `backendFor(platform)` is exported for
43
+ callers that want the local answer.
44
+
45
+ The rule is measured, not assumed: 79 real faces on a Linux runner against the 12 probe fonts T13
46
+ built to disagree with themselves, both scored in
47
+ `docs/adr/phase-3-text/0045-the-face-box-belongs-to-the-rasteriser.md`.
48
+
49
+ ### Patch Changes
50
+
51
+ - 725ad6d: The ideographic baseline comes out of the font's `BASE` table.
52
+
53
+ `pptx-studio render` placed every upright East Asian glyph on the face's box descent,
54
+ which is right only for a face carrying no `BASE` table. Yu Gothic reports a box descent
55
+ of 0.302 em and an ideographic baseline of 0.1201 em, so a vertical `eaVert` frame was
56
+ drawn 0.18 em out of place on it — and the browser renderer, which asks Chromium, was
57
+ never wrong about the same face.
58
+
59
+ `sfnt.ts` now reads the `BASE` horizontal axis' `ideo` coordinate under the `DFLT`
60
+ script, and `FaceMetrics` carries it as `ideographic`. Where there is none the box
61
+ descent stands, and a coordinate outside the em answers zero, which is what
62
+ `@pptx-studio/text`'s own probe does with an unusable one.
63
+
64
+ The rule is measured, not assumed: four probe fonts whose `DFLT`, `latn` and `hani`
65
+ coordinates all disagree settle it at 30 of 30 in `corpus/ground-truth/font-metrics.json`.
66
+ Chromium reads `DFLT` and no other script — a `BASE` table naming only `latn`, `hani`
67
+ and `kana` is ignored whole — and it reads the same coordinate for a Latin run as for a
68
+ Han one, so the answer is a property of the face rather than of the text.
69
+
70
+ A coordinate outside the em is handed over as written rather than clamped — Chromium
71
+ reported 1.2 em for a font that says so — so both engines see the same unusable number
72
+ and both answer zero.
73
+
74
+ - cec9ef2: Kerning is read through a type 9 GPOS Extension lookup.
75
+
76
+ `pptx-studio render` measured every face whose `kern` feature sits behind an
77
+ `ExtensionPosFormat1` subtable as having no kerning at all — no error, no diagnostic, just
78
+ lines about a twelfth too wide, which moves every break and misfires autofit. Lato is such
79
+ a face, in all eighteen of the styles a Linux runner carries, and so is most of what a
80
+ modern font compiler emits: an extension is how a lookup reaches a subtable past the 64 KB
81
+ a 16-bit offset can address, and compilers wrap unconditionally rather than only when they
82
+ must.
83
+
84
+ `sfnt.ts` read `if (u16(r, lookup) !== 2) continue`, so lookup type 9 was skipped along
85
+ with mark attachment and cursive positioning, which genuinely do not move an advance. It
86
+ now follows a type 9 lookup one level, to the type its `ExtensionPosFormat1` names at the
87
+ 32-bit offset from its own start, and reads the `PairPos` there. Exactly one level: the
88
+ specification forbids an extension targeting another, so nothing recurses, and a subtable
89
+ naming any other type is skipped as before.
90
+
91
+ The rule is measured, not assumed. A twelfth probe font wraps the same `PairPos` the
92
+ eleventh carries plainly, and Chromium drew the two identically at all six sizes and on
93
+ all six strings — so the browser honours the wrapper and the reader was wrong rather than
94
+ strict. Following one extension fits 72 of 72 in
95
+ `corpus/ground-truth/font-metrics.json`, alone at the top; the reading that skipped it
96
+ fits 66, exactly the six rows of the wrapped probe.
97
+
98
+ - cec9ef2: `renderDeck` substitutes a typeface nothing stands in for rather than refusing to draw.
99
+
100
+ A deck naming `Calibri Light` on a Linux server holding 53 perfectly good faces threw
101
+ `CLI_NO_FACE` and rendered nothing. The chain ran exact family, the substitution table,
102
+ Calibri, Carlito — and then gave up, which is the one place the font guard's design was
103
+ not applied: `FaceUse` carries `asked`, `drawn` and `substituted` so the answer can be
104
+ "Calibri Light was drawn in DejaVu Sans" rather than an exception.
105
+
106
+ Two steps now follow the measured chain. The shorter forms of the asked-for name, so
107
+ `Calibri Light` draws in Calibri and `Segoe UI Semilight` in Segoe UI where the machine
108
+ has them — DrawingML has no weight axis, so a style word is part of the typeface name.
109
+ Then, past every named candidate, the first family by name draws the run. Both are
110
+ reported as substitutions under the name the deck asked for, and neither displaces the
111
+ measured chain: ADR 0033 scored PowerPoint's own last resort at 22 of 22 and a guess must
112
+ not override a measurement.
113
+
114
+ The choice is by family name, not by the order `readdir` returned, and the font walk now
115
+ sorts its entries — so two machines holding the same faces draw the same picture, where
116
+ before the answer was the filesystem's own.
117
+
118
+ `CLI_NO_FACE` still throws, and now means exactly one thing: no font was found at all,
119
+ which is nothing to draw with rather than an unusual typeface.
120
+
3
121
  ## 0.1.0
4
122
 
5
123
  ### Minor Changes
package/README.md CHANGED
@@ -200,14 +200,12 @@ cannot drift apart.
200
200
 
201
201
  ## Not built yet
202
202
 
203
- The plan gives this package three more verbs. Asking for one says which sub-phase
204
- brings it rather than "unknown command":
203
+ The plan gives this package one more verb. Asking for it says which sub-phase brings
204
+ it rather than "unknown command":
205
205
 
206
- | verb | what it will do | sub-phase |
207
- | ---------- | --------------------------------------------- | --------- |
208
- | `fidelity` | score a render against a reference | 3.9 |
209
- | `render` | render slides to SVG or PNG without a browser | 3.10 |
210
- | `resolve` | show where a resolved property came from | 7.x |
206
+ | verb | what it will do | sub-phase |
207
+ | --------- | ---------------------------------------- | --------- |
208
+ | `resolve` | show where a resolved property came from | 7.x |
211
209
 
212
210
  ## `render`
213
211
 
@@ -226,12 +224,24 @@ the same document, and there is no external reference of any kind to resolve.
226
224
  face's own `cmap`, `hmtx`, `GPOS` and `OS/2` tables instead. That is a second
227
225
  measurement engine, and the risk of a second engine is that it quietly disagrees
228
226
  with the first. Experiment T13 settled the arithmetic rather than assuming it:
229
- seven fonts built so their tables disagree on purpose, 252 widths measured in
230
- Chromium, and the reader reproduces **all 252 exactly**. The rules it found are
227
+ twelve fonts built so their tables disagree on purpose, 432 widths measured in
228
+ Chromium, and the reader reproduces **all 432 exactly**. It also settled where
229
+ an upright East Asian glyph sits: on the `BASE` table's `ideo` coordinate for
230
+ the `DFLT` script, and on the face box descent only where there is none. The
231
+ rules it found are
231
232
  in [`corpus/ground-truth/font-metrics.json`](../../corpus/ground-truth/font-metrics.json)
232
233
  and the reasoning is in
233
234
  [ADR 0042](../../docs/adr/phase-3-text/0042-rendering-without-a-browser.md).
234
235
 
236
+ **The face box depends on the rasteriser**, so the reader takes the answer
237
+ belonging to the platform it runs on. Chromium reports a face's ascent and
238
+ descent from `OS/2.usWinAscent`/`usWinDescent` through DirectWrite and from
239
+ `hhea.ascender`/`descender` through FreeType, with `fsSelection` bit 7 moving
240
+ both onto `sTypo`. Neither reading fits both: T13's probes score 12/12 and 7/12
241
+ on Windows where 79 real faces score 76/79 and 79/79 on Linux, missing by up to
242
+ 100 px on a 1000 px em. See
243
+ [ADR 0045](../../docs/adr/phase-3-text/0045-the-face-box-belongs-to-the-rasteriser.md).
244
+
235
245
  Fonts are found in this platform's own directories, plus any `--font-dir` you
236
246
  name, which are searched first so you can override a face without installing
237
247
  one. `--no-system-fonts` limits it to what you named; `--no-text` draws geometry
@@ -239,8 +249,21 @@ only and asks no font questions at all.
239
249
 
240
250
  A typeface the machine does not have is substituted through the same table
241
251
  `@pptx-studio/text` uses in the browser, so the two renderers cannot fall back
242
- differently, and the substitution is reported rather than hidden. A code point
243
- no indexed face can draw is reported too.
252
+ differently, and the substitution is reported rather than hidden. The chain is
253
+ that table's entry for the name, then Calibri and Carlito — what PowerPoint
254
+ itself falls back to, measured 22 of 22 in
255
+ [ADR 0033](../../docs/adr/phase-3-text/0033-font-substitution-and-the-guard.md) —
256
+ then the family the asked-for name is a variation of, so `Calibri Light` draws
257
+ in Calibri where the machine has it.
258
+
259
+ Past all of those the first family by name draws the run. The browser's stack
260
+ ends in a generic and this has none, so something has to be chosen, and it is
261
+ chosen by name rather than by the order the files were read in: two machines
262
+ holding the same faces answer identically. It is still reported as a
263
+ substitution, under the name the deck asked for. **`CLI_NO_FACE` is thrown only
264
+ when no font was found at all** — an empty library is nothing to draw with,
265
+ which is a different thing from an unusual typeface. A code point no indexed
266
+ face can draw is reported too.
244
267
 
245
268
  | flag | |
246
269
  | ------------------- | ------------------------------------------------------------------- |
@@ -251,6 +274,37 @@ no indexed face can draw is reported too.
251
274
  | `--no-system-fonts` | do not look in this platform's own font directories |
252
275
  | `--no-text` | geometry only |
253
276
  | `--json` | what was drawn, and which face drew each typeface |
277
+ | `--quiet` | no summary after writing |
278
+
279
+ ### From a program
280
+
281
+ `renderDeck` is what the verb runs, without the file handling: it takes bytes and
282
+ returns the markup. Every option has a default, so the smallest call is the deck and
283
+ nothing else.
284
+
285
+ ```ts
286
+ import { renderDeck } from '@pptx-studio/cli';
287
+
288
+ const deck = renderDeck(bytes); // every slide, 1920 wide
289
+ const thumb = renderDeck(bytes, { slide: 1, width: 640 }).slides[0]?.svg;
290
+ const shape = renderDeck(bytes, { text: false }); // geometry only, no fonts read
291
+ ```
292
+
293
+ | option | default | |
294
+ | ------------- | ----------- | ----------------------------------------------------------- |
295
+ | `slide` | every slide | 1-based; `null` and omitted both mean every slide |
296
+ | `width` | `1920` | the `width` attribute; the height follows the deck's aspect |
297
+ | `fontDirs` | none | searched before the platform's own |
298
+ | `systemFonts` | `true` | also look in this platform's font directories |
299
+ | `text` | `true` | `false` draws geometry only and asks no font questions |
300
+
301
+ `--out`, `--json` and `--quiet` are the command's, not the library's: they say where
302
+ the markup goes and what is printed about it. `runRender` takes those, reads the deck
303
+ off the disk and writes the files. `renderDeck` does neither, and a width that is not
304
+ a positive whole number throws `CLI_WIDTH` rather than drawing an empty picture.
305
+
306
+ Fonts are indexed per call, so a server rendering many decks pays for the scan every
307
+ time.
254
308
 
255
309
  ### What it does not do
256
310
 
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as main } from "./main-DLx2onii.js";
2
+ import { t as main } from "./main-CQsGTsfq.js";
3
3
  //#region src/cli.ts
4
4
  /**
5
5
  * The bin.
package/dist/index.d.ts CHANGED
@@ -60,6 +60,30 @@ declare function runInspect(path: string, options: InspectOptions, write: (text:
60
60
  * against Chromium in experiment T13 rather than taken from the specification.
61
61
  * ADR 0042.
62
62
  */
63
+ /**
64
+ * The rasteriser a Chromium reads a face's vertical metrics through.
65
+ *
66
+ * T13 scored `usWin` 24/24 against DirectWrite on fonts built to disagree, and
67
+ * T14 scored `hhea` 79/79 against FreeType on real faces where `usWin` reaches
68
+ * 76/79. One reader cannot answer both. ADR 0045.
69
+ */
70
+ type FontBackend = 'directwrite' | 'freetype';
71
+ /** FreeType on Linux, DirectWrite elsewhere. macOS is unmeasured. ADR 0045. */
72
+ declare function backendFor(platform: string): FontBackend;
73
+ /** One ascent and descent in font units, the descent positive below the baseline. */
74
+ interface MetricPair {
75
+ readonly ascent: number;
76
+ readonly descent: number;
77
+ }
78
+ /** Every pair a browser could report a face box from, each as its table wrote it. */
79
+ interface MetricCandidates {
80
+ readonly hhea: MetricPair;
81
+ /** `undefined` on a face with no `OS/2` table long enough to hold version 0. */
82
+ readonly usWin: MetricPair | undefined;
83
+ readonly sTypo: MetricPair | undefined;
84
+ /** `OS/2.fsSelection` bit 7, USE_TYPO_METRICS. */
85
+ readonly useTypoMetrics: boolean;
86
+ }
63
87
  interface FaceMetrics {
64
88
  /** `head.unitsPerEm`, the denominator of every number here. */
65
89
  readonly unitsPerEm: number;
@@ -68,7 +92,11 @@ interface FaceMetrics {
68
92
  /** Below the baseline, in font units, positive. */
69
93
  readonly descent: number;
70
94
  /** Which table `ascent` and `descent` came out of, for the diagnostics. */
71
- readonly source: 'usWin' | 'sTypo';
95
+ readonly source: 'hhea' | 'usWin' | 'sTypo';
96
+ /** The `BASE` `ideo` coordinate under `DFLT`, in font units below the baseline. */
97
+ readonly ideographic: number | undefined;
98
+ /** The pairs `ascent` and `descent` were chosen from, so a rival reading is scorable. */
99
+ readonly candidates: MetricCandidates;
72
100
  }
73
101
  interface Face {
74
102
  /** `name` ID 1, which is what PowerPoint matches a typeface on. */
@@ -86,7 +114,7 @@ interface Face {
86
114
  kernBetween(left: number, right: number): number;
87
115
  }
88
116
  /** Every face in a file, which is one unless the file is a collection. */
89
- declare function facesIn(bytes: Uint8Array, subject: string): readonly Face[];
117
+ declare function facesIn(bytes: Uint8Array, subject: string, backend: FontBackend): readonly Face[];
90
118
  //#endregion
91
119
  //#region src/render/faces.d.ts
92
120
  /** Where fonts live on this platform, whether or not the directories exist. */
@@ -154,23 +182,26 @@ declare function createFontMeasurer(library: FontLibrary): FontMeasurer;
154
182
  //#region src/render/render.d.ts
155
183
  /** What a slide is drawn at when the caller says nothing. PowerPoint's own. */
156
184
  declare const DEFAULT_WIDTH = 1920;
157
- interface RenderOptions {
158
- /** 1-based, or `null` for every slide. */
159
- readonly slide: number | null;
160
- readonly width: number;
185
+ /** What to draw. Every field has a default, so `renderDeck(bytes)` is a whole call. */
186
+ interface RenderDeckOptions {
187
+ /** 1-based. Omitted, or `null`, is every slide. */
188
+ readonly slide?: number | null;
189
+ /** The `width` attribute in CSS pixels; the height follows the deck's aspect. */
190
+ readonly width?: number;
191
+ /** Searched before the platform's own, so a face can be overridden without installing it. */
192
+ readonly fontDirs?: readonly string[];
193
+ /** Also look in this platform's font directories. Default true. */
194
+ readonly systemFonts?: boolean;
195
+ /** Draw text. `false` draws geometry only and asks no font questions. Default true. */
196
+ readonly text?: boolean;
197
+ }
198
+ /** What the verb adds: where the markup goes, and what is said about it. */
199
+ interface RenderOptions extends RenderDeckOptions {
161
200
  /** A directory for many slides, a file for one, or `null` for stdout. */
162
201
  readonly out: string | null;
163
- readonly fontDirs: readonly string[];
164
- readonly systemFonts: boolean;
165
- readonly text: boolean;
166
202
  readonly json: boolean;
167
203
  readonly quiet: boolean;
168
204
  }
169
- declare const RENDER_DEFAULTS: {
170
- readonly width: 1920;
171
- readonly systemFonts: true;
172
- readonly text: true;
173
- };
174
205
  interface RenderedSlide {
175
206
  /** 1-based, as the flag and the file name spell it. */
176
207
  readonly number: number;
@@ -190,10 +221,10 @@ interface RenderResult {
190
221
  /**
191
222
  * Render a deck that is already in memory.
192
223
  *
193
- * Separate from `runRender` so that the whole pipeline is exercised by the test
194
- * suite without a file system, a process or a captured stdout.
224
+ * The library entry point: no file system, no process, no stdout. `runRender` is
225
+ * the verb wrapped around it, and the three fields it adds are its own.
195
226
  */
196
- declare function renderDeck(bytes: Uint8Array, options: RenderOptions): RenderResult;
227
+ declare function renderDeck(bytes: Uint8Array, options?: RenderDeckOptions): RenderResult;
197
228
  /** Read, render, write, and return an exit code. Never calls `process.exit`. */
198
229
  declare function runRender(file: string, options: RenderOptions, out: (text: string) => void): number;
199
230
  //#endregion
@@ -216,6 +247,8 @@ type RenderErrorCode =
216
247
  'CLI_FONT_SIZE' |
217
248
  /** A slide index outside the deck. */
218
249
  'CLI_NO_SLIDE' |
250
+ /** A width that is not a positive whole number of pixels. */
251
+ 'CLI_WIDTH' |
219
252
  /** An output path that names no directory, or a directory that is a file. */
220
253
  'CLI_OUTPUT_PATH';
221
254
  declare const RENDER_ERROR_CODES: readonly RenderErrorCode[];
@@ -228,5 +261,5 @@ declare class RenderError extends Error {
228
261
  }
229
262
  declare function isRenderError(error: unknown): error is RenderError;
230
263
  //#endregion
231
- export { DEFAULT_WIDTH, type Face, type FaceUse, type FontLibrary, type FontMeasurer, INSPECT_DEFAULTS, type InspectOptions, type InspectResult, RENDER_DEFAULTS, RENDER_ERROR_CODES, RenderError, type RenderErrorCode, type RenderOptions, type RenderResult, type RenderedSlide, type Streams, createFontMeasurer, facesIn, indexFonts, inspectFile, isRenderError, main, renderDeck, runInspect, runRender, systemFontDirectories };
264
+ export { DEFAULT_WIDTH, type Face, type FaceUse, type FontBackend, type FontLibrary, type FontMeasurer, INSPECT_DEFAULTS, type InspectOptions, type InspectResult, RENDER_ERROR_CODES, type RenderDeckOptions, RenderError, type RenderErrorCode, type RenderOptions, type RenderResult, type RenderedSlide, type Streams, backendFor, createFontMeasurer, facesIn, indexFonts, inspectFile, isRenderError, main, renderDeck, runInspect, runRender, systemFontDirectories };
232
265
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/main.ts","../src/inspect.ts","../src/render/sfnt.ts","../src/render/faces.ts","../src/render/measure.ts","../src/render/render.ts","../src/render/errors.ts"],"mappings":";;;UA0HiB;WACN,MAAM;WACN,MAAM;;;iBASD,KAAK,yBAAyB,UAAS;;;;;;;;;;;;;;;UCrHtC;WACN;WACA;WACA;WACA;;WAEA;;cAGE,kBAAkB;UAQd;WACN,QAAQ;WACR;;;;;;;;;;WAUA;;;iBAIK,YACd,cACA,UAAS,iBACR;;iBAiBa,WACd,cACA,SAAS,gBACT,QAAQ;;;;;;;;;;;;;UCpDO;;WAEN;;WAEA;;WAEA;;WAEA;;UAGM;;WAEN;;WAEA;;WAEA;WACA,SAAS;WACT;WACA;;EAET,UAAU;;EAEV,YAAY,cAAc;;;iBAqdZ,QAAQ,OAAO,YAAY,2BAA2B;;;;iBCnetD,sBAAsB;UAuCrB;WACN,MAAM;WACN;;;UAIM;WACN,MAAM;;WAEN;;WAEA;WACA;WACA;;UAGM;;WAEN,kBAAkB;;WAElB;EACT,QAAQ,gBAAgB,eAAe,kBAAkB;;UAG1C;;WAEN;;WAEA;WACA;;;;;;;;;iBAoBK,WAAW,UAAS,eAAoB;;;UCxEvC;WACN;WACA;WACA;WACA;;UAGM;WACN,UAAU;WACV,SAAS;;EAElB,iBAAiB;;EAEjB;;;;;;;;iBASc,mBAAmB,SAAS,cAAc;;;;cC9C7C;UAEI;;WAEN;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;;cAGE;;;;;UAMI;;WAEN;WACA;;UAGM;WACN,iBAAiB;WACjB;WACA;;WAEA,gBAAgB;;WAEhB;WACA;WACA;;;;;;;;iBAoBK,WAAW,OAAO,YAAY,SAAS,gBAAgB;;iBAuIvD,UACd,cACA,SAAS,eACT,MAAM;;;;;;;;;;KCjNI;;;;;;;;;;;;;cAcC,6BAA6B;cAS7B,oBAAoB;WACb;WACT,MAAM;;WAEN;EAEG,YAAA,MAAM,iBAAiB,iBAAiB;;iBAOtC,cAAc,iBAAiB,SAAS"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/main.ts","../src/inspect.ts","../src/render/sfnt.ts","../src/render/faces.ts","../src/render/measure.ts","../src/render/render.ts","../src/render/errors.ts"],"mappings":";;;UAgIiB;WACN,MAAM;WACN,MAAM;;;iBASD,KAAK,yBAAyB,UAAS;;;;;;;;;;;;;;;UC3HtC;WACN;WACA;WACA;WACA;;WAEA;;cAGE,kBAAkB;UAQd;WACN,QAAQ;WACR;;;;;;;;;;WAUA;;;iBAIK,YACd,cACA,UAAS,iBACR;;iBAiBa,WACd,cACA,SAAS,gBACT,QAAQ;;;;;;;;;;;;;;;;;;;;KC7CE;;iBAGI,WAAW,mBAAmB;;UAK7B;WACN;WACA;;;UAIM;WACN,MAAM;;WAEN,OAAO;WACP,OAAO;;WAEP;;UAGM;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,YAAY;;UAGN;;WAEN;;WAEA;;WAEA;WACA,SAAS;WACT;WACA;;EAET,UAAU;;EAEV,YAAY,cAAc;;;iBAgjBZ,QAAQ,OAAO,YAAY,iBAAiB,SAAS,uBAAuB;;;;iBC1lB5E,sBAAsB;UAyCrB;WACN,MAAM;WACN;;;UAIM;WACN,MAAM;;WAEN;;WAEA;WACA;WACA;;UAGM;;WAEN,kBAAkB;;WAElB;EACT,QAAQ,gBAAgB,eAAe,kBAAkB;;UAG1C;;WAEN;;WAEA;WACA;;;;;;;;;iBAuDK,WAAW,UAAS,eAAoB;;;UCtHvC;WACN;WACA;WACA;WACA;;UAGM;WACN,UAAU;WACV,SAAS;;EAElB,iBAAiB;;EAEjB;;;;;;;;iBASc,mBAAmB,SAAS,cAAc;;;;cC3C7C;;UAGI;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;;UAIM,sBAAsB;;WAE5B;WACA;WACA;;UAQM;;WAEN;WACA;;UAGM;WACN,iBAAiB;WACjB;WACA;;WAEA,gBAAgB;;WAEhB;WACA;WACA;;;;;;;;iBAoBK,WAAW,OAAO,YAAY,UAAS,oBAAyB;;iBAoJhE,UACd,cACA,SAAS,eACT,MAAM;;;;;;;;;;KCtOI;;;;;;;;;;;;;;;cAgBC,6BAA6B;cAU7B,oBAAoB;WACb;WACT,MAAM;;WAEN;EAEG,YAAA,MAAM,iBAAiB,iBAAiB;;iBAOtC,cAAc,iBAAiB,SAAS"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as runRender, c as systemFontDirectories, d as RenderError, f as isRenderError, h as runInspect, i as renderDeck, l as facesIn, m as inspectFile, n as DEFAULT_WIDTH, o as createFontMeasurer, p as INSPECT_DEFAULTS, r as RENDER_DEFAULTS, s as indexFonts, t as main, u as RENDER_ERROR_CODES } from "./main-DLx2onii.js";
2
- export { DEFAULT_WIDTH, INSPECT_DEFAULTS, RENDER_DEFAULTS, RENDER_ERROR_CODES, RenderError, createFontMeasurer, facesIn, indexFonts, inspectFile, isRenderError, main, renderDeck, runInspect, runRender, systemFontDirectories };
1
+ import { a as createFontMeasurer, c as backendFor, d as RenderError, f as isRenderError, h as runInspect, i as runRender, l as facesIn, m as inspectFile, n as DEFAULT_WIDTH, o as indexFonts, p as INSPECT_DEFAULTS, r as renderDeck, s as systemFontDirectories, t as main, u as RENDER_ERROR_CODES } from "./main-CQsGTsfq.js";
2
+ export { DEFAULT_WIDTH, INSPECT_DEFAULTS, RENDER_ERROR_CODES, RenderError, backendFor, createFontMeasurer, facesIn, indexFonts, inspectFile, isRenderError, main, renderDeck, runInspect, runRender, systemFontDirectories };