ooxml-core 1.50.0 → 1.50.2

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 (60) hide show
  1. package/dist/{PptxHandler-MZDYUDWY.cjs → PptxHandler-72NTA5ZY.cjs} +2 -2
  2. package/dist/{PptxHandler-SAD6KJTW.mjs → PptxHandler-O4IJ3TKZ.mjs} +1 -1
  3. package/dist/{PptxHandler-YMMRMHXL.mjs → PptxHandler-PVQW47CY.mjs} +2 -2
  4. package/dist/{PresentationBuilder-46225RH4.mjs → PresentationBuilder-ORM22QGC.mjs} +1 -1
  5. package/dist/{PresentationBuilder-QEKPEOEF.cjs → PresentationBuilder-T2ETYT3L.cjs} +4 -4
  6. package/dist/{PresentationBuilder-TFZ77BHK.mjs → PresentationBuilder-ZOOVSBPR.mjs} +2 -2
  7. package/dist/automation/index.cjs +33 -9
  8. package/dist/automation/index.mjs +33 -9
  9. package/dist/{chunk-R523BFEU.mjs → chunk-3OKY56UM.mjs} +33 -1
  10. package/dist/{chunk-BBQGII7T.mjs → chunk-7UM5IFPR.mjs} +1 -1
  11. package/dist/{chunk-4JWPX7CC.cjs → chunk-FFLU4LUQ.cjs} +33 -1
  12. package/dist/{chunk-7IEQDXTC.mjs → chunk-MX2GFMZS.mjs} +2017 -9
  13. package/dist/{chunk-WUWAERVF.mjs → chunk-VK2G4BGX.mjs} +34 -2
  14. package/dist/{chunk-JV7SMDBE.mjs → chunk-VLKUMQGT.mjs} +1 -1
  15. package/dist/{chunk-UBVU7OT5.mjs → chunk-ZCKEKP7N.mjs} +4 -4
  16. package/dist/index.cjs +82 -20
  17. package/dist/index.mjs +82 -20
  18. package/dist/pptx/automation/index.cjs +2128 -66
  19. package/dist/pptx/automation/index.d.ts +3 -3
  20. package/dist/pptx/automation/index.mjs +5 -5
  21. package/dist/pptx/chunks/{index-DcscVTAw.d.ts → index-AZN38e6S.d.ts} +2 -2
  22. package/dist/pptx/chunks/{index-DcscVTAw.d.ts.map → index-AZN38e6S.d.ts.map} +1 -1
  23. package/dist/pptx/chunks/{index-DH0ZfLzt.d.ts → index-OwiX5IVw.d.ts} +3 -3
  24. package/dist/pptx/chunks/{index-DH0ZfLzt.d.ts.map → index-OwiX5IVw.d.ts.map} +1 -1
  25. package/dist/pptx/chunks/{index-LjoVDuEa.d.ts → index-oQHWAO7M.d.ts} +6 -13
  26. package/dist/pptx/chunks/index-oQHWAO7M.d.ts.map +1 -0
  27. package/dist/pptx/cli/index.cjs +2128 -66
  28. package/dist/pptx/cli/index.mjs +4 -4
  29. package/dist/pptx/converter/index.cjs +2090 -65
  30. package/dist/pptx/converter/index.d.ts +1 -1
  31. package/dist/pptx/converter/index.mjs +2 -2
  32. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  33. package/dist/pptx/editor/render/slide-operations.cjs +1 -1
  34. package/dist/pptx/editor/render/slide-operations.mjs +1 -1
  35. package/dist/pptx/index.cjs +2129 -67
  36. package/dist/pptx/index.d.ts +3 -3
  37. package/dist/pptx/index.mjs +5 -5
  38. package/dist/pptx/node/index.d.ts +1 -1
  39. package/dist/text/font-metrics/advance-width.d.ts.map +1 -1
  40. package/dist/text/font-metrics/design-advances-powerpoint.generated.d.ts +13 -0
  41. package/dist/text/font-metrics/design-advances-powerpoint.generated.d.ts.map +1 -0
  42. package/dist/text/font-metrics/design-advances.generated.d.ts +1 -3
  43. package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -1
  44. package/dist/text/index.cjs +82 -20
  45. package/dist/text/index.mjs +82 -21
  46. package/dist/text/webfonts/google-fonts-request.d.ts +16 -5
  47. package/dist/text/webfonts/google-fonts-request.d.ts.map +1 -1
  48. package/dist/text/webfonts/index.d.ts +2 -1
  49. package/dist/text/webfonts/index.d.ts.map +1 -1
  50. package/dist/text/webfonts/look-alikes.d.ts +16 -0
  51. package/dist/text/webfonts/look-alikes.d.ts.map +1 -0
  52. package/dist/text/webfonts/metric-clones.d.ts.map +1 -1
  53. package/dist/text/webfonts/webfont-faces.d.ts +2 -1
  54. package/dist/text/webfonts/webfont-faces.d.ts.map +1 -1
  55. package/dist/visio/index.cjs +33 -9
  56. package/dist/visio/index.mjs +33 -9
  57. package/dist/visio/ui/index.cjs +33 -9
  58. package/dist/visio/ui/index.mjs +33 -9
  59. package/package.json +2 -2
  60. package/dist/pptx/chunks/index-LjoVDuEa.d.ts.map +0 -1
@@ -616,14 +616,6 @@ function mergeTextThreeWay(base, local, remote) {
616
616
 
617
617
  // text/font-metrics/design-advances.generated.ts
618
618
  var DESIGN_ADVANCES = {
619
- aptos: {
620
- regular: "203.75 292.5 370 537.5 533.75 826.25 642.5 210 292.5 292.5 457.5 533.75 286.25 340 286.25 338.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 286.25 286.25 533.75 533.75 533.75 501.25 895 588.75 603.75 692.5 686.25 556.25 525 708.75 707.5 260 331.25 568.75 500 790 706.25 732.5 577.5 732.5 606.25 566.25 478.75 681.25 585 892.5 552.5 540 516.25 295 338.75 295 533.75 460 551.25 531.25 561.25 525 560 526.25 301.25 485 551.25 238.75 238.75 486.25 260 852.5 551.25 551.25 561.25 560 335 486.25 323.75 558.75 452.5 721.25 442.5 452.5 437.5 295 270 295 533.75",
621
- bold: "203.75 292.5 420 537.5 533.75 841.25 676.25 232.5 292.5 292.5 457.5 533.75 300 340 300 386.25 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 300 300 533.75 533.75 533.75 517.5 900 620 618.75 706.25 707.5 573.75 536.25 717.5 728.75 293.75 366.25 622.5 511.25 821.25 722.5 737.5 605 737.5 633.75 598.75 505 696.25 616.25 940 598.75 586.25 547.5 337.5 386.25 337.5 533.75 460 551.25 551.25 586.25 548.75 586.25 556.25 335 511.25 578.75 267.5 267.5 533.75 296.25 888.75 578.75 573.75 586.25 586.25 368.75 516.25 355 581.25 493.75 761.25 495 493.75 466.25 337.5 270 337.5 533.75"
622
- },
623
- "aptos display": {
624
- regular: "192.5 246.25 370 528.75 522.5 825 622.5 210 295 295 381.25 522.5 246.25 348.75 246.25 338.75 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 246.25 246.25 522.5 522.5 522.5 486.25 878.75 580 582.5 656.25 655 540 508.75 671.25 661.25 235 317.5 553.75 485 765 681.25 695 556.25 695 590 546.25 477.5 651.25 573.75 886.25 550 535 516.25 295 338.75 295 522.5 460 551.25 488.75 518.75 492.5 518.75 493.75 283.75 440 506.25 210 210 447.5 243.75 800 506.25 512.5 518.75 518.75 310 462.5 303.75 506.25 432.5 716.25 440 432.5 426.25 295 218.75 295 522.5",
625
- bold: "192.5 261.25 420 561.25 540 838.75 655 232.5 337.5 337.5 428.75 540 261.25 365 261.25 386.25 540 540 540 540 540 540 540 540 540 540 261.25 261.25 540 540 540 502.5 887.5 610 598.75 675 677.5 548.75 516.25 685 682.5 267.5 348.75 602.5 491.25 793.75 696.25 705 585 705 610 573.75 498.75 670 600 921.25 591.25 572.5 547.5 337.5 386.25 337.5 540 460 551.25 507.5 541.25 507.5 542.5 515 317.5 472.5 533.75 240 240 500 278.75 840 533.75 530 541.25 542.5 342.5 483.75 333.75 533.75 475 747.5 488.75 475 450 337.5 251.25 337.5 540"
626
- },
627
619
  arial: {
628
620
  regular: "277.83 277.83 354.98 556.15 556.15 889.16 666.99 190.92 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 277.83 277.83 583.98 583.98 583.98 556.15 1015.14 666.99 666.99 722.17 722.17 666.99 610.84 777.83 722.17 277.83 500 666.99 556.15 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 277.83 277.83 277.83 469.24 556.15 333.01 556.15 556.15 500 556.15 556.15 277.83 556.15 556.15 222.17 222.17 500 222.17 833.01 556.15 556.15 556.15 556.15 333.01 500 277.83 556.15 500 722.17 500 500 500 333.98 259.77 333.98 583.98",
629
621
  bold: "277.83 333.01 474.12 556.15 556.15 889.16 722.17 237.79 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 333.01 333.01 583.98 583.98 583.98 610.84 975.1 722.17 722.17 722.17 722.17 666.99 610.84 777.83 722.17 277.83 556.15 722.17 610.84 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 333.01 277.83 333.01 583.98 556.15 333.01 556.15 610.84 556.15 610.84 556.15 333.01 610.84 610.84 277.83 277.83 556.15 277.83 889.16 610.84 610.84 610.84 610.84 389.16 556.15 333.01 610.84 556.15 777.83 556.15 556.15 500 389.16 279.79 389.16 583.98"
@@ -646,6 +638,38 @@ var DESIGN_ADVANCES = {
646
638
  }
647
639
  };
648
640
 
641
+ // text/font-metrics/design-advances-powerpoint.generated.ts
642
+ var POWERPOINT_DESIGN_ADVANCES = {
643
+ aptos: {
644
+ regular: "203.75 292.5 370 537.5 533.75 826.25 642.5 210 292.5 292.5 457.5 533.75 286.25 340 286.25 338.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 286.25 286.25 533.75 533.75 533.75 501.25 895 588.75 603.75 692.5 686.25 556.25 525 708.75 707.5 260 331.25 568.75 500 790 706.25 732.5 577.5 732.5 606.25 566.25 478.75 681.25 585 892.5 552.5 540 516.25 295 338.75 295 533.75 460 551.25 531.25 561.25 525 560 526.25 301.25 485 551.25 238.75 238.75 486.25 260 852.5 551.25 551.25 561.25 560 335 486.25 323.75 558.75 452.5 721.25 442.5 452.5 437.5 295 270 295 533.75",
645
+ bold: "203.75 292.5 420 537.5 533.75 841.25 676.25 232.5 292.5 292.5 457.5 533.75 300 340 300 386.25 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 300 300 533.75 533.75 533.75 517.5 900 620 618.75 706.25 707.5 573.75 536.25 717.5 728.75 293.75 366.25 622.5 511.25 821.25 722.5 737.5 605 737.5 633.75 598.75 505 696.25 616.25 940 598.75 586.25 547.5 337.5 386.25 337.5 533.75 460 551.25 551.25 586.25 548.75 586.25 556.25 335 511.25 578.75 267.5 267.5 533.75 296.25 888.75 578.75 573.75 586.25 586.25 368.75 516.25 355 581.25 493.75 761.25 495 493.75 466.25 337.5 270 337.5 533.75"
646
+ },
647
+ "aptos display": {
648
+ regular: "192.5 246.25 370 528.75 522.5 825 622.5 210 295 295 381.25 522.5 246.25 348.75 246.25 338.75 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 246.25 246.25 522.5 522.5 522.5 486.25 878.75 580 582.5 656.25 655 540 508.75 671.25 661.25 235 317.5 553.75 485 765 681.25 695 556.25 695 590 546.25 477.5 651.25 573.75 886.25 550 535 516.25 295 338.75 295 522.5 460 551.25 488.75 518.75 492.5 518.75 493.75 283.75 440 506.25 210 210 447.5 243.75 800 506.25 512.5 518.75 518.75 310 462.5 303.75 506.25 432.5 716.25 440 432.5 426.25 295 218.75 295 522.5",
649
+ bold: "192.5 261.25 420 561.25 540 838.75 655 232.5 337.5 337.5 428.75 540 261.25 365 261.25 386.25 540 540 540 540 540 540 540 540 540 540 261.25 261.25 540 540 540 502.5 887.5 610 598.75 675 677.5 548.75 516.25 685 682.5 267.5 348.75 602.5 491.25 793.75 696.25 705 585 705 610 573.75 498.75 670 600 921.25 591.25 572.5 547.5 337.5 386.25 337.5 540 460 551.25 507.5 541.25 507.5 542.5 515 317.5 472.5 533.75 240 240 500 278.75 840 533.75 530 541.25 542.5 342.5 483.75 333.75 533.75 475 747.5 488.75 475 450 337.5 251.25 337.5 540"
650
+ },
651
+ "aptos mono": {
652
+ regular: "600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600",
653
+ bold: "600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600"
654
+ },
655
+ "comic sans ms": {
656
+ regular: "298.75 237.5 423.75 842.5 693.75 820 653.75 388.75 366.25 366.25 530 480 276.25 416.25 248.75 511.25 610 450 610 610 610 610 610 610 610 610 298.75 298.75 381.25 510 381.25 523.75 931.25 731.25 630 602.5 721.25 625 607.5 680 767.5 546.25 665 611.25 551.25 882.5 797.5 798.75 520 876.25 628.75 693.75 680 736.25 650 1040 723.75 635 693.75 376.25 550 376.25 581.25 627.5 556.25 511.25 593.75 513.75 587.5 547.5 508.75 531.25 577.5 280 403.75 540 273.75 776.25 523.75 526.25 535 520 480 486.25 471.25 520 486.25 683.75 590 520 537.5 366.25 421.25 366.25 597.5",
657
+ bold: "433.75 237.5 437.5 842.5 693.75 820 653.75 433.75 366.25 366.25 530 610 433.75 610 433.75 511.25 610 610 610 610 610 610 610 610 610 610 433.75 433.75 610 610 610 566.25 931.25 731.25 630 618.75 721.25 625 607.5 680 767.5 546.25 665 611.25 551.25 882.5 812.5 798.75 532.5 876.25 640 693.75 696.25 736.25 675 1040 723.75 635 693.75 376.25 550 376.25 610 627.5 556.25 556.25 593.75 513.75 587.5 558.75 508.75 531.25 577.5 280 403.75 540 273.75 776.25 523.75 526.25 535 520 480 486.25 471.25 520 486.25 683.75 590 552.5 537.5 366.25 421.25 366.25 610"
658
+ },
659
+ consolas: {
660
+ regular: "550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550",
661
+ bold: "550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550"
662
+ },
663
+ garamond: {
664
+ regular: "250 218.75 406.25 666.25 447.5 822.5 728.75 177.5 291.25 291.25 427.5 666.25 218.75 312.5 218.75 500 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 218.75 218.75 666.25 666.25 666.25 365 916.25 677.5 615 635 771.25 656.25 562.5 771.25 760 353.75 333.75 740 572.5 833.75 771.25 781.25 562.5 771.25 625 478.75 615 708.75 677.5 885 697.5 656.25 656.25 271.25 500 271.25 500 500 333.75 406.25 510 416.25 500 416.25 322.5 447.5 510 228.75 228.75 468.75 228.75 771.25 510 510 510 490 333.75 365 291.25 490 468.75 666.25 458.75 416.25 427.5 478.75 500 478.75 666.25",
665
+ bold: "250 260 552.5 666.25 468.75 833.75 802.5 281.25 353.75 353.75 490 666.25 260 333.75 260 552.5 468.75 396.25 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 260 260 666.25 666.25 666.25 416.25 927.5 656.25 677.5 677.5 781.25 708.75 615 728.75 865 396.25 375 677.5 635 916.25 843.75 791.25 615 791.25 697.5 510 687.5 760 666.25 896.25 687.5 656.25 666.25 365 552.5 365 583.75 500 333.75 478.75 552.5 468.75 552.5 468.75 302.5 541.25 552.5 281.25 260 531.25 260 843.75 552.5 521.25 552.5 552.5 343.75 416.25 312.5 552.5 458.75 708.75 500 468.75 468.75 396.25 541.25 396.25 666.25"
666
+ },
667
+ impact: {
668
+ regular: "176.25 270 370 626.25 547.5 692.5 576.25 185 313.75 313.75 281.25 533.75 167.5 295 185 395 536.25 381.25 502.5 530 500 536.25 541.25 391.25 535 541.25 202.5 202.5 533.75 533.75 533.75 525 775 507.5 552.5 553.75 552.5 415 397.5 551.25 555 287.5 331.25 536.25 380 716.25 541.25 546.25 502.5 546.25 538.75 517.5 461.25 547.5 523.75 815 482.5 473.75 397.5 282.5 395 282.5 483.75 552.5 333.75 503.75 520 495 520 511.25 288.75 518.75 523.75 273.75 280 477.5 273.75 771.25 522.5 511.25 518.75 517.5 357.5 471.25 305 522.5 437.5 670 433.75 448.75 351.25 370 271.25 370 525",
669
+ bold: "176.25 270 370 627.5 547.5 693.75 576.25 185 313.75 313.75 281.25 533.75 168.75 295 185 396.25 536.25 381.25 502.5 531.25 500 537.5 542.5 392.5 535 542.5 202.5 202.5 533.75 533.75 533.75 525 775 508.75 552.5 553.75 553.75 416.25 398.75 551.25 556.25 288.75 331.25 537.5 381.25 717.5 542.5 547.5 502.5 547.5 538.75 517.5 461.25 547.5 523.75 815 482.5 473.75 397.5 282.5 396.25 282.5 483.75 552.5 333.75 505 520 495 520 511.25 290 518.75 525 275 280 478.75 275 771.25 523.75 511.25 520 518.75 358.75 471.25 305 522.5 437.5 670 433.75 448.75 351.25 370 271.25 370 525"
670
+ }
671
+ };
672
+
649
673
  // text/font-metrics/advance-width.ts
650
674
  var FIRST = 32;
651
675
  var decoded = /* @__PURE__ */ new Map();
@@ -654,7 +678,7 @@ function advances(family, bold) {
654
678
  const key = `${name2}|${bold ? "b" : "r"}`;
655
679
  const known = decoded.get(key);
656
680
  if (known) return known;
657
- const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : void 0;
681
+ const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : Object.hasOwn(POWERPOINT_DESIGN_ADVANCES, name2) ? POWERPOINT_DESIGN_ADVANCES[name2] : void 0;
658
682
  if (!table) return void 0;
659
683
  const values = (bold ? table.bold : table.regular).split(" ").map(Number);
660
684
  decoded.set(key, values);
@@ -3774,6 +3798,29 @@ function getGoogleFontsVariants(family) {
3774
3798
  return result;
3775
3799
  }
3776
3800
 
3801
+ // text/webfonts/look-alikes.ts
3802
+ var LOOK_ALIKES = {
3803
+ aptos: { family: "Gantari", regularWeight: 400, boldWeight: 650 },
3804
+ "aptos display": { family: "Gantari", regularWeight: 400, boldWeight: 650 },
3805
+ "aptos mono": { family: "Sometype Mono", regularWeight: 500, boldWeight: 700 },
3806
+ consolas: { family: "Overpass Mono", regularWeight: 500, boldWeight: 700 },
3807
+ "comic sans ms": { family: "Comic Relief", regularWeight: 400, boldWeight: 700 },
3808
+ garamond: { family: "EB Garamond", regularWeight: 400, boldWeight: 600 },
3809
+ impact: { family: "Anton", regularWeight: 400, boldWeight: 400 }
3810
+ };
3811
+ function findLookAlikeGoogleFontsFamily(family) {
3812
+ if (findGoogleFontsFamily(family) !== null) {
3813
+ return null;
3814
+ }
3815
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
3816
+ return lookAlike ? findGoogleFontsFamily(lookAlike.family) : null;
3817
+ }
3818
+ function findLookAlikeWeights(family) {
3819
+ if (findLookAlikeGoogleFontsFamily(family) === null) return void 0;
3820
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
3821
+ return lookAlike ? { regular: lookAlike.regularWeight, bold: lookAlike.boldWeight } : void 0;
3822
+ }
3823
+
3777
3824
  // text/webfonts/metric-clones.ts
3778
3825
  var METRIC_COMPATIBLE_CLONES = {
3779
3826
  Calibri: "Carlito",
@@ -3953,9 +4000,11 @@ function selectGoogleWebfontFamilies(referenced, embedded, isLocallyInstalled) {
3953
4000
  }
3954
4001
  return selected;
3955
4002
  }
3956
- function buildGoogleFontsFragment(family, weights) {
3957
- const sorted = [.../* @__PURE__ */ new Set([400, 700, ...weights ?? []])].sort((a, b) => a - b);
3958
- if (sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
4003
+ function buildGoogleFontsFragment(family, weights, standardFaces = true) {
4004
+ const sorted = [.../* @__PURE__ */ new Set([...standardFaces ? [400, 700] : [], ...weights ?? []])].sort(
4005
+ (a, b) => a - b
4006
+ );
4007
+ if (standardFaces && sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
3959
4008
  const tuples = [0, 1].flatMap((ital) => sorted.map((weight) => `${ital},${weight}`));
3960
4009
  return `${family}:ital,wght@${tuples.join(";")}`;
3961
4010
  }
@@ -3964,14 +4013,15 @@ function buildGoogleFontsHref(fragments, baseUrl = GOOGLE_FONTS_CSS2_BASE) {
3964
4013
  const query = fragments.map((fragment) => `family=${encodeURIComponent(fragment)}`).join("&");
3965
4014
  return `${baseUrl}?${query}&${DISPLAY_PARAM}`;
3966
4015
  }
3967
- function servedGoogleFontsFamily(family) {
3968
- return resolveGoogleFontsFace(family)?.family ?? findMetricCompatibleGoogleFontsFamily(family);
4016
+ function servedGoogleFontsFamily(family, options) {
4017
+ return resolveGoogleFontsFace(family)?.family ?? (options?.lookAlikes ? findLookAlikeGoogleFontsFamily(family) : null) ?? findMetricCompatibleGoogleFontsFamily(family);
3969
4018
  }
3970
- function matchGoogleWebfontFragments(families, onResolved) {
4019
+ function matchGoogleWebfontFragments(families, onResolved, options) {
3971
4020
  const weightsByFamily = /* @__PURE__ */ new Map();
4021
+ const standardFamilies = /* @__PURE__ */ new Set();
3972
4022
  for (const family of families) {
3973
4023
  const face = resolveGoogleFontsFace(family);
3974
- const canonical = face?.family ?? findMetricCompatibleGoogleFontsFamily(family);
4024
+ const canonical = face?.family ?? servedGoogleFontsFamily(family, options);
3975
4025
  if (canonical === null) continue;
3976
4026
  onResolved?.(family);
3977
4027
  let weights = weightsByFamily.get(canonical);
@@ -3979,12 +4029,21 @@ function matchGoogleWebfontFragments(families, onResolved) {
3979
4029
  weights = /* @__PURE__ */ new Set();
3980
4030
  weightsByFamily.set(canonical, weights);
3981
4031
  }
4032
+ const lookAlike = !face && options?.lookAlikes ? findLookAlikeWeights(family) : void 0;
4033
+ if (lookAlike && findLookAlikeGoogleFontsFamily(family) === canonical) {
4034
+ weights.add(lookAlike.regular);
4035
+ weights.add(lookAlike.bold);
4036
+ } else {
4037
+ standardFamilies.add(canonical);
4038
+ }
3982
4039
  if (face?.weight !== void 0) {
3983
4040
  weights.add(face.weight);
3984
4041
  weights.add(Math.max(700, face.weight));
3985
4042
  }
3986
4043
  }
3987
- return [...weightsByFamily].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([family, weights]) => buildGoogleFontsFragment(family, weights));
4044
+ return [...weightsByFamily].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(
4045
+ ([family, weights]) => buildGoogleFontsFragment(family, weights, standardFamilies.has(family))
4046
+ );
3988
4047
  }
3989
4048
 
3990
4049
  // text/webfonts/webfont-faces.ts
@@ -3998,15 +4057,17 @@ function collectRunFamilies(runs) {
3998
4057
  }
3999
4058
  return families;
4000
4059
  }
4001
- function collectWebfontFaces(runs, candidates) {
4060
+ function collectWebfontFaces(runs, candidates, options) {
4002
4061
  const wanted = new Set(candidates);
4003
- const unavailable = candidates.filter((family) => servedGoogleFontsFamily(family) === null);
4062
+ const unavailable = candidates.filter(
4063
+ (family) => servedGoogleFontsFamily(family, options) === null
4064
+ );
4004
4065
  const faces = /* @__PURE__ */ new Map();
4005
4066
  const byFont = /* @__PURE__ */ new Map();
4006
4067
  for (const run of runs) {
4007
4068
  const family = run.family?.trim();
4008
4069
  if (!family || !wanted.has(family)) continue;
4009
- const served = servedGoogleFontsFamily(family);
4070
+ const served = servedGoogleFontsFamily(family, options);
4010
4071
  if (served === null) continue;
4011
4072
  const weight = resolveFontWeight(family, run.bold);
4012
4073
  const style = resolveFontItalic(family, run.italic) ? "italic " : "";
@@ -4054,6 +4115,7 @@ exports.designTextWidthEm = designTextWidthEm;
4054
4115
  exports.detectFontScript = detectFontScript;
4055
4116
  exports.distributeRunsText = distributeRunsText;
4056
4117
  exports.findGoogleFontsFamily = findGoogleFontsFamily;
4118
+ exports.findLookAlikeGoogleFontsFamily = findLookAlikeGoogleFontsFamily;
4057
4119
  exports.findMetricCompatibleGoogleFontsFamily = findMetricCompatibleGoogleFontsFamily;
4058
4120
  exports.fontStyleShorthand = fontStyleShorthand;
4059
4121
  exports.fontWeightAttribute = fontWeightAttribute;
@@ -614,14 +614,6 @@ function mergeTextThreeWay(base, local, remote) {
614
614
 
615
615
  // text/font-metrics/design-advances.generated.ts
616
616
  var DESIGN_ADVANCES = {
617
- aptos: {
618
- regular: "203.75 292.5 370 537.5 533.75 826.25 642.5 210 292.5 292.5 457.5 533.75 286.25 340 286.25 338.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 286.25 286.25 533.75 533.75 533.75 501.25 895 588.75 603.75 692.5 686.25 556.25 525 708.75 707.5 260 331.25 568.75 500 790 706.25 732.5 577.5 732.5 606.25 566.25 478.75 681.25 585 892.5 552.5 540 516.25 295 338.75 295 533.75 460 551.25 531.25 561.25 525 560 526.25 301.25 485 551.25 238.75 238.75 486.25 260 852.5 551.25 551.25 561.25 560 335 486.25 323.75 558.75 452.5 721.25 442.5 452.5 437.5 295 270 295 533.75",
619
- bold: "203.75 292.5 420 537.5 533.75 841.25 676.25 232.5 292.5 292.5 457.5 533.75 300 340 300 386.25 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 300 300 533.75 533.75 533.75 517.5 900 620 618.75 706.25 707.5 573.75 536.25 717.5 728.75 293.75 366.25 622.5 511.25 821.25 722.5 737.5 605 737.5 633.75 598.75 505 696.25 616.25 940 598.75 586.25 547.5 337.5 386.25 337.5 533.75 460 551.25 551.25 586.25 548.75 586.25 556.25 335 511.25 578.75 267.5 267.5 533.75 296.25 888.75 578.75 573.75 586.25 586.25 368.75 516.25 355 581.25 493.75 761.25 495 493.75 466.25 337.5 270 337.5 533.75"
620
- },
621
- "aptos display": {
622
- regular: "192.5 246.25 370 528.75 522.5 825 622.5 210 295 295 381.25 522.5 246.25 348.75 246.25 338.75 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 246.25 246.25 522.5 522.5 522.5 486.25 878.75 580 582.5 656.25 655 540 508.75 671.25 661.25 235 317.5 553.75 485 765 681.25 695 556.25 695 590 546.25 477.5 651.25 573.75 886.25 550 535 516.25 295 338.75 295 522.5 460 551.25 488.75 518.75 492.5 518.75 493.75 283.75 440 506.25 210 210 447.5 243.75 800 506.25 512.5 518.75 518.75 310 462.5 303.75 506.25 432.5 716.25 440 432.5 426.25 295 218.75 295 522.5",
623
- bold: "192.5 261.25 420 561.25 540 838.75 655 232.5 337.5 337.5 428.75 540 261.25 365 261.25 386.25 540 540 540 540 540 540 540 540 540 540 261.25 261.25 540 540 540 502.5 887.5 610 598.75 675 677.5 548.75 516.25 685 682.5 267.5 348.75 602.5 491.25 793.75 696.25 705 585 705 610 573.75 498.75 670 600 921.25 591.25 572.5 547.5 337.5 386.25 337.5 540 460 551.25 507.5 541.25 507.5 542.5 515 317.5 472.5 533.75 240 240 500 278.75 840 533.75 530 541.25 542.5 342.5 483.75 333.75 533.75 475 747.5 488.75 475 450 337.5 251.25 337.5 540"
624
- },
625
617
  arial: {
626
618
  regular: "277.83 277.83 354.98 556.15 556.15 889.16 666.99 190.92 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 277.83 277.83 583.98 583.98 583.98 556.15 1015.14 666.99 666.99 722.17 722.17 666.99 610.84 777.83 722.17 277.83 500 666.99 556.15 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 277.83 277.83 277.83 469.24 556.15 333.01 556.15 556.15 500 556.15 556.15 277.83 556.15 556.15 222.17 222.17 500 222.17 833.01 556.15 556.15 556.15 556.15 333.01 500 277.83 556.15 500 722.17 500 500 500 333.98 259.77 333.98 583.98",
627
619
  bold: "277.83 333.01 474.12 556.15 556.15 889.16 722.17 237.79 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 333.01 333.01 583.98 583.98 583.98 610.84 975.1 722.17 722.17 722.17 722.17 666.99 610.84 777.83 722.17 277.83 556.15 722.17 610.84 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 333.01 277.83 333.01 583.98 556.15 333.01 556.15 610.84 556.15 610.84 556.15 333.01 610.84 610.84 277.83 277.83 556.15 277.83 889.16 610.84 610.84 610.84 610.84 389.16 556.15 333.01 610.84 556.15 777.83 556.15 556.15 500 389.16 279.79 389.16 583.98"
@@ -644,6 +636,38 @@ var DESIGN_ADVANCES = {
644
636
  }
645
637
  };
646
638
 
639
+ // text/font-metrics/design-advances-powerpoint.generated.ts
640
+ var POWERPOINT_DESIGN_ADVANCES = {
641
+ aptos: {
642
+ regular: "203.75 292.5 370 537.5 533.75 826.25 642.5 210 292.5 292.5 457.5 533.75 286.25 340 286.25 338.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 286.25 286.25 533.75 533.75 533.75 501.25 895 588.75 603.75 692.5 686.25 556.25 525 708.75 707.5 260 331.25 568.75 500 790 706.25 732.5 577.5 732.5 606.25 566.25 478.75 681.25 585 892.5 552.5 540 516.25 295 338.75 295 533.75 460 551.25 531.25 561.25 525 560 526.25 301.25 485 551.25 238.75 238.75 486.25 260 852.5 551.25 551.25 561.25 560 335 486.25 323.75 558.75 452.5 721.25 442.5 452.5 437.5 295 270 295 533.75",
643
+ bold: "203.75 292.5 420 537.5 533.75 841.25 676.25 232.5 292.5 292.5 457.5 533.75 300 340 300 386.25 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 300 300 533.75 533.75 533.75 517.5 900 620 618.75 706.25 707.5 573.75 536.25 717.5 728.75 293.75 366.25 622.5 511.25 821.25 722.5 737.5 605 737.5 633.75 598.75 505 696.25 616.25 940 598.75 586.25 547.5 337.5 386.25 337.5 533.75 460 551.25 551.25 586.25 548.75 586.25 556.25 335 511.25 578.75 267.5 267.5 533.75 296.25 888.75 578.75 573.75 586.25 586.25 368.75 516.25 355 581.25 493.75 761.25 495 493.75 466.25 337.5 270 337.5 533.75"
644
+ },
645
+ "aptos display": {
646
+ regular: "192.5 246.25 370 528.75 522.5 825 622.5 210 295 295 381.25 522.5 246.25 348.75 246.25 338.75 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 246.25 246.25 522.5 522.5 522.5 486.25 878.75 580 582.5 656.25 655 540 508.75 671.25 661.25 235 317.5 553.75 485 765 681.25 695 556.25 695 590 546.25 477.5 651.25 573.75 886.25 550 535 516.25 295 338.75 295 522.5 460 551.25 488.75 518.75 492.5 518.75 493.75 283.75 440 506.25 210 210 447.5 243.75 800 506.25 512.5 518.75 518.75 310 462.5 303.75 506.25 432.5 716.25 440 432.5 426.25 295 218.75 295 522.5",
647
+ bold: "192.5 261.25 420 561.25 540 838.75 655 232.5 337.5 337.5 428.75 540 261.25 365 261.25 386.25 540 540 540 540 540 540 540 540 540 540 261.25 261.25 540 540 540 502.5 887.5 610 598.75 675 677.5 548.75 516.25 685 682.5 267.5 348.75 602.5 491.25 793.75 696.25 705 585 705 610 573.75 498.75 670 600 921.25 591.25 572.5 547.5 337.5 386.25 337.5 540 460 551.25 507.5 541.25 507.5 542.5 515 317.5 472.5 533.75 240 240 500 278.75 840 533.75 530 541.25 542.5 342.5 483.75 333.75 533.75 475 747.5 488.75 475 450 337.5 251.25 337.5 540"
648
+ },
649
+ "aptos mono": {
650
+ regular: "600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600",
651
+ bold: "600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600"
652
+ },
653
+ "comic sans ms": {
654
+ regular: "298.75 237.5 423.75 842.5 693.75 820 653.75 388.75 366.25 366.25 530 480 276.25 416.25 248.75 511.25 610 450 610 610 610 610 610 610 610 610 298.75 298.75 381.25 510 381.25 523.75 931.25 731.25 630 602.5 721.25 625 607.5 680 767.5 546.25 665 611.25 551.25 882.5 797.5 798.75 520 876.25 628.75 693.75 680 736.25 650 1040 723.75 635 693.75 376.25 550 376.25 581.25 627.5 556.25 511.25 593.75 513.75 587.5 547.5 508.75 531.25 577.5 280 403.75 540 273.75 776.25 523.75 526.25 535 520 480 486.25 471.25 520 486.25 683.75 590 520 537.5 366.25 421.25 366.25 597.5",
655
+ bold: "433.75 237.5 437.5 842.5 693.75 820 653.75 433.75 366.25 366.25 530 610 433.75 610 433.75 511.25 610 610 610 610 610 610 610 610 610 610 433.75 433.75 610 610 610 566.25 931.25 731.25 630 618.75 721.25 625 607.5 680 767.5 546.25 665 611.25 551.25 882.5 812.5 798.75 532.5 876.25 640 693.75 696.25 736.25 675 1040 723.75 635 693.75 376.25 550 376.25 610 627.5 556.25 556.25 593.75 513.75 587.5 558.75 508.75 531.25 577.5 280 403.75 540 273.75 776.25 523.75 526.25 535 520 480 486.25 471.25 520 486.25 683.75 590 552.5 537.5 366.25 421.25 366.25 610"
656
+ },
657
+ consolas: {
658
+ regular: "550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550",
659
+ bold: "550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550"
660
+ },
661
+ garamond: {
662
+ regular: "250 218.75 406.25 666.25 447.5 822.5 728.75 177.5 291.25 291.25 427.5 666.25 218.75 312.5 218.75 500 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 218.75 218.75 666.25 666.25 666.25 365 916.25 677.5 615 635 771.25 656.25 562.5 771.25 760 353.75 333.75 740 572.5 833.75 771.25 781.25 562.5 771.25 625 478.75 615 708.75 677.5 885 697.5 656.25 656.25 271.25 500 271.25 500 500 333.75 406.25 510 416.25 500 416.25 322.5 447.5 510 228.75 228.75 468.75 228.75 771.25 510 510 510 490 333.75 365 291.25 490 468.75 666.25 458.75 416.25 427.5 478.75 500 478.75 666.25",
663
+ bold: "250 260 552.5 666.25 468.75 833.75 802.5 281.25 353.75 353.75 490 666.25 260 333.75 260 552.5 468.75 396.25 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 260 260 666.25 666.25 666.25 416.25 927.5 656.25 677.5 677.5 781.25 708.75 615 728.75 865 396.25 375 677.5 635 916.25 843.75 791.25 615 791.25 697.5 510 687.5 760 666.25 896.25 687.5 656.25 666.25 365 552.5 365 583.75 500 333.75 478.75 552.5 468.75 552.5 468.75 302.5 541.25 552.5 281.25 260 531.25 260 843.75 552.5 521.25 552.5 552.5 343.75 416.25 312.5 552.5 458.75 708.75 500 468.75 468.75 396.25 541.25 396.25 666.25"
664
+ },
665
+ impact: {
666
+ regular: "176.25 270 370 626.25 547.5 692.5 576.25 185 313.75 313.75 281.25 533.75 167.5 295 185 395 536.25 381.25 502.5 530 500 536.25 541.25 391.25 535 541.25 202.5 202.5 533.75 533.75 533.75 525 775 507.5 552.5 553.75 552.5 415 397.5 551.25 555 287.5 331.25 536.25 380 716.25 541.25 546.25 502.5 546.25 538.75 517.5 461.25 547.5 523.75 815 482.5 473.75 397.5 282.5 395 282.5 483.75 552.5 333.75 503.75 520 495 520 511.25 288.75 518.75 523.75 273.75 280 477.5 273.75 771.25 522.5 511.25 518.75 517.5 357.5 471.25 305 522.5 437.5 670 433.75 448.75 351.25 370 271.25 370 525",
667
+ bold: "176.25 270 370 627.5 547.5 693.75 576.25 185 313.75 313.75 281.25 533.75 168.75 295 185 396.25 536.25 381.25 502.5 531.25 500 537.5 542.5 392.5 535 542.5 202.5 202.5 533.75 533.75 533.75 525 775 508.75 552.5 553.75 553.75 416.25 398.75 551.25 556.25 288.75 331.25 537.5 381.25 717.5 542.5 547.5 502.5 547.5 538.75 517.5 461.25 547.5 523.75 815 482.5 473.75 397.5 282.5 396.25 282.5 483.75 552.5 333.75 505 520 495 520 511.25 290 518.75 525 275 280 478.75 275 771.25 523.75 511.25 520 518.75 358.75 471.25 305 522.5 437.5 670 433.75 448.75 351.25 370 271.25 370 525"
668
+ }
669
+ };
670
+
647
671
  // text/font-metrics/advance-width.ts
648
672
  var FIRST = 32;
649
673
  var decoded = /* @__PURE__ */ new Map();
@@ -652,7 +676,7 @@ function advances(family, bold) {
652
676
  const key = `${name2}|${bold ? "b" : "r"}`;
653
677
  const known = decoded.get(key);
654
678
  if (known) return known;
655
- const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : void 0;
679
+ const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : Object.hasOwn(POWERPOINT_DESIGN_ADVANCES, name2) ? POWERPOINT_DESIGN_ADVANCES[name2] : void 0;
656
680
  if (!table) return void 0;
657
681
  const values = (bold ? table.bold : table.regular).split(" ").map(Number);
658
682
  decoded.set(key, values);
@@ -3772,6 +3796,29 @@ function getGoogleFontsVariants(family) {
3772
3796
  return result;
3773
3797
  }
3774
3798
 
3799
+ // text/webfonts/look-alikes.ts
3800
+ var LOOK_ALIKES = {
3801
+ aptos: { family: "Gantari", regularWeight: 400, boldWeight: 650 },
3802
+ "aptos display": { family: "Gantari", regularWeight: 400, boldWeight: 650 },
3803
+ "aptos mono": { family: "Sometype Mono", regularWeight: 500, boldWeight: 700 },
3804
+ consolas: { family: "Overpass Mono", regularWeight: 500, boldWeight: 700 },
3805
+ "comic sans ms": { family: "Comic Relief", regularWeight: 400, boldWeight: 700 },
3806
+ garamond: { family: "EB Garamond", regularWeight: 400, boldWeight: 600 },
3807
+ impact: { family: "Anton", regularWeight: 400, boldWeight: 400 }
3808
+ };
3809
+ function findLookAlikeGoogleFontsFamily(family) {
3810
+ if (findGoogleFontsFamily(family) !== null) {
3811
+ return null;
3812
+ }
3813
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
3814
+ return lookAlike ? findGoogleFontsFamily(lookAlike.family) : null;
3815
+ }
3816
+ function findLookAlikeWeights(family) {
3817
+ if (findLookAlikeGoogleFontsFamily(family) === null) return void 0;
3818
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
3819
+ return lookAlike ? { regular: lookAlike.regularWeight, bold: lookAlike.boldWeight } : void 0;
3820
+ }
3821
+
3775
3822
  // text/webfonts/metric-clones.ts
3776
3823
  var METRIC_COMPATIBLE_CLONES = {
3777
3824
  Calibri: "Carlito",
@@ -3951,9 +3998,11 @@ function selectGoogleWebfontFamilies(referenced, embedded, isLocallyInstalled) {
3951
3998
  }
3952
3999
  return selected;
3953
4000
  }
3954
- function buildGoogleFontsFragment(family, weights) {
3955
- const sorted = [.../* @__PURE__ */ new Set([400, 700, ...weights ?? []])].sort((a, b) => a - b);
3956
- if (sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
4001
+ function buildGoogleFontsFragment(family, weights, standardFaces = true) {
4002
+ const sorted = [.../* @__PURE__ */ new Set([...standardFaces ? [400, 700] : [], ...weights ?? []])].sort(
4003
+ (a, b) => a - b
4004
+ );
4005
+ if (standardFaces && sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
3957
4006
  const tuples = [0, 1].flatMap((ital) => sorted.map((weight) => `${ital},${weight}`));
3958
4007
  return `${family}:ital,wght@${tuples.join(";")}`;
3959
4008
  }
@@ -3962,14 +4011,15 @@ function buildGoogleFontsHref(fragments, baseUrl = GOOGLE_FONTS_CSS2_BASE) {
3962
4011
  const query = fragments.map((fragment) => `family=${encodeURIComponent(fragment)}`).join("&");
3963
4012
  return `${baseUrl}?${query}&${DISPLAY_PARAM}`;
3964
4013
  }
3965
- function servedGoogleFontsFamily(family) {
3966
- return resolveGoogleFontsFace(family)?.family ?? findMetricCompatibleGoogleFontsFamily(family);
4014
+ function servedGoogleFontsFamily(family, options) {
4015
+ return resolveGoogleFontsFace(family)?.family ?? (options?.lookAlikes ? findLookAlikeGoogleFontsFamily(family) : null) ?? findMetricCompatibleGoogleFontsFamily(family);
3967
4016
  }
3968
- function matchGoogleWebfontFragments(families, onResolved) {
4017
+ function matchGoogleWebfontFragments(families, onResolved, options) {
3969
4018
  const weightsByFamily = /* @__PURE__ */ new Map();
4019
+ const standardFamilies = /* @__PURE__ */ new Set();
3970
4020
  for (const family of families) {
3971
4021
  const face = resolveGoogleFontsFace(family);
3972
- const canonical = face?.family ?? findMetricCompatibleGoogleFontsFamily(family);
4022
+ const canonical = face?.family ?? servedGoogleFontsFamily(family, options);
3973
4023
  if (canonical === null) continue;
3974
4024
  onResolved?.(family);
3975
4025
  let weights = weightsByFamily.get(canonical);
@@ -3977,12 +4027,21 @@ function matchGoogleWebfontFragments(families, onResolved) {
3977
4027
  weights = /* @__PURE__ */ new Set();
3978
4028
  weightsByFamily.set(canonical, weights);
3979
4029
  }
4030
+ const lookAlike = !face && options?.lookAlikes ? findLookAlikeWeights(family) : void 0;
4031
+ if (lookAlike && findLookAlikeGoogleFontsFamily(family) === canonical) {
4032
+ weights.add(lookAlike.regular);
4033
+ weights.add(lookAlike.bold);
4034
+ } else {
4035
+ standardFamilies.add(canonical);
4036
+ }
3980
4037
  if (face?.weight !== void 0) {
3981
4038
  weights.add(face.weight);
3982
4039
  weights.add(Math.max(700, face.weight));
3983
4040
  }
3984
4041
  }
3985
- return [...weightsByFamily].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([family, weights]) => buildGoogleFontsFragment(family, weights));
4042
+ return [...weightsByFamily].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(
4043
+ ([family, weights]) => buildGoogleFontsFragment(family, weights, standardFamilies.has(family))
4044
+ );
3986
4045
  }
3987
4046
 
3988
4047
  // text/webfonts/webfont-faces.ts
@@ -3996,15 +4055,17 @@ function collectRunFamilies(runs) {
3996
4055
  }
3997
4056
  return families;
3998
4057
  }
3999
- function collectWebfontFaces(runs, candidates) {
4058
+ function collectWebfontFaces(runs, candidates, options) {
4000
4059
  const wanted = new Set(candidates);
4001
- const unavailable = candidates.filter((family) => servedGoogleFontsFamily(family) === null);
4060
+ const unavailable = candidates.filter(
4061
+ (family) => servedGoogleFontsFamily(family, options) === null
4062
+ );
4002
4063
  const faces = /* @__PURE__ */ new Map();
4003
4064
  const byFont = /* @__PURE__ */ new Map();
4004
4065
  for (const run of runs) {
4005
4066
  const family = run.family?.trim();
4006
4067
  if (!family || !wanted.has(family)) continue;
4007
- const served = servedGoogleFontsFamily(family);
4068
+ const served = servedGoogleFontsFamily(family, options);
4008
4069
  if (served === null) continue;
4009
4070
  const weight = resolveFontWeight(family, run.bold);
4010
4071
  const style = resolveFontItalic(family, run.italic) ? "italic " : "";
@@ -4025,4 +4086,4 @@ function collectWebfontFaces(runs, candidates) {
4025
4086
  return { faces, unavailable };
4026
4087
  }
4027
4088
 
4028
- export { FONT_SUBSTITUTION_MAP, GOOGLE_FONTS_CATALOGUE_DATE, GOOGLE_FONTS_CSS2_BASE, GOOGLE_FONTS_FAMILIES, GOOGLE_WEBFONT_AXIS, METRIC_FONT_SUBSTITUTES, OOXML_DATETIME_PATTERNS, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, TEXT_CASE_MODES, buildFontFamilyString, buildGoogleFontsFragment, buildGoogleFontsHref, buildLeaderString, changeTextCase, changeTextCaseRanges, classifyPanose, collectRunFamilies, collectWebfontFaces, decimalAnchorIndex, decimalSeparatorForLanguage, designTextWidthEm, detectFontScript, distributeRunsText, findGoogleFontsFamily, findMetricCompatibleGoogleFontsFamily, fontStyleShorthand, fontWeightAttribute, fontWeightShorthand, formatDatePicture, formatLocaleNumber, getGoogleFontsVariants, getLeaderCharacter, getLeaderStyles, getPanoseWeight, getSubstituteFontFamily, getSubstituteFonts, hasDesignAdvances, hasDirectSubstitution, hasDistinctScriptFonts, matchGoogleWebfontFragments, mergeTextThreeWay, metricFontFamily, namedFontVerticalMetrics, normalizeGoogleFontsBaseUrl, officeFontVerticalMetrics, ooxmlDateTimeFieldPicture, parseFontWeightName, parseLocaleNumber, parsePanoseBytes, parsePanoseString, parseTrueType, parseTsv, realignOrCollapseRuns, resolveFontForScript, resolveFontItalic, resolveFontWeight, resolveGoogleFontsCss2Base, resolveGoogleFontsFace, resolveScriptFontSet, segmentByFont, segmentByScript, selectGoogleWebfontFamilies, servedGoogleFontsFamily, stripFontStyleSuffix, subsetTrueType, toTsv, wrapStyledRuns };
4089
+ export { FONT_SUBSTITUTION_MAP, GOOGLE_FONTS_CATALOGUE_DATE, GOOGLE_FONTS_CSS2_BASE, GOOGLE_FONTS_FAMILIES, GOOGLE_WEBFONT_AXIS, METRIC_FONT_SUBSTITUTES, OOXML_DATETIME_PATTERNS, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, TEXT_CASE_MODES, buildFontFamilyString, buildGoogleFontsFragment, buildGoogleFontsHref, buildLeaderString, changeTextCase, changeTextCaseRanges, classifyPanose, collectRunFamilies, collectWebfontFaces, decimalAnchorIndex, decimalSeparatorForLanguage, designTextWidthEm, detectFontScript, distributeRunsText, findGoogleFontsFamily, findLookAlikeGoogleFontsFamily, findMetricCompatibleGoogleFontsFamily, fontStyleShorthand, fontWeightAttribute, fontWeightShorthand, formatDatePicture, formatLocaleNumber, getGoogleFontsVariants, getLeaderCharacter, getLeaderStyles, getPanoseWeight, getSubstituteFontFamily, getSubstituteFonts, hasDesignAdvances, hasDirectSubstitution, hasDistinctScriptFonts, matchGoogleWebfontFragments, mergeTextThreeWay, metricFontFamily, namedFontVerticalMetrics, normalizeGoogleFontsBaseUrl, officeFontVerticalMetrics, ooxmlDateTimeFieldPicture, parseFontWeightName, parseLocaleNumber, parsePanoseBytes, parsePanoseString, parseTrueType, parseTsv, realignOrCollapseRuns, resolveFontForScript, resolveFontItalic, resolveFontWeight, resolveGoogleFontsCss2Base, resolveGoogleFontsFace, resolveScriptFontSet, segmentByFont, segmentByScript, selectGoogleWebfontFamilies, servedGoogleFontsFamily, stripFontStyleSuffix, subsetTrueType, toTsv, wrapStyledRuns };
@@ -39,19 +39,30 @@ export declare function selectGoogleWebfontFamilies(referenced: Iterable<string>
39
39
  /**
40
40
  * The CSS2 query fragment for one family. Word separators stay literal spaces: the fragment goes
41
41
  * through `encodeURIComponent`, and an encoded `+` reaches Google as a literal plus it rejects.
42
+ * The regular (400) and bold (700) faces are always requested, unless `standardFaces` is `false`:
43
+ * a look-alike asks for exactly the weights that match the font it stands in for.
42
44
  */
43
- export declare function buildGoogleFontsFragment(family: string, weights?: Iterable<number>): string;
45
+ export declare function buildGoogleFontsFragment(family: string, weights?: Iterable<number>, standardFaces?: boolean): string;
44
46
  /** The CSS2 stylesheet href for the fragments, or `null` when there is nothing to load. */
45
47
  export declare function buildGoogleFontsHref(fragments: readonly string[], baseUrl?: string): string | null;
46
- /** The family the stylesheet serves for `family` (itself or its clone), or `null`. */
47
- export declare function servedGoogleFontsFamily(family: string): string | null;
48
+ /** How a family the catalogue does not serve under its own name is stood in for. */
49
+ export interface WebfontServeOptions {
50
+ /**
51
+ * Serve the family's measured look-alike (`look-alikes.ts`) rather than its metric clone. Only
52
+ * for a product that corrects the stand-in's widths itself (PowerPoint); others keep the clone,
53
+ * whose advances already match.
54
+ */
55
+ readonly lookAlikes?: boolean | undefined;
56
+ }
57
+ /** The family the stylesheet serves for `family` (itself or its stand-in), or `null`. */
58
+ export declare function servedGoogleFontsFamily(family: string, options?: WebfontServeOptions): string | null;
48
59
  /**
49
60
  * The query fragments for the candidate families the catalogue knows, under their canonical
50
- * spelling or as their metric-compatible clone; families resolving to one served family give one
61
+ * spelling or as their stand-in ({@link servedGoogleFontsFamily}); families resolving to one served family give one
51
62
  * fragment. A weight variant named as its own family ("DM Sans Light") requests its base family
52
63
  * with that weight on the axis. Unmatched families are dropped without any request. Sorted, so
53
64
  * the href depends only on which families a document uses. `onResolved` hears every candidate
54
65
  * that matched.
55
66
  */
56
- export declare function matchGoogleWebfontFragments(families: readonly string[], onResolved?: (family: string) => void): string[];
67
+ export declare function matchGoogleWebfontFragments(families: readonly string[], onResolved?: (family: string) => void, options?: WebfontServeOptions): string[];
57
68
  //# sourceMappingURL=google-fonts-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"google-fonts-request.d.ts","sourceRoot":"","sources":["../../../text/webfonts/google-fonts-request.ts"],"names":[],"mappings":"AAoBA,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,sCAAsC,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAa3E;AAID;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,SAAS,GAAE,MAAM,GAAG,IAA6B,EACjD,KAAK,SAAgB,GACnB,MAAM,GAAG,IAAI,CAYf;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,sCAAsC,CAAC;AAKvE;;;;GAIG;AACH,wBAAgB,2BAA2B,CAC1C,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC3B,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,GAC9C,MAAM,EAAE,CAQV;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAM3F;AAED,2FAA2F;AAC3F,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,OAAO,GAAE,MAA+B,GACtC,MAAM,GAAG,IAAI,CAIf;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErE;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAC1C,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GACnC,MAAM,EAAE,CAqBV"}
1
+ {"version":3,"file":"google-fonts-request.d.ts","sourceRoot":"","sources":["../../../text/webfonts/google-fonts-request.ts"],"names":[],"mappings":"AAqBA,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,sCAAsC,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAa3E;AAID;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,SAAS,GAAE,MAAM,GAAG,IAA6B,EACjD,KAAK,SAAgB,GACnB,MAAM,GAAG,IAAI,CAYf;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,sCAAsC,CAAC;AAKvE;;;;GAIG;AACH,wBAAgB,2BAA2B,CAC1C,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC3B,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,GAC9C,MAAM,EAAE,CAQV;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC1B,aAAa,UAAO,GAClB,MAAM,CAQR;AAED,2FAA2F;AAC3F,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,OAAO,GAAE,MAA+B,GACtC,MAAM,GAAG,IAAI,CAIf;AAED,oFAAoF;AACpF,MAAM,WAAW,mBAAmB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC1C;AAED,yFAAyF;AACzF,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,mBAAmB,GAC3B,MAAM,GAAG,IAAI,CAMf;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAC1C,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,EACrC,OAAO,CAAC,EAAE,mBAAmB,GAC3B,MAAM,EAAE,CAiCV"}
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Webfonts for document fonts the reader has neither installed nor embedded: the bundled Google
3
- * Fonts catalogue, verified metric-compatible clones, weight-variant names, the CSS2 request and
3
+ * Fonts catalogue, verified metric-compatible clones, measured look-alikes, weight-variant names, the CSS2 request and
4
4
  * the faces a document draws. DOM-free; `ooxml-ui`'s `fonts` folder does the browser side.
5
5
  */
6
6
  export { GOOGLE_FONTS_CATALOGUE_DATE, GOOGLE_FONTS_FAMILIES } from './google-fonts-catalogue.js';
7
7
  export { findGoogleFontsFamily } from './google-fonts-lookup.js';
8
8
  export { getGoogleFontsVariants, type GoogleFontsVariant } from './google-fonts-variants.js';
9
+ export { findLookAlikeGoogleFontsFamily } from './look-alikes.js';
9
10
  export { findMetricCompatibleGoogleFontsFamily } from './metric-clones.js';
10
11
  export * from './font-weight-names.js';
11
12
  export * from './google-fonts-request.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text/webfonts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,qCAAqC,EAAE,MAAM,iBAAiB,CAAC;AACxE,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text/webfonts/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,qCAAqC,EAAE,MAAM,iBAAiB,CAAC;AACxE,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The Google Fonts family that looks most like `family`, or `null` when `family` is served under
3
+ * its own name or has no measured look-alike in the catalogue.
4
+ */
5
+ export declare function findLookAlikeGoogleFontsFamily(family: string): string | null;
6
+ /** The weights to request for `family`'s look-alike: the faces regular and bold runs paint with. */
7
+ export interface LookAlikeWeights {
8
+ readonly regular: number;
9
+ readonly bold: number;
10
+ }
11
+ /**
12
+ * The weights to request for `family`'s look-alike, or `undefined` when
13
+ * {@link findLookAlikeGoogleFontsFamily} has none for it.
14
+ */
15
+ export declare function findLookAlikeWeights(family: string): LookAlikeWeights | undefined;
16
+ //# sourceMappingURL=look-alikes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"look-alikes.d.ts","sourceRoot":"","sources":["../../../text/webfonts/look-alikes.ts"],"names":[],"mappings":"AAgEA;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5E;AAED,oGAAoG;AACpG,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAIjF"}
@@ -1 +1 @@
1
- {"version":3,"file":"metric-clones.d.ts","sourceRoot":"","sources":["../../../text/webfonts/metric-clones.ts"],"names":[],"mappings":"AA+CA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnF"}
1
+ {"version":3,"file":"metric-clones.d.ts","sourceRoot":"","sources":["../../../text/webfonts/metric-clones.ts"],"names":[],"mappings":"AAgDA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnF"}
@@ -1,3 +1,4 @@
1
+ import { type WebfontServeOptions } from './google-fonts-request.js';
1
2
  /** One run of text: its family, emphasis and characters. */
2
3
  export interface WebfontRun {
3
4
  family: string | undefined;
@@ -17,7 +18,7 @@ export declare function collectRunFamilies(runs: Iterable<WebfontRun>): Set<stri
17
18
  * The faces the runs draw in `candidates`, grouped by served family, and the candidates the
18
19
  * catalogue does not serve.
19
20
  */
20
- export declare function collectWebfontFaces(runs: Iterable<WebfontRun>, candidates: readonly string[]): {
21
+ export declare function collectWebfontFaces(runs: Iterable<WebfontRun>, candidates: readonly string[], options?: WebfontServeOptions): {
21
22
  faces: Map<string, WebfontFace[]>;
22
23
  unavailable: string[];
23
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"webfont-faces.d.ts","sourceRoot":"","sources":["../../../text/webfonts/webfont-faces.ts"],"names":[],"mappings":"AAaA,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACb;AAED,gGAAgG;AAChG,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnB;AAOD,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAO1E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1B,UAAU,EAAE,SAAS,MAAM,EAAE,GAC3B;IAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CA2B9D"}
1
+ {"version":3,"file":"webfont-faces.d.ts","sourceRoot":"","sources":["../../../text/webfonts/webfont-faces.ts"],"names":[],"mappings":"AAWA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE3F,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACb;AAED,gGAAgG;AAChG,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnB;AAOD,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAO1E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,CAAC,EAAE,mBAAmB,GAC3B;IAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CA6B9D"}
@@ -45128,14 +45128,6 @@ function applyConnectorEdit(roots, root2, edit, check) {
45128
45128
 
45129
45129
  // text/font-metrics/design-advances.generated.ts
45130
45130
  var DESIGN_ADVANCES = {
45131
- aptos: {
45132
- regular: "203.75 292.5 370 537.5 533.75 826.25 642.5 210 292.5 292.5 457.5 533.75 286.25 340 286.25 338.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 286.25 286.25 533.75 533.75 533.75 501.25 895 588.75 603.75 692.5 686.25 556.25 525 708.75 707.5 260 331.25 568.75 500 790 706.25 732.5 577.5 732.5 606.25 566.25 478.75 681.25 585 892.5 552.5 540 516.25 295 338.75 295 533.75 460 551.25 531.25 561.25 525 560 526.25 301.25 485 551.25 238.75 238.75 486.25 260 852.5 551.25 551.25 561.25 560 335 486.25 323.75 558.75 452.5 721.25 442.5 452.5 437.5 295 270 295 533.75",
45133
- bold: "203.75 292.5 420 537.5 533.75 841.25 676.25 232.5 292.5 292.5 457.5 533.75 300 340 300 386.25 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 300 300 533.75 533.75 533.75 517.5 900 620 618.75 706.25 707.5 573.75 536.25 717.5 728.75 293.75 366.25 622.5 511.25 821.25 722.5 737.5 605 737.5 633.75 598.75 505 696.25 616.25 940 598.75 586.25 547.5 337.5 386.25 337.5 533.75 460 551.25 551.25 586.25 548.75 586.25 556.25 335 511.25 578.75 267.5 267.5 533.75 296.25 888.75 578.75 573.75 586.25 586.25 368.75 516.25 355 581.25 493.75 761.25 495 493.75 466.25 337.5 270 337.5 533.75"
45134
- },
45135
- "aptos display": {
45136
- regular: "192.5 246.25 370 528.75 522.5 825 622.5 210 295 295 381.25 522.5 246.25 348.75 246.25 338.75 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 246.25 246.25 522.5 522.5 522.5 486.25 878.75 580 582.5 656.25 655 540 508.75 671.25 661.25 235 317.5 553.75 485 765 681.25 695 556.25 695 590 546.25 477.5 651.25 573.75 886.25 550 535 516.25 295 338.75 295 522.5 460 551.25 488.75 518.75 492.5 518.75 493.75 283.75 440 506.25 210 210 447.5 243.75 800 506.25 512.5 518.75 518.75 310 462.5 303.75 506.25 432.5 716.25 440 432.5 426.25 295 218.75 295 522.5",
45137
- bold: "192.5 261.25 420 561.25 540 838.75 655 232.5 337.5 337.5 428.75 540 261.25 365 261.25 386.25 540 540 540 540 540 540 540 540 540 540 261.25 261.25 540 540 540 502.5 887.5 610 598.75 675 677.5 548.75 516.25 685 682.5 267.5 348.75 602.5 491.25 793.75 696.25 705 585 705 610 573.75 498.75 670 600 921.25 591.25 572.5 547.5 337.5 386.25 337.5 540 460 551.25 507.5 541.25 507.5 542.5 515 317.5 472.5 533.75 240 240 500 278.75 840 533.75 530 541.25 542.5 342.5 483.75 333.75 533.75 475 747.5 488.75 475 450 337.5 251.25 337.5 540"
45138
- },
45139
45131
  arial: {
45140
45132
  regular: "277.83 277.83 354.98 556.15 556.15 889.16 666.99 190.92 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 277.83 277.83 583.98 583.98 583.98 556.15 1015.14 666.99 666.99 722.17 722.17 666.99 610.84 777.83 722.17 277.83 500 666.99 556.15 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 277.83 277.83 277.83 469.24 556.15 333.01 556.15 556.15 500 556.15 556.15 277.83 556.15 556.15 222.17 222.17 500 222.17 833.01 556.15 556.15 556.15 556.15 333.01 500 277.83 556.15 500 722.17 500 500 500 333.98 259.77 333.98 583.98",
45141
45133
  bold: "277.83 333.01 474.12 556.15 556.15 889.16 722.17 237.79 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 333.01 333.01 583.98 583.98 583.98 610.84 975.1 722.17 722.17 722.17 722.17 666.99 610.84 777.83 722.17 277.83 556.15 722.17 610.84 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 333.01 277.83 333.01 583.98 556.15 333.01 556.15 610.84 556.15 610.84 556.15 333.01 610.84 610.84 277.83 277.83 556.15 277.83 889.16 610.84 610.84 610.84 610.84 389.16 556.15 333.01 610.84 556.15 777.83 556.15 556.15 500 389.16 279.79 389.16 583.98"
@@ -45158,6 +45150,38 @@ var DESIGN_ADVANCES = {
45158
45150
  }
45159
45151
  };
45160
45152
 
45153
+ // text/font-metrics/design-advances-powerpoint.generated.ts
45154
+ var POWERPOINT_DESIGN_ADVANCES = {
45155
+ aptos: {
45156
+ regular: "203.75 292.5 370 537.5 533.75 826.25 642.5 210 292.5 292.5 457.5 533.75 286.25 340 286.25 338.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 286.25 286.25 533.75 533.75 533.75 501.25 895 588.75 603.75 692.5 686.25 556.25 525 708.75 707.5 260 331.25 568.75 500 790 706.25 732.5 577.5 732.5 606.25 566.25 478.75 681.25 585 892.5 552.5 540 516.25 295 338.75 295 533.75 460 551.25 531.25 561.25 525 560 526.25 301.25 485 551.25 238.75 238.75 486.25 260 852.5 551.25 551.25 561.25 560 335 486.25 323.75 558.75 452.5 721.25 442.5 452.5 437.5 295 270 295 533.75",
45157
+ bold: "203.75 292.5 420 537.5 533.75 841.25 676.25 232.5 292.5 292.5 457.5 533.75 300 340 300 386.25 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 300 300 533.75 533.75 533.75 517.5 900 620 618.75 706.25 707.5 573.75 536.25 717.5 728.75 293.75 366.25 622.5 511.25 821.25 722.5 737.5 605 737.5 633.75 598.75 505 696.25 616.25 940 598.75 586.25 547.5 337.5 386.25 337.5 533.75 460 551.25 551.25 586.25 548.75 586.25 556.25 335 511.25 578.75 267.5 267.5 533.75 296.25 888.75 578.75 573.75 586.25 586.25 368.75 516.25 355 581.25 493.75 761.25 495 493.75 466.25 337.5 270 337.5 533.75"
45158
+ },
45159
+ "aptos display": {
45160
+ regular: "192.5 246.25 370 528.75 522.5 825 622.5 210 295 295 381.25 522.5 246.25 348.75 246.25 338.75 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 246.25 246.25 522.5 522.5 522.5 486.25 878.75 580 582.5 656.25 655 540 508.75 671.25 661.25 235 317.5 553.75 485 765 681.25 695 556.25 695 590 546.25 477.5 651.25 573.75 886.25 550 535 516.25 295 338.75 295 522.5 460 551.25 488.75 518.75 492.5 518.75 493.75 283.75 440 506.25 210 210 447.5 243.75 800 506.25 512.5 518.75 518.75 310 462.5 303.75 506.25 432.5 716.25 440 432.5 426.25 295 218.75 295 522.5",
45161
+ bold: "192.5 261.25 420 561.25 540 838.75 655 232.5 337.5 337.5 428.75 540 261.25 365 261.25 386.25 540 540 540 540 540 540 540 540 540 540 261.25 261.25 540 540 540 502.5 887.5 610 598.75 675 677.5 548.75 516.25 685 682.5 267.5 348.75 602.5 491.25 793.75 696.25 705 585 705 610 573.75 498.75 670 600 921.25 591.25 572.5 547.5 337.5 386.25 337.5 540 460 551.25 507.5 541.25 507.5 542.5 515 317.5 472.5 533.75 240 240 500 278.75 840 533.75 530 541.25 542.5 342.5 483.75 333.75 533.75 475 747.5 488.75 475 450 337.5 251.25 337.5 540"
45162
+ },
45163
+ "aptos mono": {
45164
+ regular: "600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600",
45165
+ bold: "600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600"
45166
+ },
45167
+ "comic sans ms": {
45168
+ regular: "298.75 237.5 423.75 842.5 693.75 820 653.75 388.75 366.25 366.25 530 480 276.25 416.25 248.75 511.25 610 450 610 610 610 610 610 610 610 610 298.75 298.75 381.25 510 381.25 523.75 931.25 731.25 630 602.5 721.25 625 607.5 680 767.5 546.25 665 611.25 551.25 882.5 797.5 798.75 520 876.25 628.75 693.75 680 736.25 650 1040 723.75 635 693.75 376.25 550 376.25 581.25 627.5 556.25 511.25 593.75 513.75 587.5 547.5 508.75 531.25 577.5 280 403.75 540 273.75 776.25 523.75 526.25 535 520 480 486.25 471.25 520 486.25 683.75 590 520 537.5 366.25 421.25 366.25 597.5",
45169
+ bold: "433.75 237.5 437.5 842.5 693.75 820 653.75 433.75 366.25 366.25 530 610 433.75 610 433.75 511.25 610 610 610 610 610 610 610 610 610 610 433.75 433.75 610 610 610 566.25 931.25 731.25 630 618.75 721.25 625 607.5 680 767.5 546.25 665 611.25 551.25 882.5 812.5 798.75 532.5 876.25 640 693.75 696.25 736.25 675 1040 723.75 635 693.75 376.25 550 376.25 610 627.5 556.25 556.25 593.75 513.75 587.5 558.75 508.75 531.25 577.5 280 403.75 540 273.75 776.25 523.75 526.25 535 520 480 486.25 471.25 520 486.25 683.75 590 552.5 537.5 366.25 421.25 366.25 610"
45170
+ },
45171
+ consolas: {
45172
+ regular: "550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550",
45173
+ bold: "550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550 550"
45174
+ },
45175
+ garamond: {
45176
+ regular: "250 218.75 406.25 666.25 447.5 822.5 728.75 177.5 291.25 291.25 427.5 666.25 218.75 312.5 218.75 500 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 218.75 218.75 666.25 666.25 666.25 365 916.25 677.5 615 635 771.25 656.25 562.5 771.25 760 353.75 333.75 740 572.5 833.75 771.25 781.25 562.5 771.25 625 478.75 615 708.75 677.5 885 697.5 656.25 656.25 271.25 500 271.25 500 500 333.75 406.25 510 416.25 500 416.25 322.5 447.5 510 228.75 228.75 468.75 228.75 771.25 510 510 510 490 333.75 365 291.25 490 468.75 666.25 458.75 416.25 427.5 478.75 500 478.75 666.25",
45177
+ bold: "250 260 552.5 666.25 468.75 833.75 802.5 281.25 353.75 353.75 490 666.25 260 333.75 260 552.5 468.75 396.25 468.75 468.75 468.75 468.75 468.75 468.75 468.75 468.75 260 260 666.25 666.25 666.25 416.25 927.5 656.25 677.5 677.5 781.25 708.75 615 728.75 865 396.25 375 677.5 635 916.25 843.75 791.25 615 791.25 697.5 510 687.5 760 666.25 896.25 687.5 656.25 666.25 365 552.5 365 583.75 500 333.75 478.75 552.5 468.75 552.5 468.75 302.5 541.25 552.5 281.25 260 531.25 260 843.75 552.5 521.25 552.5 552.5 343.75 416.25 312.5 552.5 458.75 708.75 500 468.75 468.75 396.25 541.25 396.25 666.25"
45178
+ },
45179
+ impact: {
45180
+ regular: "176.25 270 370 626.25 547.5 692.5 576.25 185 313.75 313.75 281.25 533.75 167.5 295 185 395 536.25 381.25 502.5 530 500 536.25 541.25 391.25 535 541.25 202.5 202.5 533.75 533.75 533.75 525 775 507.5 552.5 553.75 552.5 415 397.5 551.25 555 287.5 331.25 536.25 380 716.25 541.25 546.25 502.5 546.25 538.75 517.5 461.25 547.5 523.75 815 482.5 473.75 397.5 282.5 395 282.5 483.75 552.5 333.75 503.75 520 495 520 511.25 288.75 518.75 523.75 273.75 280 477.5 273.75 771.25 522.5 511.25 518.75 517.5 357.5 471.25 305 522.5 437.5 670 433.75 448.75 351.25 370 271.25 370 525",
45181
+ bold: "176.25 270 370 627.5 547.5 693.75 576.25 185 313.75 313.75 281.25 533.75 168.75 295 185 396.25 536.25 381.25 502.5 531.25 500 537.5 542.5 392.5 535 542.5 202.5 202.5 533.75 533.75 533.75 525 775 508.75 552.5 553.75 553.75 416.25 398.75 551.25 556.25 288.75 331.25 537.5 381.25 717.5 542.5 547.5 502.5 547.5 538.75 517.5 461.25 547.5 523.75 815 482.5 473.75 397.5 282.5 396.25 282.5 483.75 552.5 333.75 505 520 495 520 511.25 290 518.75 525 275 280 478.75 275 771.25 523.75 511.25 520 518.75 358.75 471.25 305 522.5 437.5 670 433.75 448.75 351.25 370 271.25 370 525"
45182
+ }
45183
+ };
45184
+
45161
45185
  // text/font-metrics/advance-width.ts
45162
45186
  var FIRST = 32;
45163
45187
  var decoded = /* @__PURE__ */ new Map();
@@ -45166,7 +45190,7 @@ function advances(family, bold) {
45166
45190
  const key3 = `${name4}|${bold ? "b" : "r"}`;
45167
45191
  const known = decoded.get(key3);
45168
45192
  if (known) return known;
45169
- const table2 = Object.hasOwn(DESIGN_ADVANCES, name4) ? DESIGN_ADVANCES[name4] : void 0;
45193
+ const table2 = Object.hasOwn(DESIGN_ADVANCES, name4) ? DESIGN_ADVANCES[name4] : Object.hasOwn(POWERPOINT_DESIGN_ADVANCES, name4) ? POWERPOINT_DESIGN_ADVANCES[name4] : void 0;
45170
45194
  if (!table2) return void 0;
45171
45195
  const values = (bold ? table2.bold : table2.regular).split(" ").map(Number);
45172
45196
  decoded.set(key3, values);