@mark1russell7/layout-contract 0.9.7 → 0.9.9

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/src/geometry.ts CHANGED
@@ -253,6 +253,57 @@ export function pointInRings(x: number, y: number, rings: readonly Ring[]): bool
253
253
  return inside;
254
254
  }
255
255
 
256
+ /**
257
+ * This function gives the centroid of the area of a ring, by the shoelace formula. The order of the corners can be
258
+ * clockwise or counterclockwise. A ring with the area 0 gives the mean of its corners. An empty ring is a `RangeError`.
259
+ * The sums use the corners relative to the first corner. Thus a small ring far from the origin keeps its digits.
260
+ */
261
+ export function ringCentroid(ring: Ring): Point {
262
+ if (ring.length === 0) throw new RangeError("ringCentroid needs a ring with at least one corner.");
263
+ const [ox, oy] = ring[0]!;
264
+ let twice = 0;
265
+ let sx = 0;
266
+ let sy = 0;
267
+ for (let i = 0; i < ring.length; i++) {
268
+ const a = ring[i]!;
269
+ const b = ring[(i + 1) % ring.length]!;
270
+ const ax = a[0] - ox;
271
+ const ay = a[1] - oy;
272
+ const bx = b[0] - ox;
273
+ const by = b[1] - oy;
274
+ const cross = ax * by - bx * ay;
275
+ twice += cross;
276
+ sx += (ax + bx) * cross;
277
+ sy += (ay + by) * cross;
278
+ }
279
+ if (twice === 0) {
280
+ const mean = (k: 0 | 1): number => ring.reduce((sum, corner) => sum + (corner[k] - ring[0]![k]), 0) / ring.length;
281
+ return { x: ox + mean(0), y: oy + mean(1) };
282
+ }
283
+ return { x: ox + sx / (3 * twice), y: oy + sy / (3 * twice) };
284
+ }
285
+
286
+ /**
287
+ * This function gives the part of a ring in the half-plane `a * x + b * y <= c`, by the steps of Sutherland and Hodgman.
288
+ * The corners keep their order. A new corner goes where a side crosses the line. A ring with no part in the half-plane
289
+ * gives an empty ring. The part of a convex ring is convex. The part of a concave ring can have sides of length 0 on the line.
290
+ */
291
+ export function clipRing(ring: Ring, a: number, b: number, c: number): Ring {
292
+ const out: (readonly [number, number])[] = [];
293
+ for (let i = 0; i < ring.length; i++) {
294
+ const p = ring[i]!;
295
+ const q = ring[(i + 1) % ring.length]!;
296
+ const fp = a * p[0] + b * p[1] - c;
297
+ const fq = a * q[0] + b * q[1] - c;
298
+ if (fp <= 0) out.push(p);
299
+ if ((fp < 0 && fq > 0) || (fp > 0 && fq < 0)) {
300
+ const t = fp / (fp - fq);
301
+ out.push([p[0] + t * (q[0] - p[0]), p[1] + t * (q[1] - p[1])]);
302
+ }
303
+ }
304
+ return out;
305
+ }
306
+
256
307
  /** This function gives the distance between the centers of two rectangles. */
257
308
  export function boxCenterDistance(a: Rect, b: Rect): number {
258
309
  return Math.hypot(b.x + b.w / 2 - (a.x + a.w / 2), b.y + b.h / 2 - (a.y + a.h / 2));
@@ -47,9 +47,11 @@ export {
47
47
  type OptionSetting,
48
48
  type OptionSupports,
49
49
  paramActive,
50
+ paramAt,
50
51
  type ParamKind,
51
52
  paramLevels,
52
53
  paramProblem,
54
+ paramUnit,
53
55
  type ParamValue,
54
56
  paramValue,
55
57
  type ParamWhen,
package/src/text.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { breakers, linesOf, type Box, type Item, type Penalty } from "@mark1russell7/typeset/breaking";
1
+ import { adjustmentRatios, breakers, linesOf, type Box, type Glue, type Item, type Penalty } from "@mark1russell7/typeset/breaking";
2
2
  import { graphemes, lineBreaks } from "@mark1russell7/typeset/segmentation";
3
3
  import { partsOfWords } from "./word-parts.ts";
4
4
  import type { MeasureSpec } from "./measures.ts";
@@ -313,6 +313,26 @@ export interface TextLayoutOptions {
313
313
  readonly sizing?: TextSizing;
314
314
  /** The declared character set of `sizing`. `bound-first` and `bound` need it, and `exact` does not read it. */
315
315
  readonly charset?: TextCharset;
316
+ /**
317
+ * The stretch and the shrink of each space of a text that wraps, as a share of the width of a space. TeX uses a stretch of 0.5 and a shrink of 1/3.
318
+ * With this option, `total-fit` chooses the lines with the adjustment ratio, and the layout gives the ratio of each line in `ratios`.
319
+ * Without it, a space does not stretch or shrink.
320
+ */
321
+ readonly justify?: TextJustify;
322
+ /**
323
+ * The hyphenation hook of `paragraphOf` of `@mark1russell7/typeset`. It gives the offsets in a word where a break with a hyphen is possible.
324
+ * A line that ends at such an offset ends with "-". The subpaths `./hyphen/<language>` of typeset give a hook for each language.
325
+ * layout-contract imports no pattern set. Without the option, a word does not break at a hyphen.
326
+ */
327
+ readonly hyphenate?: (word: string) => readonly number[];
328
+ }
329
+
330
+ /** The stretch and the shrink of each space of a justified layout, as a share of the width of a space. */
331
+ export interface TextJustify {
332
+ /** A finite number of 0 or more. */
333
+ readonly stretch: number;
334
+ /** A finite number from 0 to 1, because a space cannot be narrower than 0. */
335
+ readonly shrink: number;
316
336
  }
317
337
 
318
338
  /** The layout of a text: its lines and its box. */
@@ -330,6 +350,13 @@ export interface TextLayout {
330
350
  readonly truncated: boolean;
331
351
  /** `true` when the widths and the box come from the bound of a character set. Each width is then at or above the measured width. A measured layout does not have this field. */
332
352
  readonly bounded?: true;
353
+ /**
354
+ * The adjustment ratio of each line of a text that wraps with the option `justify`. A renderer adds `ratio × stretch × space` to each space of the
355
+ * line, or `ratio × shrink × space` when the ratio is negative. The last line does not stretch, so its ratio is not more than 0.
356
+ * The ratio is infinite for a line with free space and no space to stretch.
357
+ * A layout without `justify`, or a text that fits on one line at its natural width, does not have this field.
358
+ */
359
+ readonly ratios?: readonly number[];
333
360
  }
334
361
 
335
362
  /** A forced break: a penalty with no text, no width and the cost `-Infinity`. */
@@ -338,6 +365,21 @@ const FORCED: Penalty = { type: "penalty", text: "", width: 0, cost: -Infinity,
338
365
  /** The glue between two words with no white space between them, for example after a hyphen or between two CJK characters. A line can end there. */
339
366
  const NO_GAP: Item = { type: "glue", text: "", width: 0 };
340
367
 
368
+ /** The cost of a break at a hyphen: 50, as in TeX and in `paragraphOf` of typeset. */
369
+ const HYPHEN_COST = 50;
370
+
371
+ /**
372
+ * This function gives the hyphen places of a word from the hook, sorted, with no repeat.
373
+ * It keeps only the offsets between two grapheme clusters, so a place inside a surrogate pair or before a mark does not split a cluster.
374
+ */
375
+ function hyphenPlaces(word: string, hyphenate: (word: string) => readonly number[]): number[] {
376
+ const edges = new Set<number>();
377
+ let at = 0;
378
+ for (const cluster of graphemesOf(word)) edges.add((at += cluster.length));
379
+ const places = hyphenate(word).filter((o) => o > 0 && o < word.length && edges.has(o));
380
+ return [...new Set(places)].sort((a, b) => a - b);
381
+ }
382
+
341
383
  /** This function gives the box of a part of a word. */
342
384
  /** This function gives the units of a segment: the bound for one character times the length, or a measure when there is no bound. */
343
385
  function advanceOf(segment: string, font: string, measurer: TextMeasurer, bound: number | undefined): number {
@@ -375,6 +417,10 @@ export function layoutText(text: string, options: TextLayoutOptions): TextLayout
375
417
  const sizing = options.sizing ?? "exact";
376
418
  if (sizing !== "exact" && sizing !== "bound-first" && sizing !== "bound") throw new RangeError(`layoutText: sizing is "exact", "bound-first" or "bound", not ${String(sizing)}.`);
377
419
  const charset = sizing === "exact" ? undefined : options.charset;
420
+ const { justify, hyphenate } = options;
421
+ if (justify !== undefined && !(Number.isFinite(justify.stretch) && justify.stretch >= 0 && Number.isFinite(justify.shrink) && justify.shrink >= 0 && justify.shrink <= 1)) {
422
+ throw new RangeError(`layoutText: justify has a finite stretch of 0 or more and a shrink from 0 to 1, not ${String(justify.stretch)} and ${String(justify.shrink)}.`);
423
+ }
378
424
  if (sizing !== "exact" && charset === undefined) throw new RangeError(`layoutText: sizing "${sizing}" needs a charset from createTextCharset.`);
379
425
  let truncated = false;
380
426
 
@@ -438,17 +484,45 @@ export function layoutText(text: string, options: TextLayoutOptions): TextLayout
438
484
  }
439
485
  if (cur !== undefined) items.push(boxOf(cur));
440
486
  };
487
+ const gap: Glue = justify === undefined ? { type: "glue", text: " ", width: space } : { type: "glue", text: " ", width: space, stretch: space * justify.stretch, shrink: space * justify.shrink };
488
+ const hyphen: Penalty | undefined = hyphenate === undefined ? undefined : { type: "penalty", text: "-", width: advanceOf("-", font, measurer, bound), cost: HYPHEN_COST, flagged: true };
489
+ /**
490
+ * This function puts the parts of a word between its hyphen places, with a hyphen penalty between two parts. A word with no place stays one box.
491
+ * The last part gets the width of the word minus the earlier parts. Thus the parts have the width of the whole word, also with kerning.
492
+ */
493
+ const hyphenated = (word: Word, w: number): void => {
494
+ const places = hyphen === undefined ? [] : hyphenPlaces(word.text, hyphenate!);
495
+ if (places.length === 0) {
496
+ items.push({ type: "box", text: word.text, width: w });
497
+ return;
498
+ }
499
+ let start = 0;
500
+ let rest = w;
501
+ for (const end of [...places, word.text.length]) {
502
+ if (start > 0) items.push(hyphen!);
503
+ const part = word.text.slice(start, end);
504
+ const units = end === word.text.length ? rest : advanceOf(part, font, measurer, bound);
505
+ items.push({ type: "box", text: part, width: units });
506
+ rest -= units;
507
+ start = end;
508
+ }
509
+ };
441
510
  words.forEach((word, i) => {
442
511
  const w = widths[i]!;
443
512
  if (w > limit && !keep) split(word);
444
513
  else {
445
- if (items.length > 0) items.push(words[i - 1]!.spaced ? { type: "glue", text: " ", width: space } : NO_GAP);
446
- items.push({ type: "box", text: word.text, width: w });
514
+ if (items.length > 0) items.push(words[i - 1]!.spaced ? gap : NO_GAP);
515
+ hyphenated(word, w);
447
516
  }
448
517
  });
449
518
  const paragraph = { items };
450
- const lines: Line[] = linesOf(paragraph, breaker.breaks(paragraph, limit)).map((l) => ({ text: l.text, units: l.width }));
451
- if (lines.length === 0) lines.push({ text: "", units: 0 });
519
+ const broken = linesOf(paragraph, breaker.breaks(paragraph, limit));
520
+ const lines: Line[] = broken.map((l) => ({ text: l.text, units: l.width }));
521
+ const ratios = justify === undefined ? undefined : adjustmentRatios(paragraph, broken, limit);
522
+ if (lines.length === 0) {
523
+ lines.push({ text: "", units: 0 });
524
+ ratios?.push(0);
525
+ }
452
526
 
453
527
  const maxLines = options.maxLines ?? Infinity;
454
528
  if (lines.length > maxLines) {
@@ -461,6 +535,11 @@ export function layoutText(text: string, options: TextLayoutOptions): TextLayout
461
535
  last.text = kept + ellipsis;
462
536
  last.units = lineUnits(kept) + tail;
463
537
  truncated = true;
538
+ // The cut line is the last line, so it does not stretch. The cut makes it fit, so it does not shrink.
539
+ if (ratios !== undefined) {
540
+ ratios.length = lines.length;
541
+ ratios[lines.length - 1] = 0;
542
+ }
464
543
  }
465
544
 
466
545
  const layout: TextLayout = {
@@ -471,6 +550,7 @@ export function layoutText(text: string, options: TextLayoutOptions): TextLayout
471
550
  height: lines.length * lineHeight,
472
551
  wrapWidth: options.wrapWidth,
473
552
  truncated,
553
+ ...(ratios === undefined ? {} : { ratios }),
474
554
  };
475
555
  return bound === undefined ? layout : { ...layout, bounded: true };
476
556
  }
@@ -509,7 +589,7 @@ function numberKey(value: number | undefined): string {
509
589
  * A number has no comma. The two lengths mark the end of the font and of the ellipsis.
510
590
  */
511
591
  function optionsKey(o: TextLayoutOptions): string {
512
- const numbers = `${numberKey(o.lineHeight)},${numberKey(o.wrapWidth)},${numberKey(o.maxLines)},${numberKey(o.maxChars)},${numberKey(o.padding)},${numberKey(o.minWidth)},${numberKey(o.maxWidth)}`;
592
+ const numbers = `${numberKey(o.lineHeight)},${numberKey(o.wrapWidth)},${numberKey(o.maxLines)},${numberKey(o.maxChars)},${numberKey(o.padding)},${numberKey(o.minWidth)},${numberKey(o.maxWidth)},${numberKey(o.justify?.stretch)},${numberKey(o.justify?.shrink)}`;
513
593
  return `${numbers},${(o.wordBreak ?? "keep") === "keep"},${o.breaker},${o.sizing ?? "exact"},${o.font.length},${o.ellipsis?.length},${o.font}${o.ellipsis ?? ""}`;
514
594
  }
515
595
 
@@ -529,7 +609,10 @@ function sameOptions(a: TextLayoutOptions, b: TextLayoutOptions): boolean {
529
609
  a.wordBreak === b.wordBreak &&
530
610
  a.breaker === b.breaker &&
531
611
  a.sizing === b.sizing &&
532
- a.charset === b.charset
612
+ a.charset === b.charset &&
613
+ a.hyphenate === b.hyphenate &&
614
+ Object.is(a.justify?.stretch, b.justify?.stretch) &&
615
+ Object.is(a.justify?.shrink, b.justify?.shrink)
533
616
  );
534
617
  }
535
618
 
@@ -543,7 +626,7 @@ interface CurrentOptions {
543
626
  }
544
627
 
545
628
  /**
546
- * This function gives a bounded cache of `layoutText` results, keyed by the text, the options, the measurer and the character set.
629
+ * This function gives a bounded cache of `layoutText` results, keyed by the text, the options, the measurer, the character set and the hyphenation hook.
547
630
  * A full cache removes one entry. It takes the set of options that a caller used least recently, and in it the text that a caller used least recently.
548
631
  * The key holds the raw font string, because a host can give two spellings of a font two different advances.
549
632
  * A measurer with `generation` starts a new set of keys after each `reset`. For a different measurer, start `reset` of the cache after a change of the advances.
@@ -572,10 +655,13 @@ export function createTextLayoutCache(options: TextLayoutCacheOptions = {}): Tex
572
655
  /** This function finds the layouts of a set of options, and it makes that set the most recently used. */
573
656
  const open = (layoutOptions: TextLayoutOptions, generation: number | undefined): CurrentOptions => {
574
657
  const charset = layoutOptions.charset === undefined ? "" : idOf(layoutOptions.charset);
575
- const key = `${idOf(layoutOptions.measurer)},${generation},${charset},${optionsKey(layoutOptions)}`;
658
+ const hyphenate = layoutOptions.hyphenate === undefined ? "" : idOf(layoutOptions.hyphenate);
659
+ const key = `${idOf(layoutOptions.measurer)},${generation},${charset},${hyphenate},${optionsKey(layoutOptions)}`;
576
660
  const layouts = groups.get(key) ?? new Map<string, TextLayout>();
577
661
  if (groups.delete(key)) groups.set(key, layouts);
578
- return { options: { ...layoutOptions }, generation, key, layouts };
662
+ // The copy of `justify` keeps its values, so a later change of the object of the caller does not touch the key.
663
+ const copy = layoutOptions.justify === undefined ? { ...layoutOptions } : { ...layoutOptions, justify: { ...layoutOptions.justify } };
664
+ return { options: copy, generation, key, layouts };
579
665
  };
580
666
  /** This function removes one entry. */
581
667
  const evict = (): void => {
@@ -603,6 +689,7 @@ export function createTextLayoutCache(options: TextLayoutCacheOptions = {}): Tex
603
689
  // The callers share this object, so it is frozen also when the cache does not keep it.
604
690
  Object.freeze(layout.lines);
605
691
  Object.freeze(layout.widths);
692
+ if (layout.ratios !== undefined) Object.freeze(layout.ratios);
606
693
  Object.freeze(layout);
607
694
  if (max > 0) {
608
695
  if (size >= max) evict();
@@ -1 +0,0 @@
1
- {"version":3,"file":"measures-Aan-rHz1.d.ts","names":[],"sources":["../src/geometry.ts","../src/corpus.ts","../src/input.ts","../src/shapes.ts","../src/measures.ts"],"mappings":";KAGY;;cAGC,gBAAgB;UAEZ;WACN;WACA;;;UAIM;WACN;WACA;WACA;WACA;;;;;;UAOM;WACN;WACA;WACA;WACA;;;iBAIK,OAAO,MAAM,YAAY;;iBAKzB,YAAY,MAAM,OAAO;;;;;iBAWzB,SAAS,MAAM,OAAO;;;;;;iBAWtB,UAAU,MAAM,MAAM,iBAAiB;;UAMtC;WACN;WACA;WACA;WACA;;;;;;KAOC;WACG;WAAuB;WAAoB;WAAoB;WAAoB;;WAEnF;WACA,QAAQ;WACR,iBAAiB;;WAEjB;WAAyB;WAAqB;WAAqB;;WACnE;WAA0B;WAAqB;WAAqB;WAAqB;;;KAG5F,kBAAkB;;iBAGd,YAAY,QAAQ,qBAAqB;;iBAOzC,KAAK,MAAM,MAAM,QAAQ,qBAAqB;;iBAM9C,SAAS,QAAQ,SAAS;;;;;iBA4B1B,WAAW,QAAQ;;iBAyBnB,UAAU,QAAQ,QAAQ,YAAY,aAAa;;;;;iBAoBnD,UAAU,GAAG,MAAM,GAAG;WAAkB;WAAoB;;;;;;;iBA2B5D,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG;;;;;;iBAU/C,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ;;iBASvD,qBAAqB,GAAG,OAAO,GAAG,OAAO,GAAG;;KAShD;;iBAGI,YAAY,WAAW,WAAW,MAAM;;;;;iBAQxC,aAAa,WAAW,WAAW,gBAAgB;;iBAanD,kBAAkB,GAAG,MAAM,GAAG;;;;;;;;;;;;;;;iBAkB9B,UAAU,OAAO,OAAO,kBAAkB,SAAS;;UC9QlD;;WAEN;;WAEA;;WAEA;;;UAIM;;WAEN;;WAEA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