diff --git a/src/buildCommon.js b/src/buildCommon.js index bab32096..e690fef8 100644 --- a/src/buildCommon.js +++ b/src/buildCommon.js @@ -103,13 +103,11 @@ const makeSymbol = function( /** * Makes a symbol in Main-Regular or AMS-Regular. * Used for rel, bin, open, close, inner, and punct. - * - * TODO(#953): Make `options` mandatory and always pass it in. */ const mathsym = function( value: string, mode: Mode, - options?: Options, + options: Options, classes?: string[] = [], ): SymbolNode { // Decide what font to render the symbol in by its entry in the symbols @@ -119,7 +117,7 @@ const mathsym = function( // text ordinal and is therefore not present as a symbol in the symbols // table for text, as well as a special case for boldsymbol because it // can be used for bold + and - - if ((options && options.font && options.font === "boldsymbol") && + if (options.font === "boldsymbol" && lookupSymbol(value, "Main-Bold", mode).metrics) { return makeSymbol(value, "Main-Bold", mode, options, classes.concat(["mathbf"])); diff --git a/src/functions/op.js b/src/functions/op.js index bee85f42..ad06320d 100644 --- a/src/functions/op.js +++ b/src/functions/op.js @@ -105,7 +105,7 @@ export const htmlBuilder: HtmlBuilderSupSub<"op"> = (grp, options) => { // operators, like \limsup const output = []; for (let i = 1; i < group.name.length; i++) { - output.push(buildCommon.mathsym(group.name[i], group.mode)); + output.push(buildCommon.mathsym(group.name[i], group.mode, options)); } base = buildCommon.makeSpan(["mop"], output, options); } diff --git a/test/screenshotter/images/BoldSymbol-chrome.png b/test/screenshotter/images/BoldSymbol-chrome.png index 782e1c24..045388ec 100644 Binary files a/test/screenshotter/images/BoldSymbol-chrome.png and b/test/screenshotter/images/BoldSymbol-chrome.png differ diff --git a/test/screenshotter/images/BoldSymbol-firefox.png b/test/screenshotter/images/BoldSymbol-firefox.png index 89ba26e6..8dd94533 100644 Binary files a/test/screenshotter/images/BoldSymbol-firefox.png and b/test/screenshotter/images/BoldSymbol-firefox.png differ diff --git a/test/screenshotter/images/SupSubOffsets-chrome.png b/test/screenshotter/images/SupSubOffsets-chrome.png index 81f09685..69b71fdf 100644 Binary files a/test/screenshotter/images/SupSubOffsets-chrome.png and b/test/screenshotter/images/SupSubOffsets-chrome.png differ diff --git a/test/screenshotter/ss_data.yaml b/test/screenshotter/ss_data.yaml index 12fbd3aa..4f07226c 100644 --- a/test/screenshotter/ss_data.yaml +++ b/test/screenshotter/ss_data.yaml @@ -65,7 +65,8 @@ BinCancellation: | BinomTest: \dbinom{a}{b}\tbinom{a}{b}^{\binom{a}{b}+17} BoldSpacing: \mathbf{A}^2+\mathbf{B}_3*\mathscr{C}' BoldSymbol: | - \sum_{\boldsymbol{\alpha}}^{\boldsymbol{\beta}} \boldsymbol{\omega}+ \int_{\boldsymbol{\alpha}}^{\boldsymbol{\beta}} \boldsymbol{\Omega}+\boldsymbol{Ax2k\omega\Omega\imath+} \\ + \sum_{\boldsymbol{\alpha}}^{\boldsymbol{\beta}} \boldsymbol{\omega}+ \boldsymbol{\int_\alpha^\beta} \boldsymbol{\Omega + {}} \\ + \boldsymbol{\lim_{x \to \infty} \log Ax2k\omega\Omega\imath+} \\ x \boldsymbol{+} y \boldsymbol{=} z Boxed: \boxed{F=ma} \quad \boxed{ac}\color{magenta}{\boxed{F}}\boxed{F=mg} Cases: |