mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-13 15:08:39 +00:00
[plugin system] Add a utility function (setFontMetrics) to extend builtin fontMetrics (#1269)
* Add and expose addFontMetrics function * fix typo * recreate package.json-lock * Add setFontMetrics function to change the defualt metricMap - change getFontMetrics to getGlobalMetrics * use new setFontMetrics on main KaTeX object * fix package-lock.json error by rebuilding it * Add appropriate tests * update the snapshot
This commit is contained in:
committed by
Kevin Barabash
parent
251283ffc1
commit
8b1e1b4886
@@ -369,3 +369,81 @@ exports[`An implicit group parser within optional groups should work with sizing
|
||||
}
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`Extending katex by new fonts and symbols Add new font class to new extended symbols 1`] = `
|
||||
|
||||
<span class="katex">
|
||||
<span class="katex-mathml">
|
||||
<math>
|
||||
<semantics>
|
||||
<mrow>
|
||||
<mi mathvariant="normal">
|
||||
۹
|
||||
</mi>
|
||||
<msup>
|
||||
<mi mathvariant="normal">
|
||||
۹
|
||||
</mi>
|
||||
<mrow>
|
||||
<mi mathvariant="normal">
|
||||
۱
|
||||
</mi>
|
||||
<mi mathvariant="normal">
|
||||
۱
|
||||
</mi>
|
||||
</mrow>
|
||||
</msup>
|
||||
</mrow>
|
||||
<annotation encoding="application/x-tex">
|
||||
۹۹^{۱۱}
|
||||
</annotation>
|
||||
</semantics>
|
||||
</math>
|
||||
</span>
|
||||
<span class="katex-html"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<span class="base">
|
||||
<span class="strut"
|
||||
style="height:0.84425em;vertical-align:0em;"
|
||||
>
|
||||
</span>
|
||||
<span class="mord mockEasternArabicFont-Regular">
|
||||
۹
|
||||
</span>
|
||||
<span class="mord">
|
||||
<span class="mord mockEasternArabicFont-Regular">
|
||||
۹
|
||||
</span>
|
||||
<span class="msupsub">
|
||||
<span class="vlist-t">
|
||||
<span class="vlist-r">
|
||||
<span class="vlist"
|
||||
style="height:0.84425em;"
|
||||
>
|
||||
<span style="top:-3.063em;margin-right:0.05em;">
|
||||
<span class="pstrut"
|
||||
style="height:2.7em;"
|
||||
>
|
||||
</span>
|
||||
<span class="sizing reset-size6 size3 mtight">
|
||||
<span class="mord mtight">
|
||||
<span class="mord mockEasternArabicFont-Regular mtight">
|
||||
۱
|
||||
</span>
|
||||
<span class="mord mockEasternArabicFont-Regular mtight">
|
||||
۱
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
`;
|
||||
|
Reference in New Issue
Block a user