@superdoc-dev/cli 0.16.0-next.22 → 0.16.0-next.23

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 (2) hide show
  1. package/dist/index.js +262 -86
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -230111,7 +230111,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
230111
230111
  init_remark_gfm_BhnWr3yf_es();
230112
230112
  });
230113
230113
 
230114
- // ../../packages/superdoc/dist/chunks/src-B1aSE-tB.es.js
230114
+ // ../../packages/superdoc/dist/chunks/src-DvgAvHbj.es.js
230115
230115
  function deleteProps(obj, propOrProps) {
230116
230116
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
230117
230117
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -270407,8 +270407,8 @@ function resolveFontFamily2(logicalFamily) {
270407
270407
  function resolvePhysicalFamily(cssFontFamily) {
270408
270408
  return defaultResolver.resolvePhysicalFamily(cssFontFamily);
270409
270409
  }
270410
- function resolvePrimaryPhysicalFamily(family$1) {
270411
- return defaultResolver.resolvePrimaryPhysicalFamily(family$1);
270410
+ function resolveFace(logicalFamily, face, hasFace) {
270411
+ return defaultResolver.resolveFace(logicalFamily, face, hasFace);
270412
270412
  }
270413
270413
  function getFontConfigVersion() {
270414
270414
  return fontConfigVersion;
@@ -270518,6 +270518,40 @@ function buildFontReport(logicalFamilies, registry2, resolver2) {
270518
270518
  }
270519
270519
  return report;
270520
270520
  }
270521
+ function buildFaceReport(usedFaces, registry2, resolver2) {
270522
+ const hasFace = (family$1, weight, style2) => registry2.hasFace(family$1, weight, style2);
270523
+ const seen = /* @__PURE__ */ new Set;
270524
+ const report = [];
270525
+ for (const { logicalFamily, weight, style: style2 } of usedFaces) {
270526
+ if (!logicalFamily)
270527
+ continue;
270528
+ const key2 = `${logicalFamily.toLowerCase()}|${weight}|${style2}`;
270529
+ if (seen.has(key2))
270530
+ continue;
270531
+ seen.add(key2);
270532
+ const face = {
270533
+ weight,
270534
+ style: style2
270535
+ };
270536
+ const { physicalFamily, reason } = resolver2 ? resolver2.resolveFace(logicalFamily, face, hasFace) : resolveFace(logicalFamily, face, hasFace);
270537
+ const loadStatus = registry2.getFaceStatus({
270538
+ family: physicalFamily,
270539
+ weight,
270540
+ style: style2
270541
+ });
270542
+ const missing = reason === "fallback_face_absent" || isSettled(loadStatus) && loadStatus !== "loaded";
270543
+ report.push({
270544
+ logicalFamily,
270545
+ physicalFamily,
270546
+ reason,
270547
+ loadStatus,
270548
+ exportFamily: logicalFamily,
270549
+ missing,
270550
+ face
270551
+ });
270552
+ }
270553
+ return report;
270554
+ }
270521
270555
  function quoteFamily(family$1) {
270522
270556
  return `"${family$1.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
270523
270557
  }
@@ -286067,7 +286101,11 @@ function buildFontString$1(run2, fontContext) {
286067
286101
  if (run2.bold)
286068
286102
  parts.push("bold");
286069
286103
  parts.push(`${normalizeFontSize$1(run2.fontSize)}px`);
286070
- const physicalFamily = normalizeFontFamily$1(fontContext.resolvePhysical(normalizeFontFamily$1(run2.fontFamily)));
286104
+ const face = {
286105
+ weight: run2.bold ? "700" : "400",
286106
+ style: run2.italic ? "italic" : "normal"
286107
+ };
286108
+ const physicalFamily = normalizeFontFamily$1(fontContext.resolvePhysical(normalizeFontFamily$1(run2.fontFamily), face));
286071
286109
  parts.push(toCssFontFamily(physicalFamily) ?? physicalFamily);
286072
286110
  return parts.join(" ");
286073
286111
  }
@@ -286174,6 +286212,12 @@ function getCanvasContext() {
286174
286212
  }
286175
286213
  return canvasContext;
286176
286214
  }
286215
+ function faceOf(run2) {
286216
+ return {
286217
+ weight: run2.bold ? "700" : "400",
286218
+ style: run2.italic ? "italic" : "normal"
286219
+ };
286220
+ }
286177
286221
  function buildFontString(run2, fontContext) {
286178
286222
  const parts = [];
286179
286223
  if (run2.italic)
@@ -286181,7 +286225,7 @@ function buildFontString(run2, fontContext) {
286181
286225
  if (run2.bold)
286182
286226
  parts.push("bold");
286183
286227
  parts.push(`${run2.fontSize}px`);
286184
- const physicalFamily = fontContext.resolvePhysical(run2.fontFamily);
286228
+ const physicalFamily = fontContext.resolvePhysical(run2.fontFamily, faceOf(run2));
286185
286229
  if (measurementConfig.mode === "deterministic")
286186
286230
  parts.push(measurementConfig.fonts.fallbackStack.length > 0 ? measurementConfig.fonts.fallbackStack.join(", ") : measurementConfig.fonts.deterministicFamily);
286187
286231
  else
@@ -286248,7 +286292,7 @@ function lineHeightFontSize(run2) {
286248
286292
  }
286249
286293
  function getFontInfoFromRun(run2, fontContext) {
286250
286294
  return {
286251
- fontFamily: normalizeFontFamily(fontContext.resolvePhysical(run2.fontFamily)),
286295
+ fontFamily: normalizeFontFamily(fontContext.resolvePhysical(run2.fontFamily, faceOf(run2))),
286252
286296
  fontSize: normalizeFontSize2(lineHeightFontSize(run2)),
286253
286297
  bold: run2.bold,
286254
286298
  italic: run2.italic
@@ -287051,7 +287095,7 @@ async function measureParagraphBlock(block, maxWidth, fontContext) {
287051
287095
  if (isFieldAnnotationRun(run2)) {
287052
287096
  const displayText = applyTextTransform(run2.displayLabel || "", run2);
287053
287097
  const annotationFontSize = typeof run2.fontSize === "number" ? run2.fontSize : typeof run2.fontSize === "string" ? parseFloat(run2.fontSize) || DEFAULT_FIELD_ANNOTATION_FONT_SIZE : DEFAULT_FIELD_ANNOTATION_FONT_SIZE;
287054
- const annotationFontFamily = fontContext.resolvePhysical(run2.fontFamily || "Arial, sans-serif");
287098
+ const annotationFontFamily = fontContext.resolvePhysical(run2.fontFamily || "Arial, sans-serif", faceOf(run2));
287055
287099
  const fontWeight = run2.bold ? "bold" : "normal";
287056
287100
  ctx$1.font = `${run2.italic ? "italic" : "normal"} ${fontWeight} ${annotationFontSize}px ${annotationFontFamily}`;
287057
287101
  const textWidth = displayText ? ctx$1.measureText(displayText).width : 0;
@@ -288109,7 +288153,7 @@ async function measureListBlock(block, constraints, fontContext) {
288109
288153
  totalHeight
288110
288154
  };
288111
288155
  }
288112
- async function layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata, deps, fontResolver) {
288156
+ async function layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata, deps, fontResolver, hasFace, effectiveSignature) {
288113
288157
  deps.headerLayoutsByRId.clear();
288114
288158
  deps.footerLayoutsByRId.clear();
288115
288159
  if (!headerFooterInput)
@@ -288132,21 +288176,21 @@ async function layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetad
288132
288176
  };
288133
288177
  };
288134
288178
  if (sectionMetadata.length > 1 && sectionMetadata.some((s2) => s2.margins || s2.pageSize)) {
288135
- await layoutWithPerSectionConstraints("header", headerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.headerLayoutsByRId, fontResolver);
288136
- await layoutWithPerSectionConstraints("footer", footerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.footerLayoutsByRId, fontResolver);
288179
+ await layoutWithPerSectionConstraints("header", headerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.headerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
288180
+ await layoutWithPerSectionConstraints("footer", footerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.footerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
288137
288181
  } else {
288138
288182
  const effectiveHeaderRefsBySection = buildEffectiveHeaderFooterRefsBySection(sectionMetadata, "header");
288139
288183
  const effectiveFooterRefsBySection = buildEffectiveHeaderFooterRefsBySection(sectionMetadata, "footer");
288140
- await layoutBlocksByRId("header", headerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveHeaderRefsBySection), constraints, pageResolver, deps.headerLayoutsByRId, fontResolver);
288141
- await layoutBlocksByRId("footer", footerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveFooterRefsBySection), constraints, pageResolver, deps.footerLayoutsByRId, fontResolver);
288184
+ await layoutBlocksByRId("header", headerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveHeaderRefsBySection), constraints, pageResolver, deps.headerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
288185
+ await layoutBlocksByRId("footer", footerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveFooterRefsBySection), constraints, pageResolver, deps.footerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
288142
288186
  }
288143
288187
  }
288144
- async function layoutBlocksByRId(kind, blocksByRId, referencedRIds, constraints, pageResolver, layoutsByRId, fontResolver) {
288188
+ async function layoutBlocksByRId(kind, blocksByRId, referencedRIds, constraints, pageResolver, layoutsByRId, fontResolver, hasFace, effectiveSignature) {
288145
288189
  if (!blocksByRId || referencedRIds.size === 0)
288146
288190
  return;
288147
- const fontSignature = fontResolver?.signature ?? "";
288191
+ const fontSignature = effectiveSignature ?? "";
288148
288192
  const fontMeasureContext = fontResolver ? {
288149
- resolvePhysical: (css) => fontResolver.resolvePhysicalFamily(css),
288193
+ resolvePhysical: (css, face) => hasFace ? fontResolver.resolvePhysicalFamilyForFace(css, face, hasFace) : fontResolver.resolvePhysicalFamily(css),
288150
288194
  fontSignature
288151
288195
  } : undefined;
288152
288196
  for (const [rId, blocks2] of blocksByRId) {
@@ -288201,12 +288245,12 @@ function adjustFramePositionsForContentWidth(layout, blocks2, effectiveWidth, co
288201
288245
  fragment2.x -= widthDiff / 2;
288202
288246
  }
288203
288247
  }
288204
- async function layoutWithPerSectionConstraints(kind, blocksByRId, sectionMetadata, fallbackConstraints, pageResolver, layoutsByRId, fontResolver) {
288248
+ async function layoutWithPerSectionConstraints(kind, blocksByRId, sectionMetadata, fallbackConstraints, pageResolver, layoutsByRId, fontResolver, hasFace, effectiveSignature) {
288205
288249
  if (!blocksByRId)
288206
288250
  return;
288207
- const fontSignature = fontResolver?.signature ?? "";
288251
+ const fontSignature = effectiveSignature ?? "";
288208
288252
  const fontMeasureContext = fontResolver ? {
288209
- resolvePhysical: (css) => fontResolver.resolvePhysicalFamily(css),
288253
+ resolvePhysical: (css, face) => hasFace ? fontResolver.resolvePhysicalFamilyForFace(css, face, hasFace) : fontResolver.resolvePhysicalFamily(css),
288210
288254
  fontSignature
288211
288255
  } : undefined;
288212
288256
  const groups = buildSectionAwareHeaderFooterMeasurementGroups(kind, blocksByRId, sectionMetadata, fallbackConstraints);
@@ -288875,80 +288919,136 @@ function defaultScheduleMicrotask(callback) {
288875
288919
  }
288876
288920
  Promise.resolve().then(callback);
288877
288921
  }
288878
- function faceKey(req) {
288879
- return `${req.family.toLowerCase()}|${req.weight}|${req.style}`;
288922
+ function primaryFamily(css) {
288923
+ const comma = css.indexOf(",");
288924
+ return (comma === -1 ? css : css.slice(0, comma)).trim().replace(/^["']|["']$/g, "");
288880
288925
  }
288881
- function collect(out, node3, resolve3) {
288926
+ function makeResolveFace(resolver2, hasFace) {
288927
+ if (resolver2 && hasFace)
288928
+ return (logical, face) => {
288929
+ const r$1 = resolver2.resolveFace(logical, face, hasFace);
288930
+ return {
288931
+ physicalFamily: r$1.physicalFamily,
288932
+ reason: r$1.reason
288933
+ };
288934
+ };
288935
+ if (resolver2)
288936
+ return (logical) => {
288937
+ const r$1 = resolver2.resolveFontFamily(logical);
288938
+ return {
288939
+ physicalFamily: r$1.physicalFamily,
288940
+ reason: r$1.reason
288941
+ };
288942
+ };
288943
+ return (logical) => {
288944
+ const r$1 = resolveFontFamily2(logical);
288945
+ return {
288946
+ physicalFamily: r$1.physicalFamily,
288947
+ reason: r$1.reason
288948
+ };
288949
+ };
288950
+ }
288951
+ function collect(acc, node3, resolveFace$1) {
288882
288952
  if (!node3 || typeof node3.fontFamily !== "string" || !node3.fontFamily)
288883
288953
  return;
288884
- const family$1 = resolve3(node3.fontFamily);
288885
- if (!family$1)
288954
+ const weight = node3.bold === true ? "700" : "400";
288955
+ const style2 = node3.italic === true ? "italic" : "normal";
288956
+ const logicalPrimary = primaryFamily(node3.fontFamily);
288957
+ if (!logicalPrimary)
288886
288958
  return;
288887
- const req = {
288888
- family: family$1,
288889
- weight: node3.bold === true ? "700" : "400",
288890
- style: node3.italic === true ? "italic" : "normal"
288891
- };
288892
- const key2 = faceKey(req);
288893
- if (!out.has(key2))
288894
- out.set(key2, req);
288959
+ const usedKey = `${logicalPrimary.toLowerCase()}|${weight}|${style2}`;
288960
+ if (acc.usedFaces.has(usedKey))
288961
+ return;
288962
+ const { physicalFamily, reason } = resolveFace$1(node3.fontFamily, {
288963
+ weight,
288964
+ style: style2
288965
+ });
288966
+ acc.usedFaces.set(usedKey, {
288967
+ logicalFamily: logicalPrimary,
288968
+ weight,
288969
+ style: style2
288970
+ });
288971
+ acc.sigEntries.set(usedKey, [
288972
+ logicalPrimary.toLowerCase(),
288973
+ weight,
288974
+ style2,
288975
+ (physicalFamily || "").toLowerCase(),
288976
+ reason
288977
+ ]);
288978
+ if (physicalFamily) {
288979
+ const reqKey = `${physicalFamily.toLowerCase()}|${weight}|${style2}`;
288980
+ if (!acc.requiredFaces.has(reqKey))
288981
+ acc.requiredFaces.set(reqKey, {
288982
+ family: physicalFamily,
288983
+ weight,
288984
+ style: style2
288985
+ });
288986
+ }
288895
288987
  }
288896
- function collectRuns(out, runs2, resolve3) {
288988
+ function collectRuns(acc, runs2, resolveFace$1) {
288897
288989
  if (!runs2)
288898
288990
  return;
288899
288991
  for (const run2 of runs2) {
288900
288992
  const bearing = run2;
288901
288993
  if (run2.kind === "fieldAnnotation" && (typeof bearing.fontFamily !== "string" || !bearing.fontFamily))
288902
- collect(out, {
288994
+ collect(acc, {
288903
288995
  ...bearing,
288904
288996
  fontFamily: "Arial"
288905
- }, resolve3);
288997
+ }, resolveFace$1);
288906
288998
  else
288907
- collect(out, bearing, resolve3);
288999
+ collect(acc, bearing, resolveFace$1);
288908
289000
  }
288909
289001
  }
288910
- function collectParagraph(out, paragraph2, resolve3) {
289002
+ function collectParagraph(acc, paragraph2, resolveFace$1) {
288911
289003
  if (!paragraph2)
288912
289004
  return;
288913
- collectRuns(out, paragraph2.runs, resolve3);
288914
- collect(out, paragraph2.attrs?.wordLayout?.marker?.run, resolve3);
288915
- collect(out, paragraph2.attrs?.dropCapDescriptor?.run, resolve3);
289005
+ collectRuns(acc, paragraph2.runs, resolveFace$1);
289006
+ collect(acc, paragraph2.attrs?.wordLayout?.marker?.run, resolveFace$1);
289007
+ collect(acc, paragraph2.attrs?.dropCapDescriptor?.run, resolveFace$1);
288916
289008
  }
288917
- function collectTable(out, table2, resolve3) {
289009
+ function collectTable(acc, table2, resolveFace$1) {
288918
289010
  for (const row2 of table2.rows)
288919
289011
  for (const cell2 of row2.cells) {
288920
- collectParagraph(out, cell2.paragraph, resolve3);
289012
+ collectParagraph(acc, cell2.paragraph, resolveFace$1);
288921
289013
  if (cell2.blocks)
288922
289014
  for (const b$1 of cell2.blocks)
288923
- collectBlock(out, b$1, resolve3);
289015
+ collectBlock(acc, b$1, resolveFace$1);
288924
289016
  }
288925
289017
  }
288926
- function collectList(out, list5, resolve3) {
289018
+ function collectList(acc, list5, resolveFace$1) {
288927
289019
  for (const item of list5.items)
288928
- collectParagraph(out, item.paragraph, resolve3);
289020
+ collectParagraph(acc, item.paragraph, resolveFace$1);
288929
289021
  }
288930
- function collectBlock(out, block, resolve3) {
289022
+ function collectBlock(acc, block, resolveFace$1) {
288931
289023
  switch (block.kind) {
288932
289024
  case "paragraph":
288933
- collectParagraph(out, block, resolve3);
289025
+ collectParagraph(acc, block, resolveFace$1);
288934
289026
  break;
288935
289027
  case "table":
288936
- collectTable(out, block, resolve3);
289028
+ collectTable(acc, block, resolveFace$1);
288937
289029
  break;
288938
289030
  case "list":
288939
- collectList(out, block, resolve3);
289031
+ collectList(acc, block, resolveFace$1);
288940
289032
  break;
288941
289033
  default:
288942
289034
  break;
288943
289035
  }
288944
289036
  }
288945
- function planRequiredFontFaces(blocks2, resolver2) {
288946
- const resolve3 = resolver2 ? (family$1) => resolver2.resolvePrimaryPhysicalFamily(family$1) : resolvePrimaryPhysicalFamily;
288947
- const out = /* @__PURE__ */ new Map;
289037
+ function planFontFaces(blocks2, resolver2, hasFace) {
289038
+ const resolveFace$1 = makeResolveFace(resolver2, hasFace);
289039
+ const acc = {
289040
+ requiredFaces: /* @__PURE__ */ new Map,
289041
+ usedFaces: /* @__PURE__ */ new Map,
289042
+ sigEntries: /* @__PURE__ */ new Map
289043
+ };
288948
289044
  if (blocks2)
288949
289045
  for (const block of blocks2)
288950
- collectBlock(out, block, resolve3);
288951
- return [...out.values()];
289046
+ collectBlock(acc, block, resolveFace$1);
289047
+ return {
289048
+ requiredFaces: [...acc.requiredFaces.values()],
289049
+ usedFaces: [...acc.usedFaces.values()],
289050
+ effectiveSignature: acc.sigEntries.size === 0 ? "" : JSON.stringify([...acc.sigEntries.entries()].sort(([a2], [b$1]) => a2 < b$1 ? -1 : a2 > b$1 ? 1 : 0).map(([, tuple]) => tuple))
289051
+ };
288952
289052
  }
288953
289053
  function buildSemanticFootnoteBlocks(input2, footnotesMode) {
288954
289054
  if (!input2 || input2.refs.length === 0 || input2.blocksById.size === 0)
@@ -310111,6 +310211,40 @@ menclose::after {
310111
310211
  return cssFontFamily;
310112
310212
  return [physical, ...parts.slice(1)].join(", ");
310113
310213
  }
310214
+ resolveFace(logicalFamily, face, hasFace) {
310215
+ const primary = splitStack(logicalFamily)[0] ?? logicalFamily;
310216
+ const { physical, reason } = this.#physicalFor(primary);
310217
+ if (reason === "as_requested")
310218
+ return {
310219
+ logicalFamily,
310220
+ physicalFamily: physical,
310221
+ reason
310222
+ };
310223
+ if (hasFace(physical, face.weight, face.style))
310224
+ return {
310225
+ logicalFamily,
310226
+ physicalFamily: physical,
310227
+ reason
310228
+ };
310229
+ return {
310230
+ logicalFamily,
310231
+ physicalFamily: primary,
310232
+ reason: "fallback_face_absent"
310233
+ };
310234
+ }
310235
+ resolvePhysicalFamilyForFace(cssFontFamily, face, hasFace) {
310236
+ if (!cssFontFamily)
310237
+ return cssFontFamily;
310238
+ const parts = splitStack(cssFontFamily);
310239
+ if (parts.length === 0)
310240
+ return cssFontFamily;
310241
+ const { physical, reason } = this.#physicalFor(parts[0]);
310242
+ if (reason === "as_requested")
310243
+ return cssFontFamily;
310244
+ if (!hasFace(physical, face.weight, face.style))
310245
+ return cssFontFamily;
310246
+ return [physical, ...parts.slice(1)].join(", ");
310247
+ }
310114
310248
  resolvePrimaryPhysicalFamily(family$1) {
310115
310249
  const primary = splitStack(family$1)[0] ?? family$1;
310116
310250
  return this.#physicalFor(primary).physical;
@@ -310216,6 +310350,9 @@ menclose::after {
310216
310350
  return s2;
310217
310351
  return "unloaded";
310218
310352
  }
310353
+ hasFace(family$1, weight, style2) {
310354
+ return this.#facesByFamily.get(normalizeFamilyKey$1(family$1))?.has(faceKeyOf$1(family$1, weight, style2)) ?? false;
310355
+ }
310219
310356
  isAvailable(family$1) {
310220
310357
  if (!this.#fontSet)
310221
310358
  return false;
@@ -310708,7 +310845,7 @@ menclose::after {
310708
310845
  if (typeof value !== "number" || !Number.isFinite(value) || value < 0)
310709
310846
  return;
310710
310847
  return value;
310711
- }, resolvePainterMarkerTextWidth = (markerTextWidthPx, marker) => getFiniteNonNegativeNumber(markerTextWidthPx) ?? getFiniteNonNegativeNumber(marker.glyphWidthPx) ?? getFiniteNonNegativeNumber(marker.markerBoxWidthPx) ?? 0, resolvePainterListMarkerGeometry = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListMarkerGeometry(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), resolvePainterListTextStartPx = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListTextStartPx(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), isMarkerSuffix = (suffix) => suffix === "tab" || suffix === "space" || suffix === "nothing", createListMarkerElement = (doc$12, markerText, run2, sourceAnchor, resolvePhysical = resolvePhysicalFamily) => {
310848
+ }, resolvePainterMarkerTextWidth = (markerTextWidthPx, marker) => getFiniteNonNegativeNumber(markerTextWidthPx) ?? getFiniteNonNegativeNumber(marker.glyphWidthPx) ?? getFiniteNonNegativeNumber(marker.markerBoxWidthPx) ?? 0, resolvePainterListMarkerGeometry = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListMarkerGeometry(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), resolvePainterListTextStartPx = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListTextStartPx(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), isMarkerSuffix = (suffix) => suffix === "tab" || suffix === "space" || suffix === "nothing", createListMarkerElement = (doc$12, markerText, run2, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css)) => {
310712
310849
  const markerContainer = doc$12.createElement("span");
310713
310850
  markerContainer.classList.add(DOM_CLASS_NAMES.LIST_MARKER);
310714
310851
  markerContainer.style.display = "inline-block";
@@ -310718,7 +310855,10 @@ menclose::after {
310718
310855
  markerEl.textContent = markerText;
310719
310856
  markerEl.style.pointerEvents = "none";
310720
310857
  const cssFontFamily = toCssFontFamily(run2.fontFamily) ?? run2.fontFamily ?? "";
310721
- markerEl.style.fontFamily = resolvePhysical(cssFontFamily);
310858
+ markerEl.style.fontFamily = resolvePhysical(cssFontFamily, {
310859
+ weight: run2.bold ? "700" : "400",
310860
+ style: run2.italic ? "italic" : "normal"
310861
+ });
310722
310862
  if (run2.fontSize != null)
310723
310863
  markerEl.style.fontSize = `${run2.fontSize}px`;
310724
310864
  markerEl.style.fontWeight = run2.bold ? "bold" : "";
@@ -310736,7 +310876,7 @@ menclose::after {
310736
310876
  applySourceAnchorDataset(markerEl, sourceAnchor);
310737
310877
  return markerContainer;
310738
310878
  }, renderLegacyListMarker = (params$1) => {
310739
- const { doc: doc$12, lineEl, wordLayout, markerLayout, markerMeasure, markerTextWidthPx, indentLeftPx, hangingIndentPx, firstLineIndentPx, isRtl, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
310879
+ const { doc: doc$12, lineEl, wordLayout, markerLayout, markerMeasure, markerTextWidthPx, indentLeftPx, hangingIndentPx, firstLineIndentPx, isRtl, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
310740
310880
  const markerTextWidth = markerTextWidthPx ?? markerMeasure?.markerTextWidth ?? 0;
310741
310881
  const markerGeometry = markerLayout?.justification === "left" && wordLayout?.firstLineIndentMode !== true && typeof markerTextWidth === "number" && Number.isFinite(markerTextWidth) && markerTextWidth >= 0 ? resolvePainterListMarkerGeometry({
310742
310882
  wordLayout,
@@ -310794,7 +310934,7 @@ menclose::after {
310794
310934
  prependMarkerSuffix(doc$12, lineEl, isMarkerSuffix(suffix) ? suffix : undefined, suffixWidthPx, markerLayout?.run?.fontSize);
310795
310935
  lineEl.prepend(markerContainer);
310796
310936
  }, renderResolvedListMarker = (params$1) => {
310797
- const { doc: doc$12, lineEl, marker, isRtl, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
310937
+ const { doc: doc$12, lineEl, marker, isRtl, sourceAnchor, resolvePhysical } = params$1;
310798
310938
  if (isRtl)
310799
310939
  lineEl.style.paddingRight = `${marker.firstLinePaddingLeftPx}px`;
310800
310940
  else
@@ -311069,7 +311209,7 @@ menclose::after {
311069
311209
  skipJustifyOverride: (resolvedLine?.skipJustify ?? false) || hasMultipleExplicitPositionedSegments
311070
311210
  }) ? Math.max(lineWidth, availableWidth) : lineWidth;
311071
311211
  }, renderResolvedLines = (params$1) => {
311072
- const { frameEl, block, resolvedContent: content3, markerTextWidth, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
311212
+ const { frameEl, block, resolvedContent: content3, markerTextWidth, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
311073
311213
  const renderedLines = [];
311074
311214
  const resolvedMarker = content3.marker;
311075
311215
  const expandedRunsForBlock = expandRunsForInlineNewlines(block.runs);
@@ -311123,7 +311263,7 @@ menclose::after {
311123
311263
  renderedLines
311124
311264
  };
311125
311265
  }, renderMeasuredLines = (params$1) => {
311126
- const { doc: doc$12, frameEl, block, measure, containerKind, width, localStartLine, localEndLine, linesOverride, lineIndexOffset = 0, continuesFromPrev, continuesOnNext, markerWidth, markerTextWidth, wordLayout, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
311266
+ const { doc: doc$12, frameEl, block, measure, containerKind, width, localStartLine, localEndLine, linesOverride, lineIndexOffset = 0, continuesFromPrev, continuesOnNext, markerWidth, markerTextWidth, wordLayout, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
311127
311267
  const lines = linesOverride ?? measure.lines ?? [];
311128
311268
  const paraIndent = block.attrs?.indent;
311129
311269
  const paraIndentLeft = paraIndent?.left ?? 0;
@@ -312394,7 +312534,7 @@ menclose::after {
312394
312534
  else
312395
312535
  delete el.dataset.continuesOnNext;
312396
312536
  }, isMinimalWordLayout$2 = (value) => isMinimalWordLayout(value), renderParagraphFragment = (params$1) => {
312397
- const { doc: doc$12, fragment: fragment2, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder, contentControlsChrome, resolvePhysical = resolvePhysicalFamily } = params$1;
312537
+ const { doc: doc$12, fragment: fragment2, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder, contentControlsChrome, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
312398
312538
  try {
312399
312539
  if (!doc$12)
312400
312540
  throw new Error("DomPainter: document is not available");
@@ -312473,12 +312613,15 @@ menclose::after {
312473
312613
  });
312474
312614
  return createErrorPlaceholder(fragment2.blockId, error3);
312475
312615
  }
312476
- }, renderDropCap = (doc$12, descriptor, measure, resolvePhysical = resolvePhysicalFamily) => {
312616
+ }, renderDropCap = (doc$12, descriptor, measure, resolvePhysical = (css) => resolvePhysicalFamily(css)) => {
312477
312617
  const { run: run2, mode } = descriptor;
312478
312618
  const dropCapEl = doc$12.createElement("span");
312479
312619
  dropCapEl.classList.add("superdoc-drop-cap");
312480
312620
  dropCapEl.textContent = run2.text;
312481
- dropCapEl.style.fontFamily = resolvePhysical(run2.fontFamily);
312621
+ dropCapEl.style.fontFamily = resolvePhysical(run2.fontFamily, {
312622
+ weight: run2.bold ? "700" : "400",
312623
+ style: run2.italic ? "italic" : "normal"
312624
+ });
312482
312625
  dropCapEl.style.fontSize = `${run2.fontSize}px`;
312483
312626
  if (run2.bold)
312484
312627
  dropCapEl.style.fontWeight = "bold";
@@ -312594,7 +312737,10 @@ menclose::after {
312594
312737
  }, applyRunStyles = (element3, run2, _isLink = false, resolvePhysical = resolvePhysicalFamily) => {
312595
312738
  if (run2.kind === "tab" || run2.kind === "image" || run2.kind === "lineBreak" || run2.kind === "break" || run2.kind === "fieldAnnotation" || run2.kind === "math")
312596
312739
  return;
312597
- element3.style.fontFamily = resolvePhysical(run2.fontFamily);
312740
+ element3.style.fontFamily = resolvePhysical(run2.fontFamily, {
312741
+ weight: run2.bold ? "700" : "400",
312742
+ style: run2.italic ? "italic" : "normal"
312743
+ });
312598
312744
  element3.style.fontSize = `${run2.fontSize}px`;
312599
312745
  if (run2.bold)
312600
312746
  element3.style.fontWeight = "bold";
@@ -312777,7 +312923,10 @@ menclose::after {
312777
312923
  }
312778
312924
  {
312779
312925
  const resolvePhysical = context.resolvePhysical ?? resolvePhysicalFamily;
312780
- annotation.style.fontFamily = resolvePhysical(run2.fontFamily || "Arial, sans-serif");
312926
+ annotation.style.fontFamily = resolvePhysical(run2.fontFamily || "Arial, sans-serif", {
312927
+ weight: run2.bold ? "700" : "400",
312928
+ style: run2.italic ? "italic" : "normal"
312929
+ });
312781
312930
  }
312782
312931
  {
312783
312932
  const fontSize = run2.fontSize ? typeof run2.fontSize === "number" ? `${run2.fontSize}pt` : run2.fontSize : BROWSER_DEFAULT_FONT_SIZE;
@@ -324709,11 +324858,11 @@ menclose::after {
324709
324858
  #resolveResult(result, storyId) {
324710
324859
  return resolveResult(result, storyId, this.#options.getFontSignature?.() ?? "");
324711
324860
  }
324712
- async layoutPerRId(headerFooterInput, layout, sectionMetadata, fontResolver) {
324861
+ async layoutPerRId(headerFooterInput, layout, sectionMetadata, fontResolver, hasFace, effectiveSignature) {
324713
324862
  await layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata, {
324714
324863
  headerLayoutsByRId: this.#headerLayoutsByRId,
324715
324864
  footerLayoutsByRId: this.#footerLayoutsByRId
324716
- }, fontResolver);
324865
+ }, fontResolver, hasFace, effectiveSignature);
324717
324866
  this.#resolvedHeaderByRId.clear();
324718
324867
  for (const [key2, result] of this.#headerLayoutsByRId)
324719
324868
  this.#resolvedHeaderByRId.set(key2, this.#resolveResult(result, storyIdFromHeaderFooterLayoutKey(key2)));
@@ -325571,6 +325720,7 @@ menclose::after {
325571
325720
  }, FontReadinessGate = class {
325572
325721
  #getDocumentFonts;
325573
325722
  #getRequiredFaces;
325723
+ #getUsedFaces;
325574
325724
  #resolveFamilies;
325575
325725
  #fontResolver;
325576
325726
  #requestReflow;
@@ -325580,6 +325730,7 @@ menclose::after {
325580
325730
  #timeoutMs;
325581
325731
  #invalidateCaches;
325582
325732
  #context = null;
325733
+ #packInstalledFor = null;
325583
325734
  #fontConfigVersion = 0;
325584
325735
  #requiredSignature = "";
325585
325736
  #requiredFamilies = /* @__PURE__ */ new Set;
@@ -325592,6 +325743,7 @@ menclose::after {
325592
325743
  constructor(options) {
325593
325744
  this.#getDocumentFonts = options.getDocumentFonts;
325594
325745
  this.#getRequiredFaces = options.getRequiredFaces ?? null;
325746
+ this.#getUsedFaces = options.getUsedFaces ?? null;
325595
325747
  this.#fontResolver = options.fontResolver ?? null;
325596
325748
  const resolver2 = this.#fontResolver;
325597
325749
  this.#resolveFamilies = options.resolveFamilies ?? (resolver2 ? (families) => resolver2.resolvePhysicalFamilies(families) : (families) => families);
@@ -325616,13 +325768,19 @@ menclose::after {
325616
325768
  return this.#lastSummary;
325617
325769
  }
325618
325770
  getReport() {
325619
- let logical = [];
325771
+ let declared = [];
325620
325772
  try {
325621
- logical = this.#getDocumentFonts();
325773
+ declared = this.#getDocumentFonts();
325622
325774
  } catch {
325623
325775
  return [];
325624
325776
  }
325625
- return buildFontReport(logical, this.#resolveContext().registry, this.#fontResolver ?? undefined);
325777
+ const registry2 = this.#resolveContext().registry;
325778
+ const resolver2 = this.#fontResolver ?? undefined;
325779
+ const usedFaces = this.#getUsedFaces?.() ?? [];
325780
+ const faceRows = buildFaceReport(usedFaces, registry2, resolver2);
325781
+ const usedFamilies = new Set(usedFaces.map((u) => u.logicalFamily.toLowerCase()));
325782
+ const declaredRows = buildFontReport(declared.filter((family$1) => family$1 && !usedFamilies.has(family$1.toLowerCase())), registry2, resolver2);
325783
+ return [...faceRows, ...declaredRows];
325626
325784
  }
325627
325785
  async ensureReadyForMeasure() {
325628
325786
  if (this.#getRequiredFaces)
@@ -325732,10 +325890,12 @@ menclose::after {
325732
325890
  fontSet,
325733
325891
  registry: registry2
325734
325892
  };
325735
- if (fontSet && this.#onRegistryResolved)
325893
+ if (this.#onRegistryResolved && registry2 !== this.#packInstalledFor) {
325894
+ this.#packInstalledFor = registry2;
325736
325895
  try {
325737
325896
  this.#onRegistryResolved(registry2);
325738
325897
  } catch {}
325898
+ }
325739
325899
  return this.#context;
325740
325900
  }
325741
325901
  #ensureSubscribed() {
@@ -325993,7 +326153,7 @@ menclose::after {
325993
326153
  return;
325994
326154
  console.log(...args$1);
325995
326155
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions, TRACKED_MARK_NAMES;
325996
- var init_src_B1aSE_tB_es = __esm(() => {
326156
+ var init_src_DvgAvHbj_es = __esm(() => {
325997
326157
  init_rolldown_runtime_Bg48TavK_es();
325998
326158
  init_SuperConverter_B9mZiCO9_es();
325999
326159
  init_jszip_C49i9kUs_es();
@@ -352883,7 +353043,7 @@ function print() { __p += __j.call(arguments, '') }
352883
353043
  });
352884
353044
  defaultResolver = new FontResolver;
352885
353045
  DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
352886
- resolvePhysical: resolvePhysicalFamily,
353046
+ resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
352887
353047
  fontSignature: ""
352888
353048
  });
352889
353049
  BUNDLED_MANIFEST = Object.freeze([
@@ -354167,7 +354327,10 @@ function print() { __p += __j.call(arguments, '') }
354167
354327
  }
354168
354328
  });
354169
354329
  #fontPlanBlocks = null;
354330
+ #fontPlan = null;
354331
+ #hasFace = (family$1, weight, style2) => this.#fontGate ? this.#fontGate.resolveRegistry().hasFace(family$1, weight, style2) : false;
354170
354332
  #lastFontsChangedKey = null;
354333
+ #lastFontsChangedVersion = -1;
354171
354334
  #lastFontsChangedPayload = null;
354172
354335
  #shouldScrollSelectionIntoView = false;
354173
354336
  #suppressSelectionScrollUntilRaf = false;
@@ -354398,7 +354561,7 @@ function print() { __p += __j.call(arguments, '') }
354398
354561
  initBudgetMs: HEADER_FOOTER_INIT_BUDGET_MS,
354399
354562
  defaultPageSize: DEFAULT_PAGE_SIZE,
354400
354563
  defaultMargins: DEFAULT_MARGINS,
354401
- getFontSignature: () => this.#fontResolver.signature
354564
+ getFontSignature: () => this.#layoutFontSignature
354402
354565
  });
354403
354566
  this.#headerFooterSession.setHoverElements({
354404
354567
  hoverOverlay: this.#hoverOverlay,
@@ -354453,7 +354616,8 @@ function print() { __p += __j.call(arguments, '') }
354453
354616
  return this.#editor.converter?.getDocumentFonts?.() ?? [];
354454
354617
  },
354455
354618
  requestReflow: () => this.#requestFontReflow(),
354456
- getRequiredFaces: () => planRequiredFontFaces(this.#fontPlanBlocks, this.#fontResolver),
354619
+ getRequiredFaces: () => this.#fontPlan?.requiredFaces ?? [],
354620
+ getUsedFaces: () => this.#fontPlan?.usedFaces ?? [],
354457
354621
  fontResolver: this.#fontResolver,
354458
354622
  onRegistryResolved: (registry2) => installBundledSubstitutes(registry2, {
354459
354623
  assetBaseUrl: this.#options.fontAssets?.assetBaseUrl,
@@ -355428,7 +355592,7 @@ function print() { __p += __j.call(arguments, '') }
355428
355592
  return this.#fontGate?.getReport() ?? [];
355429
355593
  }
355430
355594
  getMissingFonts() {
355431
- return this.getFontReport().filter((record) => record.missing).map((record) => record.logicalFamily);
355595
+ return [...new Set(this.getFontReport().filter((record) => record.missing).map((record) => record.logicalFamily))];
355432
355596
  }
355433
355597
  mapFonts(mappings) {
355434
355598
  this.#fontController.map(mappings);
@@ -355457,14 +355621,17 @@ function print() { __p += __j.call(arguments, '') }
355457
355621
  if (!gate)
355458
355622
  return;
355459
355623
  const version$1 = gate.fontConfigVersion;
355460
- const key2 = `${version$1}|${summary ? summary.results.map((result) => `${result.family}:${result.status}`).sort().join(",") : ""}`;
355624
+ const statusKey = summary ? summary.results.map((result) => `${result.family}:${result.status}`).sort().join(",") : "";
355625
+ const key2 = `${version$1}|${this.#fontPlan?.effectiveSignature ?? ""}|${statusKey}`;
355461
355626
  if (key2 === this.#lastFontsChangedKey)
355462
355627
  return;
355463
355628
  const isInitial = this.#lastFontsChangedKey === null;
355629
+ const epochBumped = !isInitial && version$1 !== this.#lastFontsChangedVersion;
355464
355630
  this.#lastFontsChangedKey = key2;
355631
+ this.#lastFontsChangedVersion = version$1;
355465
355632
  const pendingSource = this.#nextFontsChangedSource;
355466
355633
  this.#nextFontsChangedSource = null;
355467
- const source = isInitial ? "initial" : pendingSource ?? "late-load";
355634
+ const source = isInitial ? "initial" : pendingSource ?? (epochBumped ? "late-load" : "render-change");
355468
355635
  let resolutions;
355469
355636
  try {
355470
355637
  resolutions = gate.getReport();
@@ -355472,9 +355639,9 @@ function print() { __p += __j.call(arguments, '') }
355472
355639
  return;
355473
355640
  }
355474
355641
  const payload = {
355475
- documentFonts: resolutions.map((record) => record.logicalFamily),
355642
+ documentFonts: [...new Set(resolutions.map((record) => record.logicalFamily))],
355476
355643
  resolutions,
355477
- missingFonts: resolutions.filter((record) => record.missing).map((record) => record.logicalFamily),
355644
+ missingFonts: [...new Set(resolutions.filter((record) => record.missing).map((record) => record.logicalFamily))],
355478
355645
  loadSummary: summary ?? {
355479
355646
  loaded: 0,
355480
355647
  failed: 0,
@@ -355496,7 +355663,10 @@ function print() { __p += __j.call(arguments, '') }
355496
355663
  #resetFontReportStateForDocumentChange() {
355497
355664
  this.#nextFontsChangedSource = null;
355498
355665
  this.#lastFontsChangedKey = null;
355666
+ this.#lastFontsChangedVersion = -1;
355499
355667
  this.#lastFontsChangedPayload = null;
355668
+ this.#fontPlan = null;
355669
+ this.#fontPlanBlocks = null;
355500
355670
  }
355501
355671
  getLayoutOptions() {
355502
355672
  return { ...this.#layoutOptions };
@@ -355646,7 +355816,7 @@ function print() { __p += __j.call(arguments, '') }
355646
355816
  flowMode: this.#layoutOptions.flowMode ?? "paginated",
355647
355817
  blocks: blocks2,
355648
355818
  measures,
355649
- fontSignature: this.#fontResolver.signature
355819
+ fontSignature: this.#layoutFontSignature
355650
355820
  });
355651
355821
  const isSemanticFlow = this.#layoutOptions.flowMode === "semantic";
355652
355822
  this.#ensurePainter();
@@ -357855,10 +358025,10 @@ function print() { __p += __j.call(arguments, '') }
357855
358025
  const previousBlocks = this.#layoutState.blocks;
357856
358026
  const previousLayout = this.#layoutState.layout;
357857
358027
  const previousMeasures = this.#layoutState.measures;
357858
- const resolvePhysical = (css) => this.#fontResolver.resolvePhysicalFamily(css);
357859
- const fontSignature = this.#fontResolver.signature;
358028
+ const resolvePhysical = (css, face) => this.#fontResolver.resolvePhysicalFamilyForFace(css, face, this.#hasFace);
358029
+ let fontSignature = "";
357860
358030
  const previousFontSignature = this.#layoutFontSignature;
357861
- const fontMeasureContext = {
358031
+ let fontMeasureContext = {
357862
358032
  resolvePhysical,
357863
358033
  fontSignature
357864
358034
  };
@@ -357880,6 +358050,12 @@ function print() { __p += __j.call(arguments, '') }
357880
358050
  ...headerFooterInput ? this.#collectHeaderFooterFaceBlocks(headerFooterInput) : [],
357881
358051
  ...!isSemanticFlow && footnotesLayoutInput?.blocksById ? [...footnotesLayoutInput.blocksById.values()].flat() : []
357882
358052
  ];
358053
+ this.#fontPlan = planFontFaces(this.#fontPlanBlocks, this.#fontResolver, this.#hasFace);
358054
+ fontSignature = this.#fontPlan.effectiveSignature;
358055
+ fontMeasureContext = {
358056
+ resolvePhysical,
358057
+ fontSignature
358058
+ };
357883
358059
  const fontSummary = await this.#fontGate?.ensureReadyForMeasure() ?? null;
357884
358060
  this.#emitFontsChangedIfChanged(fontSummary);
357885
358061
  } catch {}
@@ -358039,7 +358215,7 @@ function print() { __p += __j.call(arguments, '') }
358039
358215
  pageGap: this.#layoutState.layout?.pageGap ?? effectiveGap,
358040
358216
  showFormattingMarks: this.#layoutOptions.showFormattingMarks ?? false,
358041
358217
  contentControlsChrome: this.#layoutOptions.contentControlsChrome ?? "default",
358042
- resolvePhysical: (css) => this.#fontResolver.resolvePhysicalFamily(css)
358218
+ resolvePhysical: (css, face) => this.#fontResolver.resolvePhysicalFamilyForFace(css, face, this.#hasFace)
358043
358219
  });
358044
358220
  const currentZoom = this.#layoutOptions.zoom ?? 1;
358045
358221
  if (currentZoom !== 1)
@@ -358791,7 +358967,7 @@ function print() { __p += __j.call(arguments, '') }
358791
358967
  }
358792
358968
  async#layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata) {
358793
358969
  if (this.#headerFooterSession)
358794
- await this.#headerFooterSession.layoutPerRId(headerFooterInput, layout, sectionMetadata, this.#fontResolver);
358970
+ await this.#headerFooterSession.layoutPerRId(headerFooterInput, layout, sectionMetadata, this.#fontResolver, this.#hasFace, this.#fontPlan?.effectiveSignature ?? "");
358795
358971
  }
358796
358972
  #updateDecorationProviders(resolvedLayout) {
358797
358973
  this.#headerFooterSession?.updateDecorationProviders(resolvedLayout);
@@ -360738,7 +360914,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
360738
360914
 
360739
360915
  // ../../packages/superdoc/dist/super-editor.es.js
360740
360916
  var init_super_editor_es = __esm(() => {
360741
- init_src_B1aSE_tB_es();
360917
+ init_src_DvgAvHbj_es();
360742
360918
  init_SuperConverter_B9mZiCO9_es();
360743
360919
  init_jszip_C49i9kUs_es();
360744
360920
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.16.0-next.22",
3
+ "version": "0.16.0-next.23",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -33,11 +33,11 @@
33
33
  "access": "public"
34
34
  },
35
35
  "optionalDependencies": {
36
- "@superdoc-dev/cli-darwin-x64": "0.16.0-next.22",
37
- "@superdoc-dev/cli-darwin-arm64": "0.16.0-next.22",
38
- "@superdoc-dev/cli-linux-x64": "0.16.0-next.22",
39
- "@superdoc-dev/cli-linux-arm64": "0.16.0-next.22",
40
- "@superdoc-dev/cli-windows-x64": "0.16.0-next.22"
36
+ "@superdoc-dev/cli-darwin-arm64": "0.16.0-next.23",
37
+ "@superdoc-dev/cli-darwin-x64": "0.16.0-next.23",
38
+ "@superdoc-dev/cli-linux-arm64": "0.16.0-next.23",
39
+ "@superdoc-dev/cli-linux-x64": "0.16.0-next.23",
40
+ "@superdoc-dev/cli-windows-x64": "0.16.0-next.23"
41
41
  },
42
42
  "scripts": {
43
43
  "predev": "node scripts/ensure-superdoc-build.js",