MWE:
\documentclass{article}
\usepackage{amsthm, amsmath}
\usepackage{unicode-math}
\setmathfont[,Scale=1,FakeStretch=1,FakeBold=0]{NewCMMath-Book.otf}
\setmathfont[range={"0028, "0029},Scale=1,FakeStretch=1,FakeBold=0]{CenturymodernTT-Regular.otf}
\begin{document}
Some random text
\begin{align*}
\log x\left(\pi(x)-\pi\left(\frac{x}{2}\right)\right)
\end{align*}
1234567890
\end{document}
I have looked at questions that sound similar but aren't really e.g.
applying math formatting to a non-math font
Unicode math at TeX primitive level
Notice how delimiter does not work with parentheses. I think it's because the font does not have math script and does not have the corresponding scaled brackets defined in the font file itself. Is there a way to make use of the delimiter of the usual CM font for this parentheses?
I have tried some scaling mechanism but I did not like the output very much because of alignment issues. To clarify, I would like to use the parentheses like this:
I was able to produce this by editing specific glyphs inside the font. First, I took the NewCM math font, replaced some glyphs with old looking ones. Then I replaced some brackets by some old glyphs and added transformations such as scaling, moving vertically, etc. Unfortunately, even though I edited brackets from v1 to v7 in the glyph table, it did not cover all possible cases which makes the output look like this:
See how some brackets work but some don't (probably the ones that require the most scaling).
Hopefully that gives a good idea of what I want to achieve and what I have tried.






amsmathandamsthmare requested,amsmathshould come first. – barbara beeton Mar 26 '24 at 16:10