ooxml-core 1.40.0 → 1.41.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.
Files changed (134) hide show
  1. package/dist/{PptxHandler-2WYH66TS.mjs → PptxHandler-3AGIITR7.mjs} +2 -2
  2. package/dist/PptxHandler-EL4E4SPH.mjs +5 -0
  3. package/dist/PptxHandler-OIZ3R3DJ.cjs +14 -0
  4. package/dist/{PresentationBuilder-RTHLLHLE.mjs → PresentationBuilder-5DPKFUXP.mjs} +3 -3
  5. package/dist/{PresentationBuilder-VHDHLGIK.mjs → PresentationBuilder-JNID4B4Z.mjs} +2 -2
  6. package/dist/{PresentationBuilder-BUUVVMNI.cjs → PresentationBuilder-MZBKYOYD.cjs} +6 -6
  7. package/dist/automation/index.cjs +5336 -3452
  8. package/dist/automation/index.mjs +5336 -3452
  9. package/dist/{chunk-U6FMLGWH.cjs → chunk-3BIFRTU4.cjs} +1300 -1269
  10. package/dist/{chunk-HLBIT5H4.mjs → chunk-6LGRRQ3K.mjs} +1 -1
  11. package/dist/{chunk-SEGPDD5W.cjs → chunk-75KBNUKS.cjs} +4932 -3048
  12. package/dist/{chunk-AZNF3IOI.mjs → chunk-DD7COXWR.mjs} +69 -5
  13. package/dist/{chunk-NHV47JOE.mjs → chunk-HTELXT2N.mjs} +36 -5
  14. package/dist/{chunk-OGD5OQK2.mjs → chunk-JXR6YWBW.mjs} +6689 -4805
  15. package/dist/{chunk-3E4GSBC7.mjs → chunk-KKVD3R6O.mjs} +4 -4
  16. package/dist/{chunk-EXSPNK6W.cjs → chunk-LRBWCRQ3.cjs} +3 -3
  17. package/dist/{chunk-6XAAJTA3.mjs → chunk-P3WAKBVS.mjs} +4932 -3048
  18. package/dist/{chunk-5BVSDSJZ.mjs → chunk-UE23HF2N.mjs} +1 -1
  19. package/dist/{chunk-725QJW4K.mjs → chunk-ZYCBJKAE.mjs} +1 -1
  20. package/dist/color/index.cjs +36 -0
  21. package/dist/color/index.d.ts +1 -0
  22. package/dist/color/index.d.ts.map +1 -1
  23. package/dist/color/index.mjs +35 -1
  24. package/dist/color/office-gradient-stops.d.ts +27 -0
  25. package/dist/color/office-gradient-stops.d.ts.map +1 -0
  26. package/dist/diagram/index.cjs +4858 -2934
  27. package/dist/diagram/index.mjs +4858 -2935
  28. package/dist/docx/embedded.cjs +4884 -3000
  29. package/dist/docx/embedded.mjs +4884 -3000
  30. package/dist/docx/index.cjs +4942 -3056
  31. package/dist/docx/index.mjs +4942 -3056
  32. package/dist/docx/layout/index.cjs +4924 -3038
  33. package/dist/docx/layout/index.mjs +4924 -3038
  34. package/dist/docx/load/index.cjs +5021 -3137
  35. package/dist/docx/load/index.mjs +5021 -3137
  36. package/dist/docx/ui/index.cjs +4925 -3041
  37. package/dist/docx/ui/index.mjs +4925 -3041
  38. package/dist/drawingml/index.cjs +76 -16
  39. package/dist/drawingml/index.mjs +76 -17
  40. package/dist/drawingml/path-data.d.ts.map +1 -1
  41. package/dist/drawingml/rect-path-gradient.d.ts +12 -0
  42. package/dist/drawingml/rect-path-gradient.d.ts.map +1 -1
  43. package/dist/geometry/index.cjs +4138 -2253
  44. package/dist/geometry/index.mjs +4138 -2254
  45. package/dist/geometry/ooxml-arc.d.ts +10 -1
  46. package/dist/geometry/ooxml-arc.d.ts.map +1 -1
  47. package/dist/geometry/preset-shape-definitions-action-buttons.d.ts +7 -36
  48. package/dist/geometry/preset-shape-definitions-action-buttons.d.ts.map +1 -1
  49. package/dist/geometry/preset-shape-definitions-connectors-brackets.d.ts.map +1 -1
  50. package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts +19 -0
  51. package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts.map +1 -0
  52. package/dist/geometry/preset-shape-definitions-exact-arcs.d.ts +14 -0
  53. package/dist/geometry/preset-shape-definitions-exact-arcs.d.ts.map +1 -0
  54. package/dist/geometry/preset-shape-definitions-exact-arrows.d.ts +11 -0
  55. package/dist/geometry/preset-shape-definitions-exact-arrows.d.ts.map +1 -0
  56. package/dist/geometry/preset-shape-definitions-exact-basic.d.ts +12 -0
  57. package/dist/geometry/preset-shape-definitions-exact-basic.d.ts.map +1 -0
  58. package/dist/geometry/preset-shape-definitions-exact-circular.d.ts +18 -0
  59. package/dist/geometry/preset-shape-definitions-exact-circular.d.ts.map +1 -0
  60. package/dist/geometry/preset-shape-definitions-exact-ellipse-ribbons.d.ts +16 -0
  61. package/dist/geometry/preset-shape-definitions-exact-ellipse-ribbons.d.ts.map +1 -0
  62. package/dist/geometry/preset-shape-definitions-exact-funnel.d.ts +13 -0
  63. package/dist/geometry/preset-shape-definitions-exact-funnel.d.ts.map +1 -0
  64. package/dist/geometry/preset-shape-definitions-exact-left-right-ribbon.d.ts +13 -0
  65. package/dist/geometry/preset-shape-definitions-exact-left-right-ribbon.d.ts.map +1 -0
  66. package/dist/geometry/preset-shape-definitions-exact-math.d.ts +14 -0
  67. package/dist/geometry/preset-shape-definitions-exact-math.d.ts.map +1 -0
  68. package/dist/geometry/preset-shape-definitions-exact-misc.d.ts +11 -0
  69. package/dist/geometry/preset-shape-definitions-exact-misc.d.ts.map +1 -0
  70. package/dist/geometry/preset-shape-definitions-exact-ribbons.d.ts +12 -0
  71. package/dist/geometry/preset-shape-definitions-exact-ribbons.d.ts.map +1 -0
  72. package/dist/geometry/preset-shape-definitions-exact-scrolls.d.ts +13 -0
  73. package/dist/geometry/preset-shape-definitions-exact-scrolls.d.ts.map +1 -0
  74. package/dist/geometry/preset-shape-definitions-flowchart.d.ts.map +1 -1
  75. package/dist/geometry/preset-shape-definitions-misc.d.ts.map +1 -1
  76. package/dist/geometry/preset-shape-definitions-table.d.ts.map +1 -1
  77. package/dist/geometry/preset-shape-exact-dsl.d.ts +30 -0
  78. package/dist/geometry/preset-shape-exact-dsl.d.ts.map +1 -0
  79. package/dist/index.cjs +7091 -4867
  80. package/dist/index.mjs +7091 -4867
  81. package/dist/pptx/automation/index.cjs +5419 -3408
  82. package/dist/pptx/automation/index.d.ts +5 -5
  83. package/dist/pptx/automation/index.mjs +5 -5
  84. package/dist/pptx/chunks/{elements-DheCTwi0.d.ts → elements-6BMEOo7i.d.ts} +27 -2
  85. package/dist/pptx/chunks/{elements-DheCTwi0.d.ts.map → elements-6BMEOo7i.d.ts.map} +1 -1
  86. package/dist/pptx/chunks/{index-Jcce8TlI.d.ts → index-BbXLv6As.d.ts} +4 -4
  87. package/dist/pptx/chunks/{index-Jcce8TlI.d.ts.map → index-BbXLv6As.d.ts.map} +1 -1
  88. package/dist/pptx/chunks/{index-B4ofjG6_.d.ts → index-Dija_Wth.d.ts} +3 -3
  89. package/dist/pptx/chunks/{index-B4ofjG6_.d.ts.map → index-Dija_Wth.d.ts.map} +1 -1
  90. package/dist/pptx/chunks/{index-CYukxWbl.d.ts → index-DvN0TkJJ.d.ts} +23 -8
  91. package/dist/pptx/chunks/index-DvN0TkJJ.d.ts.map +1 -0
  92. package/dist/pptx/chunks/{text-operations-CdgEnFuK.d.ts → text-operations-DorONr3h.d.ts} +2 -2
  93. package/dist/pptx/chunks/{text-operations-CdgEnFuK.d.ts.map → text-operations-DorONr3h.d.ts.map} +1 -1
  94. package/dist/pptx/cli/index.cjs +5341 -3330
  95. package/dist/pptx/cli/index.d.ts +1 -1
  96. package/dist/pptx/cli/index.mjs +4 -4
  97. package/dist/pptx/converter/index.cjs +4958 -2978
  98. package/dist/pptx/converter/index.d.ts +1 -1
  99. package/dist/pptx/converter/index.mjs +2 -2
  100. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  101. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  102. package/dist/pptx/editor/render/find-replace.cjs +15 -15
  103. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  104. package/dist/pptx/editor/render/find-replace.mjs +2 -2
  105. package/dist/pptx/editor/render/slide-operations.cjs +9 -9
  106. package/dist/pptx/editor/render/slide-operations.mjs +3 -3
  107. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  108. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  109. package/dist/pptx/index.cjs +7176 -5125
  110. package/dist/pptx/index.d.ts +6 -6
  111. package/dist/pptx/index.mjs +5 -5
  112. package/dist/pptx/node/index.d.ts +1 -1
  113. package/dist/teams/index.cjs +5287 -3307
  114. package/dist/teams/index.mjs +5287 -3307
  115. package/dist/text/font-metrics/office-font-metrics.generated.d.ts +23 -0
  116. package/dist/text/font-metrics/office-font-metrics.generated.d.ts.map +1 -0
  117. package/dist/text/font-metrics/vertical-metrics.d.ts +35 -0
  118. package/dist/text/font-metrics/vertical-metrics.d.ts.map +1 -0
  119. package/dist/text/index.cjs +260 -0
  120. package/dist/text/index.d.ts +1 -0
  121. package/dist/text/index.d.ts.map +1 -1
  122. package/dist/text/index.mjs +259 -1
  123. package/dist/xlsx/collab/index.cjs +5106 -3222
  124. package/dist/xlsx/collab/index.mjs +5106 -3222
  125. package/dist/xlsx/index.cjs +5272 -3386
  126. package/dist/xlsx/index.mjs +5272 -3386
  127. package/dist/xlsx/load/index.cjs +5125 -3241
  128. package/dist/xlsx/load/index.mjs +5125 -3241
  129. package/dist/xlsx/ui/index.cjs +5279 -3395
  130. package/dist/xlsx/ui/index.mjs +5279 -3395
  131. package/package.json +1 -1
  132. package/dist/PptxHandler-SD6VWF3I.mjs +0 -5
  133. package/dist/PptxHandler-ZHWWOO2X.cjs +0 -14
  134. package/dist/pptx/chunks/index-CYukxWbl.d.ts.map +0 -1
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Vertical metrics (em) of the fonts that ship with Windows and Office, in the
3
+ * form PowerPoint lays a single line out on: `[ascent, descent, lineGap]`.
4
+ *
5
+ * Measured on PowerPoint 16 exports of an `H` at 72pt in every font of the
6
+ * Windows font folder (235 families): a font without the `USE_TYPO_METRICS`
7
+ * bit (`OS/2.fsSelection` bit 7) is laid out on its Windows ascent and
8
+ * descent (`winAscent`, `winDescent`; no line gap), one with the bit on its
9
+ * typographic ones (`sTypoAscender`, `sTypoDescender`) with `sTypoLineGap`
10
+ * added above the ascent; either way the box is scaled to a 1.2 em pitch.
11
+ * The values were read from the font files with fontTools. A renderer needs
12
+ * them for a font the browser does not have (Office cloud fonts such as
13
+ * OCR A Extended or Eras ITC, a styled face name such as Nirmala Text
14
+ * Semilight), where the browser would measure a stand-in.
15
+ *
16
+ * Generated; keys are lower-case font names.
17
+ *
18
+ * @module text/font-metrics/office-font-metrics.generated
19
+ */
20
+ /** `[ascent, descent, lineGap]` in em. */
21
+ export type OfficeFontMetrics = readonly [number, number, number];
22
+ export declare const OFFICE_FONT_METRICS: ReadonlyMap<string, OfficeFontMetrics>;
23
+ //# sourceMappingURL=office-font-metrics.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"office-font-metrics.generated.d.ts","sourceRoot":"","sources":["../../../text/font-metrics/office-font-metrics.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAElE,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CA+OrE,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Vertical metrics (em) of legacy East Asian Office fonts, which PowerPoint
3
+ * lays a line out on even when the font is missing from the machine.
4
+ *
5
+ * Measured on PowerPoint 16: MS PMincho (not installed), MS PGothic and
6
+ * SimSun all put the baseline at the same place, which is the one their own
7
+ * Windows metrics give (`winAscent` 220 and `winDescent` 36 of 256 units, read
8
+ * with fontTools for MS Gothic, MS PGothic, MS UI Gothic, SimSun and NSimSun;
9
+ * the Mincho faces share the grid). A browser without the font measures its
10
+ * stand-in instead, so a renderer needs these to place the line.
11
+ *
12
+ * @module text/font-metrics/vertical-metrics
13
+ */
14
+ /** A font's ascent and descent as fractions of the em. */
15
+ export interface VerticalMetrics {
16
+ ascent: number;
17
+ descent: number;
18
+ /** The line gap PowerPoint adds above the ascent (em), when the font has one. */
19
+ lineGap?: number;
20
+ }
21
+ /**
22
+ * The vertical metrics of `family` when it is a legacy East Asian Office font
23
+ * PowerPoint knows by name, else `undefined`. Matching ignores case.
24
+ */
25
+ export declare function namedFontVerticalMetrics(family: string | undefined): VerticalMetrics | undefined;
26
+ /**
27
+ * The vertical metrics PowerPoint lays `family` out on, when it is one of the
28
+ * fonts that ship with Windows and Office (see `office-font-metrics.generated`),
29
+ * else `undefined`. Matching ignores case. Unlike {@link namedFontVerticalMetrics}
30
+ * this is the table for every such font, installed or not: a renderer uses it
31
+ * for the line gap of the ones whose browser box leaves it out, and for the
32
+ * ascent and descent of the ones the browser does not have.
33
+ */
34
+ export declare function officeFontVerticalMetrics(family: string | undefined): VerticalMetrics | undefined;
35
+ //# sourceMappingURL=vertical-metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-metrics.d.ts","sourceRoot":"","sources":["../../../text/font-metrics/vertical-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAUD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAEhG;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,GAAG,SAAS,CAOjG"}
@@ -665,6 +665,264 @@ function designTextWidthEm(text, family, bold = false) {
665
665
  return units / 1e3;
666
666
  }
667
667
 
668
+ // text/font-metrics/office-font-metrics.generated.ts
669
+ var OFFICE_FONT_METRICS = /* @__PURE__ */ new Map([
670
+ ["agency fb", [0.9224, 0.2002, 0]],
671
+ ["alef", [1.0093, 0.3525, 0]],
672
+ ["algerian", [0.8882, 0.2236, 0]],
673
+ ["amiri", [1.124, 0.634, 0]],
674
+ ["amiri quran", [1.815, 0.634, 0]],
675
+ ["arial", [0.9053, 0.2119, 0]],
676
+ ["arial black", [1.1006, 0.3096, 0]],
677
+ ["arial narrow", [0.9219, 0.2104, 0]],
678
+ ["arial rounded mt bold", [0.9463, 0.2109, 0]],
679
+ ["bahnschrift", [0.7939, 0.2061, 0.2002]],
680
+ ["baskerville old face", [0.8813, 0.2593, 0]],
681
+ ["bauhaus 93", [0.8989, 0.2329, 0]],
682
+ ["bell mt", [0.8379, 0.2666, 0]],
683
+ ["berlin sans fb", [0.8921, 0.2031, 0]],
684
+ ["bernard mt condensed", [0.9697, 0.2178, 0]],
685
+ ["blackadder itc", [0.8965, 0.3862, 0]],
686
+ ["bodoni mt", [0.917, 0.2822, 0]],
687
+ ["bodoni mt black", [0.917, 0.251, 0]],
688
+ ["bodoni mt condensed", [0.917, 0.2598, 0]],
689
+ ["bodoni mt poster compressed", [0.9316, 0.2158, 0]],
690
+ ["book antiqua", [0.9604, 0.2822, 0]],
691
+ ["bookman old style", [0.894, 0.231, 0]],
692
+ ["bradley hand itc", [0.8491, 0.3979, 0]],
693
+ ["britannic bold", [0.896, 0.2119, 0]],
694
+ ["broadway", [0.9126, 0.2197, 0]],
695
+ ["caladea", [0.95, 0.222, 0]],
696
+ ["calibri", [0.9521, 0.2686, 0]],
697
+ ["calibri light", [0.9521, 0.2686, 0]],
698
+ ["californian fb", [0.8804, 0.2554, 0]],
699
+ ["calisto mt", [0.9248, 0.2295, 0]],
700
+ ["cambria", [0.9502, 0.2222, 0]],
701
+ ["cambria math", [0.7778, 0.2222, 0.1724]],
702
+ ["candara", [0.9521, 0.2686, 0]],
703
+ ["carlito", [0.9521, 0.2686, 0]],
704
+ ["cascadia code", [0.9277, 0.2344, 0]],
705
+ ["cascadia mono", [0.9277, 0.2344, 0]],
706
+ ["castellar", [0.9272, 0.2788, 0]],
707
+ ["centaur", [0.8491, 0.2808, 0]],
708
+ ["century", [0.9858, 0.2158, 0]],
709
+ ["century gothic", [0.9712, 0.2202, 0]],
710
+ ["century schoolbook", [0.9858, 0.2158, 0]],
711
+ ["chiller", [0.8486, 0.3052, 0]],
712
+ ["colonna mt", [0.7129, 0.3442, 0]],
713
+ ["comic sans ms", [1.1021, 0.2915, 0]],
714
+ ["consolas", [0.9199, 0.251, 0]],
715
+ ["constantia", [0.9521, 0.2686, 0]],
716
+ ["cooper black", [0.918, 0.229, 0]],
717
+ ["copperplate gothic bold", [0.8853, 0.2275, 0]],
718
+ ["copperplate gothic light", [0.8721, 0.2065, 0]],
719
+ ["corbel", [0.9521, 0.2686, 0]],
720
+ ["corbel light", [0.9521, 0.2686, 0]],
721
+ ["courier new", [0.8325, 0.3003, 0]],
722
+ ["curlz mt", [1.0269, 0.2998, 0]],
723
+ ["david libre", [0.7808, 0.2192, 0]],
724
+ ["dejavu math tex gyre", [0.792, 0.208, 0.2]],
725
+ ["dubai", [1.129, 0.559, 0]],
726
+ ["dubai light", [1.129, 0.559, 0]],
727
+ ["dubai medium", [1.129, 0.559, 0]],
728
+ ["ebrima", [1.0791, 0.251, 0]],
729
+ ["edwardian script itc", [0.8506, 0.3281, 0]],
730
+ ["elephant", [0.983, 0.306, 0]],
731
+ ["engravers mt", [0.9375, 0.2271, 0]],
732
+ ["eras bold itc", [0.9077, 0.2378, 0]],
733
+ ["eras demi itc", [0.8989, 0.2383, 0]],
734
+ ["eras light itc", [0.8838, 0.2422, 0]],
735
+ ["eras medium itc", [0.8911, 0.2402, 0]],
736
+ ["felix titling", [0.9282, 0.2412, 0]],
737
+ ["footlight mt light", [0.8311, 0.2246, 0]],
738
+ ["forte", [0.8799, 0.2139, 0]],
739
+ ["frank ruhl hofshi", [0.957, 0.334, 0]],
740
+ ["franklin gothic book", [0.9165, 0.2173, 0]],
741
+ ["franklin gothic demi", [0.9165, 0.2173, 0]],
742
+ ["franklin gothic demi cond", [0.9165, 0.2173, 0]],
743
+ ["franklin gothic heavy", [0.9165, 0.2173, 0]],
744
+ ["franklin gothic medium", [0.9165, 0.2173, 0]],
745
+ ["franklin gothic medium cond", [0.9165, 0.2173, 0]],
746
+ ["freestyle script", [0.8506, 0.3271, 0]],
747
+ ["french script mt", [0.8345, 0.3052, 0]],
748
+ ["gabriola", [0.6836, 0.3164, 0.7]],
749
+ ["gadugi", [1.0791, 0.251, 0]],
750
+ ["garamond", [0.8618, 0.2632, 0]],
751
+ ["gentium basic", [0.874, 0.2832, 0]],
752
+ ["gentium book basic", [0.874, 0.2832, 0]],
753
+ ["georgia", [0.917, 0.2192, 0]],
754
+ ["gigi", [0.9707, 0.4111, 0]],
755
+ ["gill sans mt", [0.9292, 0.2305, 0]],
756
+ ["gill sans mt condensed", [0.9341, 0.27, 0]],
757
+ ["gill sans mt ext condensed bold", [0.9985, 0.1987, 0]],
758
+ ["gill sans ultra bold", [0.9941, 0.252, 0]],
759
+ ["gill sans ultra bold condensed", [0.9941, 0.251, 0]],
760
+ ["gloucester mt extra condensed", [0.9453, 0.2178, 0]],
761
+ ["goudy old style", [0.875, 0.2373, 0]],
762
+ ["goudy stout", [1.019, 0.3491, 0]],
763
+ ["haettenschweiler", [0.9199, 0.1201, 0]],
764
+ ["harrington", [0.9453, 0.2305, 0]],
765
+ ["high tower text", [0.8984, 0.2651, 0]],
766
+ ["impact", [1.0088, 0.2109, 0]],
767
+ ["imprint mt shadow", [0.9292, 0.249, 0]],
768
+ ["informal roman", [0.7964, 0.2188, 0]],
769
+ ["ink free", [0.91, 0.328, 0]],
770
+ ["javanese text", [1.25, 1.0205, 0]],
771
+ ["jokerman", [1.1562, 0.356, 0]],
772
+ ["juice itc", [0.9111, 0.2231, 0]],
773
+ ["kristen itc", [1.0278, 0.332, 0]],
774
+ ["kunstler script", [0.8125, 0.2671, 0]],
775
+ ["leelawadee", [0.957, 0.2388, 0]],
776
+ ["leelawadee ui", [1.0791, 0.251, 0]],
777
+ ["leelawadee ui semilight", [1.0791, 0.251, 0]],
778
+ ["liberation mono", [0.8325, 0.3003, 0]],
779
+ ["liberation sans", [0.9053, 0.2119, 0]],
780
+ ["liberation sans narrow", [0.728, 0.2104, 0.1313]],
781
+ ["liberation serif", [0.8911, 0.2163, 0]],
782
+ ["linux biolinum g", [0.894, 0.2461, 0]],
783
+ ["linux libertine display g", [0.894, 0.2461, 0]],
784
+ ["linux libertine g", [0.894, 0.2461, 0]],
785
+ ["lucida bright", [0.9277, 0.2109, 0]],
786
+ ["lucida console", [0.7891, 0.2109, 0]],
787
+ ["lucida fax", [0.9399, 0.2051, 0]],
788
+ ["lucida sans", [0.9277, 0.2109, 0]],
789
+ ["lucida sans typewriter", [0.9277, 0.2051, 0]],
790
+ ["lucida sans unicode", [1.0967, 0.4399, 0]],
791
+ ["maiandra gd", [0.9629, 0.2358, 0]],
792
+ ["malgun gothic", [1.0884, 0.2417, 0]],
793
+ ["malgun gothic semilight", [1.0884, 0.2417, 0]],
794
+ ["matura mt script capitals", [0.8569, 0.4736, 0]],
795
+ ["microsoft himalaya", [0.5918, 0.4082, 0]],
796
+ ["microsoft jhenghei", [1.0757, 0.2544, 0]],
797
+ ["microsoft jhenghei light", [1.0757, 0.2544, 0]],
798
+ ["microsoft jhenghei ui", [1.0156, 0.2544, 0]],
799
+ ["microsoft jhenghei ui light", [1.0156, 0.2544, 0]],
800
+ ["microsoft new tai lue", [0.9272, 0.3809, 0]],
801
+ ["microsoft phagspa", [1.0439, 0.2354, 0]],
802
+ ["microsoft sans serif", [0.9219, 0.21, 0]],
803
+ ["microsoft tai le", [0.9272, 0.3442, 0]],
804
+ ["microsoft uighur", [0.6836, 0.3164, 0]],
805
+ ["microsoft yahei", [1.0581, 0.2617, 0]],
806
+ ["microsoft yahei light", [1.0156, 0.2617, 0]],
807
+ ["microsoft yahei ui", [1.0156, 0.2544, 0]],
808
+ ["microsoft yahei ui light", [1.0581, 0.2544, 0]],
809
+ ["microsoft yi baiti", [0.8594, 0.1416, 0]],
810
+ ["mingliu-extb", [0.8008, 0.1992, 0]],
811
+ ["mingliu_hkscs-extb", [0.8008, 0.1992, 0]],
812
+ ["mingliu_mscs-extb", [0.8008, 0.1992, 0]],
813
+ ["miriam libre", [0.969, 0.344, 0]],
814
+ ["mistral", [0.9023, 0.3159, 0]],
815
+ ["modern no. 20", [0.815, 0.209, 0]],
816
+ ["mongolian baiti", [0.8442, 0.2192, 0]],
817
+ ["monotype corsiva", [0.79, 0.3027, 0]],
818
+ ["ms gothic", [0.8594, 0.1406, 0]],
819
+ ["ms pgothic", [0.8594, 0.1406, 0]],
820
+ ["ms reference sans serif", [1.0054, 0.21, 0]],
821
+ ["ms ui gothic", [0.8594, 0.1406, 0]],
822
+ ["mv boli", [1.1392, 0.4722, 0]],
823
+ ["myanmar text", [1.0361, 0.8247, 0]],
824
+ ["niagara engraved", [0.875, 0.1802, 0]],
825
+ ["niagara solid", [0.875, 0.1802, 0]],
826
+ ["nirmala text", [0.7759, 0.2241, 0.8623]],
827
+ ["nirmala text semilight", [0.7759, 0.2241, 0.8623]],
828
+ ["nirmala ui", [1.0791, 0.251, 0]],
829
+ ["nirmala ui semilight", [1.0791, 0.251, 0]],
830
+ ["noto kufi arabic", [1.282, 0.615, 0]],
831
+ ["noto naskh arabic", [1.069, 0.634, 0]],
832
+ ["noto sans", [1.069, 0.293, 0]],
833
+ ["noto sans armenian", [1.068, 0.292, 0]],
834
+ ["noto sans georgian", [1.068, 0.292, 0]],
835
+ ["noto sans georgian bold", [1.068, 0.292, 0]],
836
+ ["noto sans hebrew", [1.068, 0.292, 0]],
837
+ ["noto sans lao", [1.183, 0.462, 0]],
838
+ ["noto sans lisu", [1.069, 0.293, 0]],
839
+ ["noto serif", [1.069, 0.293, 0]],
840
+ ["noto serif armenian", [1.068, 0.292, 0]],
841
+ ["noto serif georgian", [1.068, 0.292, 0]],
842
+ ["noto serif hebrew", [0.896, 0.29, 0]],
843
+ ["noto serif lao", [1.174, 0.482, 0]],
844
+ ["nsimsun", [0.8594, 0.1406, 0]],
845
+ ["ocr a extended", [0.8579, 0.1768, 0]],
846
+ ["old english text mt", [1.0029, 0.2158, 0]],
847
+ ["onyx", [0.9316, 0.2158, 0]],
848
+ ["palace script mt", [0.6841, 0.2422, 0]],
849
+ ["palatino linotype", [1.0498, 0.2993, 0]],
850
+ ["papyrus", [1.0522, 0.5215, 0]],
851
+ ["parchment", [0.749, 0.3179, 0]],
852
+ ["perpetua", [0.8198, 0.3262, 0]],
853
+ ["playbill", [0.8281, 0.1836, 0]],
854
+ ["pmingliu-extb", [0.8008, 0.1992, 0]],
855
+ ["poor richard", [0.9087, 0.2158, 0]],
856
+ ["pristina", [0.8643, 0.4468, 0]],
857
+ ["rage italic", [0.8467, 0.4102, 0]],
858
+ ["ravie", [1.0503, 0.2817, 0]],
859
+ ["reem kufi", [1.1, 0.4, 0]],
860
+ ["rockwell", [0.9458, 0.2285, 0]],
861
+ ["rockwell condensed", [0.9409, 0.2349, 0]],
862
+ ["rockwell extra bold", [0.9458, 0.2285, 0]],
863
+ ["rubik", [0.935, 0.25, 0]],
864
+ ["sans serif collection", [1.621, 1.03, 0]],
865
+ ["scheherazade", [1.0112, 0.6768, 0]],
866
+ ["script mt bold", [0.9521, 0.252, 0]],
867
+ ["segoe print", [1.2476, 0.4951, 0]],
868
+ ["segoe script", [1.0889, 0.4951, 0]],
869
+ ["segoe ui", [1.0791, 0.251, 0]],
870
+ ["segoe ui black", [1.0791, 0.251, 0]],
871
+ ["segoe ui emoji", [1.0791, 0.251, 0]],
872
+ ["segoe ui historic", [1.0791, 0.251, 0]],
873
+ ["segoe ui light", [1.0791, 0.251, 0]],
874
+ ["segoe ui semibold", [1.0791, 0.251, 0]],
875
+ ["segoe ui semilight", [1.0791, 0.251, 0]],
876
+ ["segoe ui symbol", [1.0791, 0.251, 0]],
877
+ ["segoe ui variable", [1.0791, 0.251, 0]],
878
+ ["showcard gothic", [1.0347, 0.2031, 0]],
879
+ ["simsun", [0.8594, 0.1406, 0]],
880
+ ["simsun-extb", [0.8594, 0.1406, 0]],
881
+ ["simsun-extg", [0.8594, 0.1406, 0]],
882
+ ["sitka text", [0.7569, 0.2431, 0.2502]],
883
+ ["snap itc", [1.0132, 0.272, 0]],
884
+ ["stencil", [0.9082, 0.2769, 0]],
885
+ ["sylfaen", [1.0068, 0.3101, 0]],
886
+ ["tahoma", [1.0005, 0.2065, 0]],
887
+ ["tempus sans itc", [0.9639, 0.3408, 0]],
888
+ ["times new roman", [0.8911, 0.2163, 0]],
889
+ ["trebuchet ms", [0.939, 0.2222, 0]],
890
+ ["tw cen mt", [0.856, 0.2329, 0]],
891
+ ["tw cen mt condensed", [0.8271, 0.2412, 0]],
892
+ ["tw cen mt condensed extra bold", [0.873, 0.21, 0]],
893
+ ["verdana", [1.0054, 0.21, 0]],
894
+ ["viner hand itc", [0.999, 0.6152, 0]],
895
+ ["vladimir script", [0.8999, 0.312, 0]],
896
+ ["wide latin", [0.9644, 0.2666, 0]],
897
+ ["yu gothic", [0.9849, 0.3022, 0]],
898
+ ["yu gothic light", [0.9893, 0.2979, 0]],
899
+ ["yu gothic medium", [0.9902, 0.2969, 0]],
900
+ ["yu gothic ui", [1.0791, 0.251, 0]],
901
+ ["yu gothic ui light", [1.0791, 0.251, 0]],
902
+ ["yu gothic ui semibold", [1.0791, 0.251, 0]],
903
+ ["yu gothic ui semilight", [1.0791, 0.251, 0]],
904
+ ["zwadobef", [0.652, 0, 0]]
905
+ ]);
906
+
907
+ // text/font-metrics/vertical-metrics.ts
908
+ var EAST_ASIAN_OFFICE_METRICS = { ascent: 220 / 256, descent: 36 / 256 };
909
+ var NAMED_METRICS = new Map(
910
+ ["ms mincho", "ms pmincho", "ms gothic", "ms pgothic", "ms ui gothic", "simsun", "nsimsun"].map(
911
+ (name2) => [name2, EAST_ASIAN_OFFICE_METRICS]
912
+ )
913
+ );
914
+ function namedFontVerticalMetrics(family) {
915
+ return family ? NAMED_METRICS.get(family.trim().toLowerCase()) : void 0;
916
+ }
917
+ function officeFontVerticalMetrics(family) {
918
+ const known = family ? OFFICE_FONT_METRICS.get(family.trim().toLowerCase()) : void 0;
919
+ if (!known) {
920
+ return void 0;
921
+ }
922
+ const [ascent, descent, lineGap] = known;
923
+ return lineGap > 0 ? { ascent, descent, lineGap } : { ascent, descent };
924
+ }
925
+
668
926
  // text/tsv.ts
669
927
  function quoteField(text) {
670
928
  return /[\t\r\n"]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text;
@@ -1522,6 +1780,8 @@ exports.hasDirectSubstitution = hasDirectSubstitution;
1522
1780
  exports.hasDistinctScriptFonts = hasDistinctScriptFonts;
1523
1781
  exports.mergeTextThreeWay = mergeTextThreeWay;
1524
1782
  exports.metricFontFamily = metricFontFamily;
1783
+ exports.namedFontVerticalMetrics = namedFontVerticalMetrics;
1784
+ exports.officeFontVerticalMetrics = officeFontVerticalMetrics;
1525
1785
  exports.ooxmlDateTimeFieldPicture = ooxmlDateTimeFieldPicture;
1526
1786
  exports.parseLocaleNumber = parseLocaleNumber;
1527
1787
  exports.parsePanoseBytes = parsePanoseBytes;
@@ -7,6 +7,7 @@ export * from './wrap-styled-runs.js';
7
7
  export * from './change-case.js';
8
8
  export * from './merge-three-way.js';
9
9
  export * from './font-metrics/advance-width.js';
10
+ export * from './font-metrics/vertical-metrics.js';
10
11
  export { parseTsv, toTsv } from './tsv.js';
11
12
  export * from './locale-number.js';
12
13
  export * from './realign-runs.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../text/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,KAAK,SAAS,GACd,MAAM,4BAA4B,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../text/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,KAAK,SAAS,GACd,MAAM,4BAA4B,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -663,6 +663,264 @@ function designTextWidthEm(text, family, bold = false) {
663
663
  return units / 1e3;
664
664
  }
665
665
 
666
+ // text/font-metrics/office-font-metrics.generated.ts
667
+ var OFFICE_FONT_METRICS = /* @__PURE__ */ new Map([
668
+ ["agency fb", [0.9224, 0.2002, 0]],
669
+ ["alef", [1.0093, 0.3525, 0]],
670
+ ["algerian", [0.8882, 0.2236, 0]],
671
+ ["amiri", [1.124, 0.634, 0]],
672
+ ["amiri quran", [1.815, 0.634, 0]],
673
+ ["arial", [0.9053, 0.2119, 0]],
674
+ ["arial black", [1.1006, 0.3096, 0]],
675
+ ["arial narrow", [0.9219, 0.2104, 0]],
676
+ ["arial rounded mt bold", [0.9463, 0.2109, 0]],
677
+ ["bahnschrift", [0.7939, 0.2061, 0.2002]],
678
+ ["baskerville old face", [0.8813, 0.2593, 0]],
679
+ ["bauhaus 93", [0.8989, 0.2329, 0]],
680
+ ["bell mt", [0.8379, 0.2666, 0]],
681
+ ["berlin sans fb", [0.8921, 0.2031, 0]],
682
+ ["bernard mt condensed", [0.9697, 0.2178, 0]],
683
+ ["blackadder itc", [0.8965, 0.3862, 0]],
684
+ ["bodoni mt", [0.917, 0.2822, 0]],
685
+ ["bodoni mt black", [0.917, 0.251, 0]],
686
+ ["bodoni mt condensed", [0.917, 0.2598, 0]],
687
+ ["bodoni mt poster compressed", [0.9316, 0.2158, 0]],
688
+ ["book antiqua", [0.9604, 0.2822, 0]],
689
+ ["bookman old style", [0.894, 0.231, 0]],
690
+ ["bradley hand itc", [0.8491, 0.3979, 0]],
691
+ ["britannic bold", [0.896, 0.2119, 0]],
692
+ ["broadway", [0.9126, 0.2197, 0]],
693
+ ["caladea", [0.95, 0.222, 0]],
694
+ ["calibri", [0.9521, 0.2686, 0]],
695
+ ["calibri light", [0.9521, 0.2686, 0]],
696
+ ["californian fb", [0.8804, 0.2554, 0]],
697
+ ["calisto mt", [0.9248, 0.2295, 0]],
698
+ ["cambria", [0.9502, 0.2222, 0]],
699
+ ["cambria math", [0.7778, 0.2222, 0.1724]],
700
+ ["candara", [0.9521, 0.2686, 0]],
701
+ ["carlito", [0.9521, 0.2686, 0]],
702
+ ["cascadia code", [0.9277, 0.2344, 0]],
703
+ ["cascadia mono", [0.9277, 0.2344, 0]],
704
+ ["castellar", [0.9272, 0.2788, 0]],
705
+ ["centaur", [0.8491, 0.2808, 0]],
706
+ ["century", [0.9858, 0.2158, 0]],
707
+ ["century gothic", [0.9712, 0.2202, 0]],
708
+ ["century schoolbook", [0.9858, 0.2158, 0]],
709
+ ["chiller", [0.8486, 0.3052, 0]],
710
+ ["colonna mt", [0.7129, 0.3442, 0]],
711
+ ["comic sans ms", [1.1021, 0.2915, 0]],
712
+ ["consolas", [0.9199, 0.251, 0]],
713
+ ["constantia", [0.9521, 0.2686, 0]],
714
+ ["cooper black", [0.918, 0.229, 0]],
715
+ ["copperplate gothic bold", [0.8853, 0.2275, 0]],
716
+ ["copperplate gothic light", [0.8721, 0.2065, 0]],
717
+ ["corbel", [0.9521, 0.2686, 0]],
718
+ ["corbel light", [0.9521, 0.2686, 0]],
719
+ ["courier new", [0.8325, 0.3003, 0]],
720
+ ["curlz mt", [1.0269, 0.2998, 0]],
721
+ ["david libre", [0.7808, 0.2192, 0]],
722
+ ["dejavu math tex gyre", [0.792, 0.208, 0.2]],
723
+ ["dubai", [1.129, 0.559, 0]],
724
+ ["dubai light", [1.129, 0.559, 0]],
725
+ ["dubai medium", [1.129, 0.559, 0]],
726
+ ["ebrima", [1.0791, 0.251, 0]],
727
+ ["edwardian script itc", [0.8506, 0.3281, 0]],
728
+ ["elephant", [0.983, 0.306, 0]],
729
+ ["engravers mt", [0.9375, 0.2271, 0]],
730
+ ["eras bold itc", [0.9077, 0.2378, 0]],
731
+ ["eras demi itc", [0.8989, 0.2383, 0]],
732
+ ["eras light itc", [0.8838, 0.2422, 0]],
733
+ ["eras medium itc", [0.8911, 0.2402, 0]],
734
+ ["felix titling", [0.9282, 0.2412, 0]],
735
+ ["footlight mt light", [0.8311, 0.2246, 0]],
736
+ ["forte", [0.8799, 0.2139, 0]],
737
+ ["frank ruhl hofshi", [0.957, 0.334, 0]],
738
+ ["franklin gothic book", [0.9165, 0.2173, 0]],
739
+ ["franklin gothic demi", [0.9165, 0.2173, 0]],
740
+ ["franklin gothic demi cond", [0.9165, 0.2173, 0]],
741
+ ["franklin gothic heavy", [0.9165, 0.2173, 0]],
742
+ ["franklin gothic medium", [0.9165, 0.2173, 0]],
743
+ ["franklin gothic medium cond", [0.9165, 0.2173, 0]],
744
+ ["freestyle script", [0.8506, 0.3271, 0]],
745
+ ["french script mt", [0.8345, 0.3052, 0]],
746
+ ["gabriola", [0.6836, 0.3164, 0.7]],
747
+ ["gadugi", [1.0791, 0.251, 0]],
748
+ ["garamond", [0.8618, 0.2632, 0]],
749
+ ["gentium basic", [0.874, 0.2832, 0]],
750
+ ["gentium book basic", [0.874, 0.2832, 0]],
751
+ ["georgia", [0.917, 0.2192, 0]],
752
+ ["gigi", [0.9707, 0.4111, 0]],
753
+ ["gill sans mt", [0.9292, 0.2305, 0]],
754
+ ["gill sans mt condensed", [0.9341, 0.27, 0]],
755
+ ["gill sans mt ext condensed bold", [0.9985, 0.1987, 0]],
756
+ ["gill sans ultra bold", [0.9941, 0.252, 0]],
757
+ ["gill sans ultra bold condensed", [0.9941, 0.251, 0]],
758
+ ["gloucester mt extra condensed", [0.9453, 0.2178, 0]],
759
+ ["goudy old style", [0.875, 0.2373, 0]],
760
+ ["goudy stout", [1.019, 0.3491, 0]],
761
+ ["haettenschweiler", [0.9199, 0.1201, 0]],
762
+ ["harrington", [0.9453, 0.2305, 0]],
763
+ ["high tower text", [0.8984, 0.2651, 0]],
764
+ ["impact", [1.0088, 0.2109, 0]],
765
+ ["imprint mt shadow", [0.9292, 0.249, 0]],
766
+ ["informal roman", [0.7964, 0.2188, 0]],
767
+ ["ink free", [0.91, 0.328, 0]],
768
+ ["javanese text", [1.25, 1.0205, 0]],
769
+ ["jokerman", [1.1562, 0.356, 0]],
770
+ ["juice itc", [0.9111, 0.2231, 0]],
771
+ ["kristen itc", [1.0278, 0.332, 0]],
772
+ ["kunstler script", [0.8125, 0.2671, 0]],
773
+ ["leelawadee", [0.957, 0.2388, 0]],
774
+ ["leelawadee ui", [1.0791, 0.251, 0]],
775
+ ["leelawadee ui semilight", [1.0791, 0.251, 0]],
776
+ ["liberation mono", [0.8325, 0.3003, 0]],
777
+ ["liberation sans", [0.9053, 0.2119, 0]],
778
+ ["liberation sans narrow", [0.728, 0.2104, 0.1313]],
779
+ ["liberation serif", [0.8911, 0.2163, 0]],
780
+ ["linux biolinum g", [0.894, 0.2461, 0]],
781
+ ["linux libertine display g", [0.894, 0.2461, 0]],
782
+ ["linux libertine g", [0.894, 0.2461, 0]],
783
+ ["lucida bright", [0.9277, 0.2109, 0]],
784
+ ["lucida console", [0.7891, 0.2109, 0]],
785
+ ["lucida fax", [0.9399, 0.2051, 0]],
786
+ ["lucida sans", [0.9277, 0.2109, 0]],
787
+ ["lucida sans typewriter", [0.9277, 0.2051, 0]],
788
+ ["lucida sans unicode", [1.0967, 0.4399, 0]],
789
+ ["maiandra gd", [0.9629, 0.2358, 0]],
790
+ ["malgun gothic", [1.0884, 0.2417, 0]],
791
+ ["malgun gothic semilight", [1.0884, 0.2417, 0]],
792
+ ["matura mt script capitals", [0.8569, 0.4736, 0]],
793
+ ["microsoft himalaya", [0.5918, 0.4082, 0]],
794
+ ["microsoft jhenghei", [1.0757, 0.2544, 0]],
795
+ ["microsoft jhenghei light", [1.0757, 0.2544, 0]],
796
+ ["microsoft jhenghei ui", [1.0156, 0.2544, 0]],
797
+ ["microsoft jhenghei ui light", [1.0156, 0.2544, 0]],
798
+ ["microsoft new tai lue", [0.9272, 0.3809, 0]],
799
+ ["microsoft phagspa", [1.0439, 0.2354, 0]],
800
+ ["microsoft sans serif", [0.9219, 0.21, 0]],
801
+ ["microsoft tai le", [0.9272, 0.3442, 0]],
802
+ ["microsoft uighur", [0.6836, 0.3164, 0]],
803
+ ["microsoft yahei", [1.0581, 0.2617, 0]],
804
+ ["microsoft yahei light", [1.0156, 0.2617, 0]],
805
+ ["microsoft yahei ui", [1.0156, 0.2544, 0]],
806
+ ["microsoft yahei ui light", [1.0581, 0.2544, 0]],
807
+ ["microsoft yi baiti", [0.8594, 0.1416, 0]],
808
+ ["mingliu-extb", [0.8008, 0.1992, 0]],
809
+ ["mingliu_hkscs-extb", [0.8008, 0.1992, 0]],
810
+ ["mingliu_mscs-extb", [0.8008, 0.1992, 0]],
811
+ ["miriam libre", [0.969, 0.344, 0]],
812
+ ["mistral", [0.9023, 0.3159, 0]],
813
+ ["modern no. 20", [0.815, 0.209, 0]],
814
+ ["mongolian baiti", [0.8442, 0.2192, 0]],
815
+ ["monotype corsiva", [0.79, 0.3027, 0]],
816
+ ["ms gothic", [0.8594, 0.1406, 0]],
817
+ ["ms pgothic", [0.8594, 0.1406, 0]],
818
+ ["ms reference sans serif", [1.0054, 0.21, 0]],
819
+ ["ms ui gothic", [0.8594, 0.1406, 0]],
820
+ ["mv boli", [1.1392, 0.4722, 0]],
821
+ ["myanmar text", [1.0361, 0.8247, 0]],
822
+ ["niagara engraved", [0.875, 0.1802, 0]],
823
+ ["niagara solid", [0.875, 0.1802, 0]],
824
+ ["nirmala text", [0.7759, 0.2241, 0.8623]],
825
+ ["nirmala text semilight", [0.7759, 0.2241, 0.8623]],
826
+ ["nirmala ui", [1.0791, 0.251, 0]],
827
+ ["nirmala ui semilight", [1.0791, 0.251, 0]],
828
+ ["noto kufi arabic", [1.282, 0.615, 0]],
829
+ ["noto naskh arabic", [1.069, 0.634, 0]],
830
+ ["noto sans", [1.069, 0.293, 0]],
831
+ ["noto sans armenian", [1.068, 0.292, 0]],
832
+ ["noto sans georgian", [1.068, 0.292, 0]],
833
+ ["noto sans georgian bold", [1.068, 0.292, 0]],
834
+ ["noto sans hebrew", [1.068, 0.292, 0]],
835
+ ["noto sans lao", [1.183, 0.462, 0]],
836
+ ["noto sans lisu", [1.069, 0.293, 0]],
837
+ ["noto serif", [1.069, 0.293, 0]],
838
+ ["noto serif armenian", [1.068, 0.292, 0]],
839
+ ["noto serif georgian", [1.068, 0.292, 0]],
840
+ ["noto serif hebrew", [0.896, 0.29, 0]],
841
+ ["noto serif lao", [1.174, 0.482, 0]],
842
+ ["nsimsun", [0.8594, 0.1406, 0]],
843
+ ["ocr a extended", [0.8579, 0.1768, 0]],
844
+ ["old english text mt", [1.0029, 0.2158, 0]],
845
+ ["onyx", [0.9316, 0.2158, 0]],
846
+ ["palace script mt", [0.6841, 0.2422, 0]],
847
+ ["palatino linotype", [1.0498, 0.2993, 0]],
848
+ ["papyrus", [1.0522, 0.5215, 0]],
849
+ ["parchment", [0.749, 0.3179, 0]],
850
+ ["perpetua", [0.8198, 0.3262, 0]],
851
+ ["playbill", [0.8281, 0.1836, 0]],
852
+ ["pmingliu-extb", [0.8008, 0.1992, 0]],
853
+ ["poor richard", [0.9087, 0.2158, 0]],
854
+ ["pristina", [0.8643, 0.4468, 0]],
855
+ ["rage italic", [0.8467, 0.4102, 0]],
856
+ ["ravie", [1.0503, 0.2817, 0]],
857
+ ["reem kufi", [1.1, 0.4, 0]],
858
+ ["rockwell", [0.9458, 0.2285, 0]],
859
+ ["rockwell condensed", [0.9409, 0.2349, 0]],
860
+ ["rockwell extra bold", [0.9458, 0.2285, 0]],
861
+ ["rubik", [0.935, 0.25, 0]],
862
+ ["sans serif collection", [1.621, 1.03, 0]],
863
+ ["scheherazade", [1.0112, 0.6768, 0]],
864
+ ["script mt bold", [0.9521, 0.252, 0]],
865
+ ["segoe print", [1.2476, 0.4951, 0]],
866
+ ["segoe script", [1.0889, 0.4951, 0]],
867
+ ["segoe ui", [1.0791, 0.251, 0]],
868
+ ["segoe ui black", [1.0791, 0.251, 0]],
869
+ ["segoe ui emoji", [1.0791, 0.251, 0]],
870
+ ["segoe ui historic", [1.0791, 0.251, 0]],
871
+ ["segoe ui light", [1.0791, 0.251, 0]],
872
+ ["segoe ui semibold", [1.0791, 0.251, 0]],
873
+ ["segoe ui semilight", [1.0791, 0.251, 0]],
874
+ ["segoe ui symbol", [1.0791, 0.251, 0]],
875
+ ["segoe ui variable", [1.0791, 0.251, 0]],
876
+ ["showcard gothic", [1.0347, 0.2031, 0]],
877
+ ["simsun", [0.8594, 0.1406, 0]],
878
+ ["simsun-extb", [0.8594, 0.1406, 0]],
879
+ ["simsun-extg", [0.8594, 0.1406, 0]],
880
+ ["sitka text", [0.7569, 0.2431, 0.2502]],
881
+ ["snap itc", [1.0132, 0.272, 0]],
882
+ ["stencil", [0.9082, 0.2769, 0]],
883
+ ["sylfaen", [1.0068, 0.3101, 0]],
884
+ ["tahoma", [1.0005, 0.2065, 0]],
885
+ ["tempus sans itc", [0.9639, 0.3408, 0]],
886
+ ["times new roman", [0.8911, 0.2163, 0]],
887
+ ["trebuchet ms", [0.939, 0.2222, 0]],
888
+ ["tw cen mt", [0.856, 0.2329, 0]],
889
+ ["tw cen mt condensed", [0.8271, 0.2412, 0]],
890
+ ["tw cen mt condensed extra bold", [0.873, 0.21, 0]],
891
+ ["verdana", [1.0054, 0.21, 0]],
892
+ ["viner hand itc", [0.999, 0.6152, 0]],
893
+ ["vladimir script", [0.8999, 0.312, 0]],
894
+ ["wide latin", [0.9644, 0.2666, 0]],
895
+ ["yu gothic", [0.9849, 0.3022, 0]],
896
+ ["yu gothic light", [0.9893, 0.2979, 0]],
897
+ ["yu gothic medium", [0.9902, 0.2969, 0]],
898
+ ["yu gothic ui", [1.0791, 0.251, 0]],
899
+ ["yu gothic ui light", [1.0791, 0.251, 0]],
900
+ ["yu gothic ui semibold", [1.0791, 0.251, 0]],
901
+ ["yu gothic ui semilight", [1.0791, 0.251, 0]],
902
+ ["zwadobef", [0.652, 0, 0]]
903
+ ]);
904
+
905
+ // text/font-metrics/vertical-metrics.ts
906
+ var EAST_ASIAN_OFFICE_METRICS = { ascent: 220 / 256, descent: 36 / 256 };
907
+ var NAMED_METRICS = new Map(
908
+ ["ms mincho", "ms pmincho", "ms gothic", "ms pgothic", "ms ui gothic", "simsun", "nsimsun"].map(
909
+ (name2) => [name2, EAST_ASIAN_OFFICE_METRICS]
910
+ )
911
+ );
912
+ function namedFontVerticalMetrics(family) {
913
+ return family ? NAMED_METRICS.get(family.trim().toLowerCase()) : void 0;
914
+ }
915
+ function officeFontVerticalMetrics(family) {
916
+ const known = family ? OFFICE_FONT_METRICS.get(family.trim().toLowerCase()) : void 0;
917
+ if (!known) {
918
+ return void 0;
919
+ }
920
+ const [ascent, descent, lineGap] = known;
921
+ return lineGap > 0 ? { ascent, descent, lineGap } : { ascent, descent };
922
+ }
923
+
666
924
  // text/tsv.ts
667
925
  function quoteField(text) {
668
926
  return /[\t\r\n"]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text;
@@ -1490,4 +1748,4 @@ function subsetTrueType(font, used) {
1490
1748
  return { data: out, glyphs };
1491
1749
  }
1492
1750
 
1493
- export { FONT_SUBSTITUTION_MAP, METRIC_FONT_SUBSTITUTES, OOXML_DATETIME_PATTERNS, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, TEXT_CASE_MODES, buildFontFamilyString, buildLeaderString, changeTextCase, changeTextCaseRanges, classifyPanose, decimalAnchorIndex, decimalSeparatorForLanguage, designTextWidthEm, detectFontScript, distributeRunsText, formatDatePicture, formatLocaleNumber, getLeaderCharacter, getLeaderStyles, getPanoseWeight, getSubstituteFontFamily, getSubstituteFonts, hasDesignAdvances, hasDirectSubstitution, hasDistinctScriptFonts, mergeTextThreeWay, metricFontFamily, ooxmlDateTimeFieldPicture, parseLocaleNumber, parsePanoseBytes, parsePanoseString, parseTrueType, parseTsv, realignOrCollapseRuns, resolveFontForScript, resolveScriptFontSet, segmentByFont, segmentByScript, stripFontStyleSuffix, subsetTrueType, toTsv, wrapStyledRuns };
1751
+ export { FONT_SUBSTITUTION_MAP, METRIC_FONT_SUBSTITUTES, OOXML_DATETIME_PATTERNS, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, TEXT_CASE_MODES, buildFontFamilyString, buildLeaderString, changeTextCase, changeTextCaseRanges, classifyPanose, decimalAnchorIndex, decimalSeparatorForLanguage, designTextWidthEm, detectFontScript, distributeRunsText, formatDatePicture, formatLocaleNumber, getLeaderCharacter, getLeaderStyles, getPanoseWeight, getSubstituteFontFamily, getSubstituteFonts, hasDesignAdvances, hasDirectSubstitution, hasDistinctScriptFonts, mergeTextThreeWay, metricFontFamily, namedFontVerticalMetrics, officeFontVerticalMetrics, ooxmlDateTimeFieldPicture, parseLocaleNumber, parsePanoseBytes, parsePanoseString, parseTrueType, parseTsv, realignOrCollapseRuns, resolveFontForScript, resolveScriptFontSet, segmentByFont, segmentByScript, stripFontStyleSuffix, subsetTrueType, toTsv, wrapStyledRuns };