fix: footnotes rendering causing lines to shift, other footnote rendering issues#2625
fix: footnotes rendering causing lines to shift, other footnote rendering issues#2625harbournick merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 764fcd03b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| text: markerText, | ||
| dataAttrs: { [FOOTNOTE_MARKER_DATA_ATTR]: 'true' }, | ||
| fontFamily: resolveMarkerFontFamily(firstTextRun), | ||
| fontSize: resolveMarkerBaseFontSize(firstTextRun) * SUBSCRIPT_SUPERSCRIPT_SCALE, |
There was a problem hiding this comment.
Derive footnote marker size from unscaled base font
buildMarkerRun always multiplies firstTextRun.fontSize by SUBSCRIPT_SUPERSCRIPT_SCALE, but firstTextRun.fontSize can already be scaled when the first footnote-content run is superscript/subscript (as produced by pm-adapter). In that case the marker gets scaled twice (~0.65×0.65), making the footnote number visibly too small and altering line metrics for notes that begin with superscript text. Compute the marker size from the unscaled base font before applying the marker scale.
Useful? React with 👍 / 👎.
No description provided.