Adding KaTex fonts
The Text Editor supports KaTex mathematical formulas being rendered within Markdown. To fully benefit from this formatting, a set of fonts is provided by the KaTex library that is not included in ActiveUI SDK by default.
Font resources
The fonts files can be found on KaTex's github
For each font, you will have to add a @font-face
style declaration in your project.
For example with a bold font such as KaTeX_Fraktur-Bold
:
@font-face {
font-family: 'KaTeX_Fraktur';
src: url(path/to/fonts/KaTeX_Fraktur-Bold.woff2) format('woff2'), url(path/to/fonts/KaTeX_Fraktur-Bold.woff) format('woff'), url(path/to/fonts/KaTeX_Fraktur-Bold.ttf) format('truetype');
font-weight: bold;
font-style: normal;
}
Depending on the font name's suffix, you will have to adapt the font-weight
and font-style
attributes to match the type of font.