katex
Version:
Fast math typesetting for the web.
74 lines (65 loc) • 1.59 kB
text/typescript
// Math font variants.
export type FontVariant =
| "bold"
| "bold-italic"
| "bold-sans-serif"
| "double-struck"
| "fraktur"
| "italic"
| "monospace"
| "normal"
| "sans-serif"
| "sans-serif-bold-italic"
| "sans-serif-italic"
| "script";
export type FontName =
| "AMS-Regular"
| "Caligraphic-Regular"
| "Fraktur-Regular"
| "Main-Bold"
| "Main-BoldItalic"
| "Main-Italic"
| "Main-Regular"
| "Math-BoldItalic"
| "Math-Italic"
| "SansSerif-Regular"
| "SansSerif-Bold"
| "SansSerif-Italic"
| "Script-Regular"
| "Size1-Regular"
| "Size2-Regular"
| "Size3-Regular"
| "Size4-Regular"
| "Typewriter-Regular";
//[depth, height, italic, skew, width]
export type CharacterMetricsTuple = [depth: number, height: number, italic: number, skew: number, width: number];
export type CharacterMetrics = {
depth: number;
height: number;
italic: number;
skew: number;
width: number;
};
export type FontMetrics = {
cssEmPerMu: number;
[key: string]: number;
};
export type SymbolFont = "main" | "ams";
export type MathFont =
| ""
| "mathrm"
| "mathit"
| "mathbf"
| "mathnormal"
| "mathsfit"
| "mathbb"
| "mathcal"
| "mathfrak"
| "mathscr"
| "mathsf"
| "mathtt"
| "boldsymbol";
export type TextFont = "textrm" | "textsf" | "texttt" | "amsrm" | "";
// In these types, "" (empty string) means "no change".
export type FontWeight = "textbf" | "textmd" | "";
export type FontShape = "textit" | "textup" | "";