MCPcopy Create free account
hub / github.com/TruthHun/BookStack / SymbolNode

Function SymbolNode

static/katex/katex.js:1134–1170  ·  view source on GitHub ↗
(text, height, depth, italic, skew, width, classes, style)

Source from the content-addressed store, hash-verified

1132/*#__PURE__*/
1133function () {
1134 function SymbolNode(text, height, depth, italic, skew, width, classes, style) {
1135 this.text = void 0;
1136 this.height = void 0;
1137 this.depth = void 0;
1138 this.italic = void 0;
1139 this.skew = void 0;
1140 this.width = void 0;
1141 this.maxFontSize = void 0;
1142 this.classes = void 0;
1143 this.style = void 0;
1144 this.text = text;
1145 this.height = height || 0;
1146 this.depth = depth || 0;
1147 this.italic = italic || 0;
1148 this.skew = skew || 0;
1149 this.width = width || 0;
1150 this.classes = classes || [];
1151 this.style = style || {};
1152 this.maxFontSize = 0; // Mark text from non-Latin scripts with specific classes so that we
1153 // can specify which fonts to use. This allows us to render these
1154 // characters with a serif font in situations where the browser would
1155 // either default to a sans serif or render a placeholder character.
1156 // We use CSS class names like cjk_fallback, hangul_fallback and
1157 // brahmic_fallback. See ./unicodeScripts.js for the set of possible
1158 // script names
1159
1160 var script = scriptFromCodepoint(this.text.charCodeAt(0));
1161
1162 if (script) {
1163 this.classes.push(script + "_fallback");
1164 }
1165
1166 if (/[îïíì]/.test(this.text)) {
1167 // add ī when we add Extended Latin
1168 this.text = iCombinations[this.text];
1169 }
1170 }
1171
1172 var _proto3 = SymbolNode.prototype;
1173

Callers

nothing calls this directly

Calls 1

scriptFromCodepointFunction · 0.70

Tested by

no test coverage detected