fix: Word's pi for the Equation button

Word's Equation button is a pi, as its Symbol button beside it is an omega.
Same canvas, baseline and weight as that omega, at font-size 20 rather than
its 14: pi is lowercase, so at one size its x-height measures 1.44x smaller.
This commit is contained in:
Steffen Becker committed 2026-08-12 19:51:35 +02:00
1 parent ab7d8ddb01
commit fa2726a1df
2 files changed
+10 -2

No files matched your search

-1
View File
@@ -96,7 +96,6 @@ export const STROKED = {
header: ['M2 2.5h12v3H2z', 'M2 8h12M2 11h8'],
footer: ['M2 10.5h12v3H2z', 'M2 5h12M2 8h8'],
pageNumber: ['M3.25 1.75h9.5v12.5h-9.5z', 'M6.9 6.4 8 5.3v5.2', 'M6.75 10.5h2.5'],
formula: ['M9 3.5h4', 'M9.5 8h3', 'M2.5 13.5c1.6 0 2-.9 2.4-2.4L7.2 3.4C7.5 2.3 8 2 8.8 2', 'M2.5 6.5h4'],
pageBreak: ['M2 4.5h12M2 11.5h12', 'M8 6.5v3', 'M6.4 8.2 8 9.8l1.6-1.6'],
} as const;
@@ -276,7 +276,7 @@
/>
<span class="rb-caption">{t().ribbon.symbol}</span>
</div>
<RibbonButton variant="big" icon="formula" label={t().ribbon.equation} title={t().formula.insert} disabled={!editor} onclick={openFormula} />
<RibbonButton variant="big" content={equationIcon} label={t().ribbon.equation} title={t().formula.insert} disabled={!editor} onclick={openFormula} />
</RibbonGroup>
<input
@@ -289,6 +289,15 @@
<FormulaDialog bind:open={formulaOpen} initialLatex={formulaLatex} initialDisplay={formulaDisplay} onApply={applyFormula} />
<!-- Word's Equation button is a π, as its Symbol button beside it is an Ω. Same
canvas, baseline and weight as that Ω; the size is 20 rather than its 14
because π is lowercase, so at one size its x-height reads 1.44× smaller. -->
{#snippet equationIcon()}
<svg width="28" height="28" viewBox="0 0 16 16" fill="none" aria-hidden="true">
<text x="8" y="12.5" font-size="20" font-weight="700" font-family="var(--font-serif, serif)" fill="currentColor" text-anchor="middle">π</text>
</svg>
{/snippet}
<style>
.rb-col {
display: flex;