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
@@ -1,4 +1,4 @@
1
- import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, readText3DValues, readScene3DValues, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, stageChartPartWithWorkbook, CHART_WORKBOOK_CONTENT_TYPE, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, hasShapeProperties, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, ooxmlGradientAngleToCssDegrees, serializeTabStop, newChartWorkbookLayout, DEFAULT_CHART_SHEET_NAME, writeChartSpace, chartIssuesLostOnWrite, parseChartSpace, joinChartGroups, createChartExSpace, setChartExDataLabelsVisible, writeChartExSpace, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, NEUTRAL_CHART_TYPE_TARGETS, planNeutralChartType, newChartSpace, setChartSeriesSecondaryAxis, editChartSpace, chartModelLabelPositions, setChartExLayout, setChartExSeriesFill, setChartExWaterfall, setChartExBinning, setChartExParentLabelLayout, setChartExBoxWhisker, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, drawingFillXml, removeChartSeries, chartSeriesEntries, moveChartSeries, addChartSeries, setChartSeriesColor, setChartTitleRuns, setChartTitle, setChartTitleVisible, setChartLegend, setChartAxis, setChartGroupOptions, setChartTrendline, setChartErrorBars, setChartSeriesAxis, setChartSeriesOptions, setChartNumericCategories, setChartCategoryLevels, setChartTypedCategories, setChartSeriesXValues, setChartSeriesBubbleSizes, renameChartSeries, setChartSeriesValues, setChartCategories, setChartDataLabels, setChartDataLabelsRange, parseChartFormatTargetKey, setChartTargetText, setChartLegendEntries, setChartAxisTitleText, setChartLayout, setChartDisplayUnitsLabel, setChartProtection, setChartChrome, setChartStyle, setChartView3D, setChartDataTable, setChartSurface, setChartGroupDecorations, clearChartAreaPaint, applyChartAppearance, chartGroupElement, chartPercentUnionValue, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, chartDrawingColorFromHex, chartTrendlineType, chartSeriesEntryAt, numberSource, setChartMarker, editChartShapeProperties, setChartDataLabelFormatting, chartFormatTargetKey, chartTargetDraftShapes, fillAppearancePatch, setChartPointOptions, applyChartManualLayout, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseXml, first, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, buildXml, parseChartUserShapesDrawing, xmlChildren, chartSpaceWorkbookWrites, writeChartSpaceOverSource, applyChartGradientToSpPr, setAutoTitleDeleted, realignOrCollapseRuns, insertAt, replaceFirstText, saveChartWorkbookUpdates, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, appendChartWorkbookSheet, rebaseChartData, writeChartColorChoice, parseChartExSpace, chartExDataChanged, relationshipsPartFor, chartExSpaceWorkbookWrites, writeChartWorkbookUpdates, appendChartExWorkbookData, writeChartExSpaceOverSource, elements, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, setChartExTitle, setChartExLegend, editChartExStyle, editChartExAxis, renameChartExSeries, setChartExSeriesValues, setChartExCategories, parseDrawingEffects, editChartExLabels, removeChartExSeries, addChartExSeries, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, readPictureEffect, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, xmlAttrBool, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, setChartPointLabel, editChartExPointLabel, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, parsePptxJson, pptxDataFromJsonDocument, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, assertChartModelLabelPosition, svgToCustomGeometryPaths, escAttr, ensureContentTypeOverride, buildRelationshipsXml, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, parseDrawingLineDash, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, customGeometryPathsToSvg, base64Encode, patchPictureEffects, cssDegreesToOoxmlGradientAngle, escText, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, parseKinsoku, deobfuscateFont, detectFontFormat, parseDataTable, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartFormulaRange, expandRangeAddresses, parseChartDataPointPictureBlipRel, readDisplayNaAsBlank, extractCxSeriesColor, parseCxDataLabels, parseCxRegionMapOptions, parseCxAxes, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, CHART_STYLE_PARTS, CHART_COLOR_STYLE_NS, readChartStyle, resolveChartStyleDefinition, drawingColorXml, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, decodeBase64, parseSmartArtPresLayoutVars, parseSmartArtConnection, connectionLabel, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, captureDiagramPictures, parseDiagramDrawing, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, collectTransitionText, parseSmartArtQuickStyleLabels, parseDiagramQuickStyle, parseDiagramLayoutSummary, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-7IEQDXTC.mjs';
1
+ import { NS, RELATIONSHIP_TYPES, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, formatAutoNumberMarker, readText3DValues, readScene3DValues, parseParagraphSpacingPx, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseStructuredCustomGeometry, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, evaluateGeometryPaths, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, nextRelationshipId, remapElementShapeIds, normalizeCustomShowIds, mapCustomShowActions, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, parseRelationships, resolvePartPath, orderedXmlKey, safeResolveZipPath, parseDataUrlToBytes, base64Decode, EMU_PER_PX, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, LN_CHILD_ORDER, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, stageChartPartWithWorkbook, CHART_WORKBOOK_CONTENT_TYPE, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, hasShapeProperties, hasTextProperties, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, ooxmlGradientAngleToCssDegrees, serializeTabStop, newChartWorkbookLayout, DEFAULT_CHART_SHEET_NAME, writeChartSpace, chartIssuesLostOnWrite, parseChartSpace, joinChartGroups, createChartExSpace, setChartExDataLabelsVisible, writeChartExSpace, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, NEUTRAL_CHART_TYPE_TARGETS, planNeutralChartType, newChartSpace, setChartSeriesSecondaryAxis, editChartSpace, chartModelLabelPositions, setChartExLayout, setChartExSeriesFill, setChartExWaterfall, setChartExBinning, setChartExParentLabelLayout, setChartExBoxWhisker, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, drawingFillXml, removeChartSeries, chartSeriesEntries, moveChartSeries, addChartSeries, setChartSeriesColor, setChartTitleRuns, setChartTitle, setChartTitleVisible, setChartLegend, setChartAxis, setChartGroupOptions, setChartTrendline, setChartErrorBars, setChartSeriesAxis, setChartSeriesOptions, setChartNumericCategories, setChartCategoryLevels, setChartTypedCategories, setChartSeriesXValues, setChartSeriesBubbleSizes, renameChartSeries, setChartSeriesValues, setChartCategories, setChartDataLabels, setChartDataLabelsRange, parseChartFormatTargetKey, setChartTargetText, setChartLegendEntries, setChartAxisTitleText, setChartLayout, setChartDisplayUnitsLabel, setChartProtection, setChartChrome, setChartStyle, setChartView3D, setChartDataTable, setChartSurface, setChartGroupDecorations, clearChartAreaPaint, applyChartAppearance, chartGroupElement, chartPercentUnionValue, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, chartDrawingColorFromHex, chartTrendlineType, chartSeriesEntryAt, numberSource, setChartMarker, editChartShapeProperties, setChartDataLabelFormatting, chartFormatTargetKey, chartTargetDraftShapes, fillAppearancePatch, setChartPointOptions, applyChartManualLayout, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, buildSaveTimeCustomGeometryXml, applyCustomGeometryGuideOverrides, avLstForPreset, filterValidShapeAdjustmentEntries, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, writeShapeEffects, SHAPE_STYLE_ORDER, CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS, roundCoordinate, scaleVectorToIntegers, EMU_PER_PIXEL, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, reorderObjectKeysByLocalName, getSignaturePathsToStrip, mergeSmartArtPointXml, mergeSmartArtConnectionXml, withDiagramPictureSources, diagramPictureRelationships, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseDiagramDataModel, DEFAULT_GENERATED_DIAGRAM_SCHEME, previewDiagramLayout, parseXml, first, parseDiagramColors, resolveDrawingColor, children, parseDrawingRichTextBody, writeGeneratedDiagramDrawing, descendants, GENERATED_DIAGRAM_CACHE_NS, generatedDrawingDigest, buildXml, parseChartUserShapesDrawing, xmlChildren, chartSpaceWorkbookWrites, writeChartSpaceOverSource, applyChartGradientToSpPr, setAutoTitleDeleted, realignOrCollapseRuns, insertAt, replaceFirstText, saveChartWorkbookUpdates, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, resolveThemeFillStyle, resolveThemeLineStyle, resolveThemeEffectStyle, relAttr, ensureXmlChildren, TC_PR_BORDERS_ORDER, appendChartWorkbookSheet, rebaseChartData, writeChartColorChoice, parseChartExSpace, chartExDataChanged, relationshipsPartFor, chartExSpaceWorkbookWrites, writeChartWorkbookUpdates, appendChartExWorkbookData, writeChartExSpaceOverSource, elements, stripParentDirSegments, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, setChartExTitle, setChartExLegend, editChartExStyle, editChartExAxis, renameChartExSeries, setChartExSeriesValues, setChartExCategories, parseDrawingEffects, editChartExLabels, removeChartExSeries, addChartExSeries, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, picturePercentage, ARTISTIC_PRIMARY_ATTRIBUTE, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, blobUrlToDataUrl, readPictureEffect, isAlternateContentChoiceSupported, SvgExporter, detectStrictConformance, normalizeStrictXml, normalizeStShapeType, applyCustomShows, applySections, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, xmlAttrBool, detectOleObjectType, inferOleExtensionFromTarget, deriveSlideTitles, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, encodeXmlAttributeValue, encodeXmlTextValue, stripXmlOrderMarkers, setChartPointLabel, editChartExPointLabel, MIN_ELEMENT_SIZE, createDrawingObjectId, DEFAULT_TEXT_FONT_SIZE, EncryptedFileError, decodePptxJsonText, parsePptxJson, pptxDataFromJsonDocument, applyImportedPptxData, DEFAULT_CHART_GRADIENT_ANGLE, supportsChartGradientFill, assertChartModelLabelPosition, svgToCustomGeometryPaths, escAttr, ensureContentTypeOverride, buildRelationshipsXml, MIN_TABLE_DIMENSION, MAX_TABLE_DIMENSION, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, effectChild, mergeEffectNode, mergeAttributeEffectNode, parseDrawingLineDash, estimateMediaDurationMs, parseVmlElements, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, IncorrectPasswordError, applyThemeToData, detectFileFormat, parseOle2, decryptPptx, encryptPptx, customGeometryPathsToSvg, base64Encode, patchPictureEffects, cssDegreesToOoxmlGradientAngle, escText, parseLineSpacingMultiplier, parseLineSpacingExactPt, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, PML_XMLNS, solidFill, esc, OOXML_PERCENT_UNITS, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, emu, formatSchemeKey, gradFill, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, parseKinsoku, deobfuscateFont, detectFontFormat, parseDataTable, parseChartAxes, parseBubbleChartOptions, extractGuidFromPartName, parseChartLayouts, parseCxChartSeries, parseChartFormulaRange, expandRangeAddresses, parseChartDataPointPictureBlipRel, readDisplayNaAsBlank, extractCxSeriesColor, parseCxDataLabels, parseCxRegionMapOptions, parseCxAxes, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, CHART_STYLE_PARTS, CHART_COLOR_STYLE_NS, readChartStyle, resolveChartStyleDefinition, drawingColorXml, EMU_PER_POINT, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, decodeBase64, parseSmartArtPresLayoutVars, parseSmartArtConnection, connectionLabel, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, captureDiagramPictures, parseDiagramDrawing, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, collectTransitionText, parseSmartArtQuickStyleLabels, parseDiagramQuickStyle, parseDiagramLayoutSummary, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, getElementOrientationMatrix, isTextOrientationMatrix, TEXT_ORIENTATION_IDENTITY, multiplyTextOrientationMatrices } from './chunk-MX2GFMZS.mjs';
2
2
  import { openPptxZip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, MAX_ZIP_ENTRY_COUNT, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError } from './chunk-U7YXYOA7.mjs';
3
3
  import { resolveSmartArtLayoutCategory } from './chunk-2N7RZQLC.mjs';
4
4
  import { cloneXmlObject, applySmartArtLayoutDefinition, cloneSlide, parseSmartArtLayoutDefinition } from './chunk-VDUNZTJC.mjs';
@@ -41723,6 +41723,7 @@ var SIGNATURE_SKIP_KEYS = /* @__PURE__ */ new Set([
41723
41723
  "rawXml",
41724
41724
  "src",
41725
41725
  "imageData",
41726
+ "svgData",
41726
41727
  "embeddedData",
41727
41728
  "posterSrc",
41728
41729
  "thumbnailSrc"
@@ -86353,6 +86354,34 @@ var PptxHandlerRuntime100 = class _PptxHandlerRuntime extends PptxHandlerRuntime
86353
86354
  }
86354
86355
  };
86355
86356
 
86357
+ // pptx/core/core/runtime/resolve-template-images.ts
86358
+ async function resolveTemplateImages(elements2, getImageData) {
86359
+ const images = /* @__PURE__ */ new Map();
86360
+ const pending = [...elements2];
86361
+ for (const element of pending) {
86362
+ if (element.type === "group") {
86363
+ for (const child15 of element.children) pending.push(child15);
86364
+ }
86365
+ if (element.type !== "picture" && element.type !== "image") continue;
86366
+ for (const [field, path] of [
86367
+ ["imageData", element.imagePath],
86368
+ ["svgData", element.svgPath]
86369
+ ]) {
86370
+ if (element[field] || !path || /^(?:https?:|data:|blob:)/u.test(path)) continue;
86371
+ const refs = images.get(path) ?? [];
86372
+ refs.push({ target: element, field });
86373
+ images.set(path, refs);
86374
+ }
86375
+ }
86376
+ for (const [path, refs] of images) {
86377
+ const data = await getImageData(path);
86378
+ if (data) {
86379
+ for (const { target, field } of refs) target[field] = data;
86380
+ }
86381
+ }
86382
+ return elements2;
86383
+ }
86384
+
86356
86385
  // pptx/core/core/runtime/PptxHandlerRuntimeLoadPipeline.ts
86357
86386
  var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
86358
86387
  async buildLoadData(presentationState, slidesWithWarnings, slideMasters, embedded) {
@@ -86683,7 +86712,10 @@ var PptxHandlerRuntime101 = class extends PptxHandlerRuntime100 {
86683
86712
  if (slideXml3 && this.extractShowMasterShapes(slideXml3) === false) {
86684
86713
  return [];
86685
86714
  }
86686
- return this.getLayoutElements(slideId);
86715
+ return resolveTemplateImages(
86716
+ await this.getLayoutElements(slideId),
86717
+ (path) => this.getImageData(path)
86718
+ );
86687
86719
  }
86688
86720
  /**
86689
86721
  * Get layouts available for a specific slide, scoped to that slide's
@@ -1,4 +1,4 @@
1
- import { hasTextProperties } from './chunk-7IEQDXTC.mjs';
1
+ import { hasTextProperties } from './chunk-MX2GFMZS.mjs';
2
2
  import { cloneSlide } from './chunk-VDUNZTJC.mjs';
3
3
 
4
4
  // pptx/core/builders/sdk/merge-operations.ts
@@ -1,6 +1,6 @@
1
- import { findText, replaceText, replaceTextInSlide, mergePresentation } from './chunk-JV7SMDBE.mjs';
2
- import { PresentationBuilder, PptxHandler, SlideBuilder, validateSeriesIndex, removeEmptyDataPoint, ensureDataPoint, ensureChartData, assertChartGradientSupported, toChartGradientFill, countExistingLayouts, addLayoutToSlideMaster, addLayoutContentType, createLayout, STANDARD_LAYOUTS, generateLayoutXml, layoutRelsXml, createTextElement, createShapeElement, createImageElement, createTableElement, createChartElement, createConnectorElement, createMediaElement, createGroupElement, clonePartGraph, buildBlankPresentationArchive, FILL_CHOICE_ELEMENTS, relativePartTarget, PptxXmlBuilder } from './chunk-WUWAERVF.mjs';
3
- import { SP_PR_ORDER, EMU_PER_PIXEL, EMU_PER_INCH, parseXml, first, relationshipsPartFor, parseRelationships, resolvePartPath, elements, buildXml, buildRelationshipsXml, bytesToBase64, base64ToBytes, LN_CHILD_ORDER, BLIP_FILL_ORDER, EFFECT_LST_ORDER, SHAPE_STYLE_ORDER, TC_PR_BORDERS_ORDER, hasTextProperties, nextRelationshipId, escAttr, NS } from './chunk-7IEQDXTC.mjs';
1
+ import { findText, replaceText, replaceTextInSlide, mergePresentation } from './chunk-VLKUMQGT.mjs';
2
+ import { PresentationBuilder, PptxHandler, SlideBuilder, validateSeriesIndex, removeEmptyDataPoint, ensureDataPoint, ensureChartData, assertChartGradientSupported, toChartGradientFill, countExistingLayouts, addLayoutToSlideMaster, addLayoutContentType, createLayout, STANDARD_LAYOUTS, generateLayoutXml, layoutRelsXml, createTextElement, createShapeElement, createImageElement, createTableElement, createChartElement, createConnectorElement, createMediaElement, createGroupElement, clonePartGraph, buildBlankPresentationArchive, FILL_CHOICE_ELEMENTS, relativePartTarget, PptxXmlBuilder } from './chunk-VK2G4BGX.mjs';
3
+ import { SP_PR_ORDER, EMU_PER_PIXEL, EMU_PER_INCH, parseXml, first, relationshipsPartFor, parseRelationships, resolvePartPath, elements, buildXml, buildRelationshipsXml, bytesToBase64, base64ToBytes, LN_CHILD_ORDER, BLIP_FILL_ORDER, EFFECT_LST_ORDER, SHAPE_STYLE_ORDER, TC_PR_BORDERS_ORDER, hasTextProperties, nextRelationshipId, escAttr, NS } from './chunk-MX2GFMZS.mjs';
4
4
  import { openPptxZip, openZip } from './chunk-U7YXYOA7.mjs';
5
5
  import { cloneSlide, cloneElement } from './chunk-VDUNZTJC.mjs';
6
6
 
@@ -14696,7 +14696,7 @@ async function setPresentationRunText(bytes, slideIndex, elementId, runIndex, te
14696
14696
  async function createPresentationFromOutline(slides, options = {}) {
14697
14697
  if (!(slides instanceof Array) || !slides.length || slides.length > 200)
14698
14698
  throw new Error("A presentation outline has 1 to 200 slides");
14699
- const { PresentationBuilder: PresentationBuilder2 } = await import('./PresentationBuilder-TFZ77BHK.mjs');
14699
+ const { PresentationBuilder: PresentationBuilder2 } = await import('./PresentationBuilder-ZOOVSBPR.mjs');
14700
14700
  const { handler, data, createSlide } = await PresentationBuilder2.create({
14701
14701
  ...options.title ? { title: options.title } : {}
14702
14702
  });
package/dist/index.cjs CHANGED
@@ -23366,6 +23366,7 @@ __export(text_exports, {
23366
23366
  detectFontScript: () => detectFontScript,
23367
23367
  distributeRunsText: () => distributeRunsText,
23368
23368
  findGoogleFontsFamily: () => findGoogleFontsFamily,
23369
+ findLookAlikeGoogleFontsFamily: () => findLookAlikeGoogleFontsFamily,
23369
23370
  findMetricCompatibleGoogleFontsFamily: () => findMetricCompatibleGoogleFontsFamily,
23370
23371
  fontStyleShorthand: () => fontStyleShorthand,
23371
23372
  fontWeightAttribute: () => fontWeightAttribute,
@@ -23771,14 +23772,6 @@ function changeTextCaseRanges(text3, mode, boundaries = []) {
23771
23772
 
23772
23773
  // text/font-metrics/design-advances.generated.ts
23773
23774
  var DESIGN_ADVANCES = {
23774
- aptos: {
23775
- 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",
23776
- 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"
23777
- },
23778
- "aptos display": {
23779
- 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",
23780
- 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"
23781
- },
23782
23775
  arial: {
23783
23776
  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",
23784
23777
  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"
@@ -23801,6 +23794,38 @@ var DESIGN_ADVANCES = {
23801
23794
  }
23802
23795
  };
23803
23796
 
23797
+ // text/font-metrics/design-advances-powerpoint.generated.ts
23798
+ var POWERPOINT_DESIGN_ADVANCES = {
23799
+ aptos: {
23800
+ 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",
23801
+ 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"
23802
+ },
23803
+ "aptos display": {
23804
+ 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",
23805
+ 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"
23806
+ },
23807
+ "aptos mono": {
23808
+ 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",
23809
+ 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"
23810
+ },
23811
+ "comic sans ms": {
23812
+ 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",
23813
+ 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"
23814
+ },
23815
+ consolas: {
23816
+ 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",
23817
+ 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"
23818
+ },
23819
+ garamond: {
23820
+ 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",
23821
+ 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"
23822
+ },
23823
+ impact: {
23824
+ 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",
23825
+ 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"
23826
+ }
23827
+ };
23828
+
23804
23829
  // text/font-metrics/advance-width.ts
23805
23830
  var FIRST = 32;
23806
23831
  var decoded = /* @__PURE__ */ new Map();
@@ -23809,7 +23834,7 @@ function advances(family, bold) {
23809
23834
  const key = `${name2}|${bold ? "b" : "r"}`;
23810
23835
  const known = decoded.get(key);
23811
23836
  if (known) return known;
23812
- const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : void 0;
23837
+ const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : Object.hasOwn(POWERPOINT_DESIGN_ADVANCES, name2) ? POWERPOINT_DESIGN_ADVANCES[name2] : void 0;
23813
23838
  if (!table) return void 0;
23814
23839
  const values = (bold ? table.bold : table.regular).split(" ").map(Number);
23815
23840
  decoded.set(key, values);
@@ -26885,6 +26910,29 @@ function getGoogleFontsVariants(family) {
26885
26910
  return result;
26886
26911
  }
26887
26912
 
26913
+ // text/webfonts/look-alikes.ts
26914
+ var LOOK_ALIKES = {
26915
+ aptos: { family: "Gantari", regularWeight: 400, boldWeight: 650 },
26916
+ "aptos display": { family: "Gantari", regularWeight: 400, boldWeight: 650 },
26917
+ "aptos mono": { family: "Sometype Mono", regularWeight: 500, boldWeight: 700 },
26918
+ consolas: { family: "Overpass Mono", regularWeight: 500, boldWeight: 700 },
26919
+ "comic sans ms": { family: "Comic Relief", regularWeight: 400, boldWeight: 700 },
26920
+ garamond: { family: "EB Garamond", regularWeight: 400, boldWeight: 600 },
26921
+ impact: { family: "Anton", regularWeight: 400, boldWeight: 400 }
26922
+ };
26923
+ function findLookAlikeGoogleFontsFamily(family) {
26924
+ if (findGoogleFontsFamily(family) !== null) {
26925
+ return null;
26926
+ }
26927
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
26928
+ return lookAlike ? findGoogleFontsFamily(lookAlike.family) : null;
26929
+ }
26930
+ function findLookAlikeWeights(family) {
26931
+ if (findLookAlikeGoogleFontsFamily(family) === null) return void 0;
26932
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
26933
+ return lookAlike ? { regular: lookAlike.regularWeight, bold: lookAlike.boldWeight } : void 0;
26934
+ }
26935
+
26888
26936
  // text/webfonts/metric-clones.ts
26889
26937
  var METRIC_COMPATIBLE_CLONES = {
26890
26938
  Calibri: "Carlito",
@@ -27064,9 +27112,11 @@ function selectGoogleWebfontFamilies(referenced, embedded, isLocallyInstalled) {
27064
27112
  }
27065
27113
  return selected;
27066
27114
  }
27067
- function buildGoogleFontsFragment(family, weights) {
27068
- const sorted = [.../* @__PURE__ */ new Set([400, 700, ...weights ?? []])].sort((a2, b) => a2 - b);
27069
- if (sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
27115
+ function buildGoogleFontsFragment(family, weights, standardFaces = true) {
27116
+ const sorted = [.../* @__PURE__ */ new Set([...standardFaces ? [400, 700] : [], ...weights ?? []])].sort(
27117
+ (a2, b) => a2 - b
27118
+ );
27119
+ if (standardFaces && sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
27070
27120
  const tuples = [0, 1].flatMap((ital) => sorted.map((weight) => `${ital},${weight}`));
27071
27121
  return `${family}:ital,wght@${tuples.join(";")}`;
27072
27122
  }
@@ -27075,14 +27125,15 @@ function buildGoogleFontsHref(fragments, baseUrl = GOOGLE_FONTS_CSS2_BASE) {
27075
27125
  const query = fragments.map((fragment3) => `family=${encodeURIComponent(fragment3)}`).join("&");
27076
27126
  return `${baseUrl}?${query}&${DISPLAY_PARAM}`;
27077
27127
  }
27078
- function servedGoogleFontsFamily(family) {
27079
- return resolveGoogleFontsFace(family)?.family ?? findMetricCompatibleGoogleFontsFamily(family);
27128
+ function servedGoogleFontsFamily(family, options2) {
27129
+ return resolveGoogleFontsFace(family)?.family ?? (options2?.lookAlikes ? findLookAlikeGoogleFontsFamily(family) : null) ?? findMetricCompatibleGoogleFontsFamily(family);
27080
27130
  }
27081
- function matchGoogleWebfontFragments(families, onResolved) {
27131
+ function matchGoogleWebfontFragments(families, onResolved, options2) {
27082
27132
  const weightsByFamily = /* @__PURE__ */ new Map();
27133
+ const standardFamilies = /* @__PURE__ */ new Set();
27083
27134
  for (const family of families) {
27084
27135
  const face = resolveGoogleFontsFace(family);
27085
- const canonical = face?.family ?? findMetricCompatibleGoogleFontsFamily(family);
27136
+ const canonical = face?.family ?? servedGoogleFontsFamily(family, options2);
27086
27137
  if (canonical === null) continue;
27087
27138
  onResolved?.(family);
27088
27139
  let weights = weightsByFamily.get(canonical);
@@ -27090,12 +27141,21 @@ function matchGoogleWebfontFragments(families, onResolved) {
27090
27141
  weights = /* @__PURE__ */ new Set();
27091
27142
  weightsByFamily.set(canonical, weights);
27092
27143
  }
27144
+ const lookAlike = !face && options2?.lookAlikes ? findLookAlikeWeights(family) : void 0;
27145
+ if (lookAlike && findLookAlikeGoogleFontsFamily(family) === canonical) {
27146
+ weights.add(lookAlike.regular);
27147
+ weights.add(lookAlike.bold);
27148
+ } else {
27149
+ standardFamilies.add(canonical);
27150
+ }
27093
27151
  if (face?.weight !== void 0) {
27094
27152
  weights.add(face.weight);
27095
27153
  weights.add(Math.max(700, face.weight));
27096
27154
  }
27097
27155
  }
27098
- return [...weightsByFamily].sort(([a2], [b]) => a2 < b ? -1 : a2 > b ? 1 : 0).map(([family, weights]) => buildGoogleFontsFragment(family, weights));
27156
+ return [...weightsByFamily].sort(([a2], [b]) => a2 < b ? -1 : a2 > b ? 1 : 0).map(
27157
+ ([family, weights]) => buildGoogleFontsFragment(family, weights, standardFamilies.has(family))
27158
+ );
27099
27159
  }
27100
27160
 
27101
27161
  // text/webfonts/webfont-faces.ts
@@ -27109,15 +27169,17 @@ function collectRunFamilies(runs) {
27109
27169
  }
27110
27170
  return families;
27111
27171
  }
27112
- function collectWebfontFaces(runs, candidates) {
27172
+ function collectWebfontFaces(runs, candidates, options2) {
27113
27173
  const wanted = new Set(candidates);
27114
- const unavailable = candidates.filter((family) => servedGoogleFontsFamily(family) === null);
27174
+ const unavailable = candidates.filter(
27175
+ (family) => servedGoogleFontsFamily(family, options2) === null
27176
+ );
27115
27177
  const faces = /* @__PURE__ */ new Map();
27116
27178
  const byFont = /* @__PURE__ */ new Map();
27117
27179
  for (const run2 of runs) {
27118
27180
  const family = run2.family?.trim();
27119
27181
  if (!family || !wanted.has(family)) continue;
27120
- const served = servedGoogleFontsFamily(family);
27182
+ const served = servedGoogleFontsFamily(family, options2);
27121
27183
  if (served === null) continue;
27122
27184
  const weight = resolveFontWeight(family, run2.bold);
27123
27185
  const style = resolveFontItalic(family, run2.italic) ? "italic " : "";
package/dist/index.mjs CHANGED
@@ -23341,6 +23341,7 @@ __export(text_exports, {
23341
23341
  detectFontScript: () => detectFontScript,
23342
23342
  distributeRunsText: () => distributeRunsText,
23343
23343
  findGoogleFontsFamily: () => findGoogleFontsFamily,
23344
+ findLookAlikeGoogleFontsFamily: () => findLookAlikeGoogleFontsFamily,
23344
23345
  findMetricCompatibleGoogleFontsFamily: () => findMetricCompatibleGoogleFontsFamily,
23345
23346
  fontStyleShorthand: () => fontStyleShorthand,
23346
23347
  fontWeightAttribute: () => fontWeightAttribute,
@@ -23746,14 +23747,6 @@ function changeTextCaseRanges(text3, mode, boundaries = []) {
23746
23747
 
23747
23748
  // text/font-metrics/design-advances.generated.ts
23748
23749
  var DESIGN_ADVANCES = {
23749
- aptos: {
23750
- 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",
23751
- 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"
23752
- },
23753
- "aptos display": {
23754
- 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",
23755
- 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"
23756
- },
23757
23750
  arial: {
23758
23751
  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",
23759
23752
  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"
@@ -23776,6 +23769,38 @@ var DESIGN_ADVANCES = {
23776
23769
  }
23777
23770
  };
23778
23771
 
23772
+ // text/font-metrics/design-advances-powerpoint.generated.ts
23773
+ var POWERPOINT_DESIGN_ADVANCES = {
23774
+ aptos: {
23775
+ 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",
23776
+ 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"
23777
+ },
23778
+ "aptos display": {
23779
+ 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",
23780
+ 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"
23781
+ },
23782
+ "aptos mono": {
23783
+ 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",
23784
+ 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"
23785
+ },
23786
+ "comic sans ms": {
23787
+ 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",
23788
+ 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"
23789
+ },
23790
+ consolas: {
23791
+ 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",
23792
+ 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"
23793
+ },
23794
+ garamond: {
23795
+ 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",
23796
+ 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"
23797
+ },
23798
+ impact: {
23799
+ 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",
23800
+ 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"
23801
+ }
23802
+ };
23803
+
23779
23804
  // text/font-metrics/advance-width.ts
23780
23805
  var FIRST = 32;
23781
23806
  var decoded = /* @__PURE__ */ new Map();
@@ -23784,7 +23809,7 @@ function advances(family, bold) {
23784
23809
  const key = `${name2}|${bold ? "b" : "r"}`;
23785
23810
  const known = decoded.get(key);
23786
23811
  if (known) return known;
23787
- const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : void 0;
23812
+ const table = Object.hasOwn(DESIGN_ADVANCES, name2) ? DESIGN_ADVANCES[name2] : Object.hasOwn(POWERPOINT_DESIGN_ADVANCES, name2) ? POWERPOINT_DESIGN_ADVANCES[name2] : void 0;
23788
23813
  if (!table) return void 0;
23789
23814
  const values = (bold ? table.bold : table.regular).split(" ").map(Number);
23790
23815
  decoded.set(key, values);
@@ -26860,6 +26885,29 @@ function getGoogleFontsVariants(family) {
26860
26885
  return result;
26861
26886
  }
26862
26887
 
26888
+ // text/webfonts/look-alikes.ts
26889
+ var LOOK_ALIKES = {
26890
+ aptos: { family: "Gantari", regularWeight: 400, boldWeight: 650 },
26891
+ "aptos display": { family: "Gantari", regularWeight: 400, boldWeight: 650 },
26892
+ "aptos mono": { family: "Sometype Mono", regularWeight: 500, boldWeight: 700 },
26893
+ consolas: { family: "Overpass Mono", regularWeight: 500, boldWeight: 700 },
26894
+ "comic sans ms": { family: "Comic Relief", regularWeight: 400, boldWeight: 700 },
26895
+ garamond: { family: "EB Garamond", regularWeight: 400, boldWeight: 600 },
26896
+ impact: { family: "Anton", regularWeight: 400, boldWeight: 400 }
26897
+ };
26898
+ function findLookAlikeGoogleFontsFamily(family) {
26899
+ if (findGoogleFontsFamily(family) !== null) {
26900
+ return null;
26901
+ }
26902
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
26903
+ return lookAlike ? findGoogleFontsFamily(lookAlike.family) : null;
26904
+ }
26905
+ function findLookAlikeWeights(family) {
26906
+ if (findLookAlikeGoogleFontsFamily(family) === null) return void 0;
26907
+ const lookAlike = LOOK_ALIKES[family.trim().toLowerCase()];
26908
+ return lookAlike ? { regular: lookAlike.regularWeight, bold: lookAlike.boldWeight } : void 0;
26909
+ }
26910
+
26863
26911
  // text/webfonts/metric-clones.ts
26864
26912
  var METRIC_COMPATIBLE_CLONES = {
26865
26913
  Calibri: "Carlito",
@@ -27039,9 +27087,11 @@ function selectGoogleWebfontFamilies(referenced, embedded, isLocallyInstalled) {
27039
27087
  }
27040
27088
  return selected;
27041
27089
  }
27042
- function buildGoogleFontsFragment(family, weights) {
27043
- const sorted = [.../* @__PURE__ */ new Set([400, 700, ...weights ?? []])].sort((a2, b) => a2 - b);
27044
- if (sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
27090
+ function buildGoogleFontsFragment(family, weights, standardFaces = true) {
27091
+ const sorted = [.../* @__PURE__ */ new Set([...standardFaces ? [400, 700] : [], ...weights ?? []])].sort(
27092
+ (a2, b) => a2 - b
27093
+ );
27094
+ if (standardFaces && sorted.length === 2) return `${family}:${GOOGLE_WEBFONT_AXIS}`;
27045
27095
  const tuples = [0, 1].flatMap((ital) => sorted.map((weight) => `${ital},${weight}`));
27046
27096
  return `${family}:ital,wght@${tuples.join(";")}`;
27047
27097
  }
@@ -27050,14 +27100,15 @@ function buildGoogleFontsHref(fragments, baseUrl = GOOGLE_FONTS_CSS2_BASE) {
27050
27100
  const query = fragments.map((fragment3) => `family=${encodeURIComponent(fragment3)}`).join("&");
27051
27101
  return `${baseUrl}?${query}&${DISPLAY_PARAM}`;
27052
27102
  }
27053
- function servedGoogleFontsFamily(family) {
27054
- return resolveGoogleFontsFace(family)?.family ?? findMetricCompatibleGoogleFontsFamily(family);
27103
+ function servedGoogleFontsFamily(family, options2) {
27104
+ return resolveGoogleFontsFace(family)?.family ?? (options2?.lookAlikes ? findLookAlikeGoogleFontsFamily(family) : null) ?? findMetricCompatibleGoogleFontsFamily(family);
27055
27105
  }
27056
- function matchGoogleWebfontFragments(families, onResolved) {
27106
+ function matchGoogleWebfontFragments(families, onResolved, options2) {
27057
27107
  const weightsByFamily = /* @__PURE__ */ new Map();
27108
+ const standardFamilies = /* @__PURE__ */ new Set();
27058
27109
  for (const family of families) {
27059
27110
  const face = resolveGoogleFontsFace(family);
27060
- const canonical = face?.family ?? findMetricCompatibleGoogleFontsFamily(family);
27111
+ const canonical = face?.family ?? servedGoogleFontsFamily(family, options2);
27061
27112
  if (canonical === null) continue;
27062
27113
  onResolved?.(family);
27063
27114
  let weights = weightsByFamily.get(canonical);
@@ -27065,12 +27116,21 @@ function matchGoogleWebfontFragments(families, onResolved) {
27065
27116
  weights = /* @__PURE__ */ new Set();
27066
27117
  weightsByFamily.set(canonical, weights);
27067
27118
  }
27119
+ const lookAlike = !face && options2?.lookAlikes ? findLookAlikeWeights(family) : void 0;
27120
+ if (lookAlike && findLookAlikeGoogleFontsFamily(family) === canonical) {
27121
+ weights.add(lookAlike.regular);
27122
+ weights.add(lookAlike.bold);
27123
+ } else {
27124
+ standardFamilies.add(canonical);
27125
+ }
27068
27126
  if (face?.weight !== void 0) {
27069
27127
  weights.add(face.weight);
27070
27128
  weights.add(Math.max(700, face.weight));
27071
27129
  }
27072
27130
  }
27073
- return [...weightsByFamily].sort(([a2], [b]) => a2 < b ? -1 : a2 > b ? 1 : 0).map(([family, weights]) => buildGoogleFontsFragment(family, weights));
27131
+ return [...weightsByFamily].sort(([a2], [b]) => a2 < b ? -1 : a2 > b ? 1 : 0).map(
27132
+ ([family, weights]) => buildGoogleFontsFragment(family, weights, standardFamilies.has(family))
27133
+ );
27074
27134
  }
27075
27135
 
27076
27136
  // text/webfonts/webfont-faces.ts
@@ -27084,15 +27144,17 @@ function collectRunFamilies(runs) {
27084
27144
  }
27085
27145
  return families;
27086
27146
  }
27087
- function collectWebfontFaces(runs, candidates) {
27147
+ function collectWebfontFaces(runs, candidates, options2) {
27088
27148
  const wanted = new Set(candidates);
27089
- const unavailable = candidates.filter((family) => servedGoogleFontsFamily(family) === null);
27149
+ const unavailable = candidates.filter(
27150
+ (family) => servedGoogleFontsFamily(family, options2) === null
27151
+ );
27090
27152
  const faces = /* @__PURE__ */ new Map();
27091
27153
  const byFont = /* @__PURE__ */ new Map();
27092
27154
  for (const run2 of runs) {
27093
27155
  const family = run2.family?.trim();
27094
27156
  if (!family || !wanted.has(family)) continue;
27095
- const served = servedGoogleFontsFamily(family);
27157
+ const served = servedGoogleFontsFamily(family, options2);
27096
27158
  if (served === null) continue;
27097
27159
  const weight = resolveFontWeight(family, run2.bold);
27098
27160
  const style = resolveFontItalic(family, run2.italic) ? "italic " : "";