1

I have used a font's capital letters to create a fake smallcap letters. The lowercase letters are just uppercase letters scaled at 70% and moved lower to match the base. Everything works great except when multiple small f's are in the same word. You can see the output in this case. Seems very weird to me. In my opinion, this should always give the correct shape for normal letters. Any idea what's causing this or how to solve this?

\documentclass{article}

\usepackage[math]{blindtext}
\usepackage{unicode-math}

\newcommand{\fakebold}{0.}
\newcommand{\fakestretch}{1.}
\newcommand{\scale}{1.}

\setmainfont[
  FakeBold=\fakebold,
  ItalicFont=CenturymodernTT-Italic.otf,
  ItalicFeatures={FakeBold=.5},
  BoldItalicFont=CenturymodernTT-Italic.otf,
  SmallCapsFont={CenturymodernTT-SC.otf},
  SmallCapsFeatures={
    Letters=SmallCaps,
    RawFeature=+smcp,
    Scale=\scale,
    FakeStretch=\fakestretch,
    FakeBold=\fakebold
  },
  BoldFont=CenturymodernTT-Regular.otf,
  BoldFeatures={
    Scale=\scale,
    SmallCapsFont=CenturymodernTT-SC.otf,
    SmallCapsFeatures={
      RawFeature=+smcp,
      Scale=\scale,
      FakeBold=3
    },
    FakeStretch=\fakestretch,
    FakeBold=2
  },
  BoldItalicFeatures={FakeBold=2},
  Scale=\scale,
  FakeStretch=\fakestretch
]{CenturymodernTT-Regular.otf}

\begin{document}

\textsc{Binomial Coefficients Coef ficients Coef f icients}

\end{document}

enter image description here

3
  • 1
    Did you try adding Ligatures=NoCommon to SmallCapsFeatures?
    – Thérèse
    Jul 15 at 6:36
  • same issue persists
    – Masum
    Jul 15 at 12:19
  • @Thérèse the reason disabling ligatures was not working was that ligatures were hard-mapped into the font. I removed that and the problem went away
    – Masum
    Jul 15 at 17:42

1 Answer 1

1

Latex was not able to disable ligature because the font had lookup table with ligatures so even if ligatures were disabled within fontspec, it would still be overridden. I removed those ligature lookup tables from the font using FontForge, generated the fonts again and it worked properly this time.enter image description here

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.