UNPKG

@mathjax/generic-font

Version:
37 lines 1.63 kB
import { ChtmlFontData } from '@mathjax/src/mjs/output/chtml/FontData.js'; import { CommonGenericFontMixin } from './common.js'; import { normal } from './chtml/normal.js'; import { delimiters } from './chtml/delimiters.js'; const Base = CommonGenericFontMixin(ChtmlFontData); export class GenericFont extends Base { constructor() { super(...arguments); this.cssFontPrefix = 'G'; } } GenericFont.NAME = 'Generic'; GenericFont.OPTIONS = Object.assign(Object.assign({}, Base.OPTIONS), { fontURL: '@mathjax/generic-font/js/chtml/woff2', dynamicPrefix: '@mathjax/generic-font/js/chtml/dynamic' }); GenericFont.defaultCssFamilyPrefix = 'MJX-G-ZERO'; GenericFont.defaultVariantLetters = { 'normal': '' }; GenericFont.defaultDelimiters = delimiters; GenericFont.defaultChars = { 'normal': normal }; GenericFont.defaultStyles = Object.assign(Object.assign({}, ChtmlFontData.defaultStyles), { 'mjx-container[jax="CHTML"] > mjx-math.G-N[breakable] > *': { 'font-family': 'MJX-G-ZERO, MJX-G-N' }, '.G-N': { 'font-family': 'MJX-G-ZERO, MJX-G-N' } }); GenericFont.defaultFonts = Object.assign(Object.assign({}, ChtmlFontData.defaultFonts), { '@font-face /* MJX-G-ZERO */': { 'font-family': 'MJX-G-ZERO', src: 'url("%%URL%%/mjx-g-zero.woff2") format("woff2")' }, '@font-face /* MJX-BRK */': { 'font-family': 'MJX-BRK', src: 'url("%%URL%%/mjx-g-brk.woff2") format("woff2")' }, '@font-face /* MJX-G-N */': { 'font-family': 'MJX-G-N', src: 'url("%%URL%%/mjx-g-n.woff2") format("woff2")' } }); //# sourceMappingURL=chtml.js.map