3

I have recently been trying out the stix font, and while I enjoy the font I am not a fan of the version of \ell it uses by default, and I would much prefer the default \ell I had previously. Is it possible to make this change without changing fonts all together?

To clarify,

Undesired current \ell:

bad

Desired \ell:

enter image description here

0
7

There is no “previous” \ell. That glyph is the one in Computer Modern Math and the shape is what the font designer (D. Knuth) decided. The designer of STIX Two chose a different rendering to blend it with the other lowercase calligraphic (cursive) letters, of which the font has the complete set. To the contrary, Computer Modern has just the “cursive l” in that set.

This said, you can import the \ell of Computer Modern in quite an easy way. In fontmath.ltx you find

\DeclareMathSymbol{\ell}{\mathord}{letters}{"60}

and

\DeclareSymbolFont{letters}{OML}{cmm}{m}{it}
\SetSymbolFont{letters}{bold}{OML}{cmm}{b}{it}

so all it takes is

\documentclass{article}
\usepackage{stix2}
\usepackage{fix-cm}

\DeclareSymbolFont{CMletters}{OML}{cmm}{m}{it}
\SetSymbolFont{CMletters}{bold}{OML}{cmm}{b}{it}

\DeclareMathSymbol{\ell}{\mathord}{CMletters}{"60}

\begin{document}

This is $\ell$. Note that it's different
from $\mathscr{l}$.

\end{document}

enter image description here

4

In unicode-math, you can replace a specific symbol with range=:

\documentclass{article}
\usepackage{unicode-math}

\setmainfont{STIX Two Text}
\setmathfont{STIX Two Math}
\setmathfont{NewCMMath-Regular}[
  range=\ell,
  Scale=MatchLowercase]

\begin{document}
STIX Two \(f\)

New Computer Modern \(\ell\)
\end{document}

STIX2 / NewCM sample

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.