Lines Matching refs:metrics

512  * Scripts only need to appear here if they do not have font metrics.
515 // Latin characters beyond the Latin-1 characters we have metrics for.
3723 * This file contains metrics regarding fonts and individual symbols. The sigma
3725 * TeX, TeX font metrics, and the TTF files. These data are then exposed via the
3726 * `metrics` variable and the getCharacterMetrics function.
3733 // The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respsectively.
3743 // The metrics themselves were retreived using the following commands:
3796 // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;
3816 // This value determines how large a pt is, for metrics which are defined
3834 // operating system. The metrics do not account for extra height from the
3838 // TODO(kevinb) allow union of multiple glyph metrics for better accuracy.
3918 * This function adds new font metrics to default metricMap
3919 * It can also override existing metrics
3921 function setFontMetrics(fontName, metrics) { argument
3922 metricMap[fontName] = metrics;
3934 throw new Error(`Font metrics not found for font: ${font}.`);
3938 let metrics = metricMap[font][ch];
3940 if (!metrics && character[0] in extraCharacterMap) {
3942 metrics = metricMap[font][ch];
3945 if (!metrics && mode === 'text') {
3946 // We don't typically have font metrics for Asian scripts.
3948 // some sort of metrics.
3950 // don't have metrics for it, just use the metrics for
3955 metrics = metricMap[font][77]; // 77 is the charcode for 'M'
3959 if (metrics) {
3961 depth: metrics[0],
3962 height: metrics[1],
3963 italic: metrics[2],
3964 skew: metrics[3],
3965 width: metrics[4]
3971 * Get the font metrics for a given size.
3986 const metrics = fontMetricsBySizeIndex[sizeIndex] = {
3992 metrics[key] = sigmasAndXis[key][sizeIndex];
4894 * * The font name, so that KaTeX can get font metrics.
4913 ["", "", ""], // A-Z bold Fraktur No font metrics
5245 * Return the font metrics for this size.
5399 metrics: getCharacterMetrics(value, fontName, mode)
5404 * Correctly pulls out metrics for the character, and optionally takes a list of
5416 const metrics = lookup.metrics;
5420 if (metrics) {
5421 let italic = metrics.italic;
5427 …symbolNode = new SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.wi…
5430 …typeof console !== "undefined" && console.warn("No character metrics " + `for '${value}' in style …
5468 if (options.font === "boldsymbol" && lookupSymbol(value, "Main-Bold", mode).metrics) {
5533 if (lookupSymbol(value, "Math-BoldItalic", mode).metrics) {
5586 if (lookupSymbol(text, fontName, mode).metrics) {
7578 // Note that our skew metrics are just the kern between each character
8146 * Get the metrics for a given symbol and font, after transformation (i.e.
8151 const metrics = getCharacterMetrics(replace || symbol, font, mode);
8153 if (!metrics) {
8157 return metrics;
8358 } // Get the metrics of the four sections
8592 * defined inside the font metrics. Since there are only three sequences that
8695 const metrics = getMetrics(delim, delimTypeToFont(sequence[i]), "math");
8696 …let heightDepth = metrics.height + metrics.depth; // Small delimiters are scaled down versions of …
10184 // For now we use the metrics for TEXT style which is what we were
12813 const metrics = options.fontMetrics();
12814 const theta = metrics.defaultRuleThickness;
13005 const metrics = options.fontMetrics(); // Rule 18a
13033 minSupShift = metrics.sup1;
13035 minSupShift = metrics.sup3;
13037 minSupShift = metrics.sup2;
13043 const marginRight = 0.5 / metrics.ptPerEm / multiplier + "em";
13061 supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);
13062 subShift = Math.max(subShift, metrics.sub2);
13063 const ruleWidth = metrics.defaultRuleThickness; // Rule 18e
13069 const psi = 0.8 * metrics.xHeight - (supShift - supm.depth);
13095 subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight);
13109 supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);
16742 // distinguish Unicode characters without metrics and those for
16989 * extends internal font metrics object with a new object