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

Function getMetrics

static/katex/katex.mjs:7982–7991  ·  view source on GitHub ↗
(symbol, font, mode)

Source from the content-addressed store, hash-verified

7980 * after following replacement from symbols.js)
7981 */
7982const getMetrics = function getMetrics(symbol, font, mode) {
7983 const replace = symbols.math[symbol] && symbols.math[symbol].replace;
7984 const metrics = getCharacterMetrics(replace || symbol, font, mode);
7985
7986 if (!metrics) {
7987 throw new Error(`Unsupported symbol ${symbol} and font size ${font}.`);
7988 }
7989
7990 return metrics;
7991};
7992/**
7993 * Puts a delimiter span in a given style, and adds appropriate height, depth,
7994 * and maxFontSizes.

Callers 2

makeStackedDelimFunction · 0.85
traverseSequenceFunction · 0.85

Calls 1

getCharacterMetricsFunction · 0.70

Tested by

no test coverage detected