How to make cyrillic font look the same as in latex?

I mainly use cyrillic script. for the cyrillic text font in latex i mostly use this setup:

\documentclass[14pt]{extarticle}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}

but typst’s default New Computer Modern looks very different (see the picture). then I was trying to find it on the internet. The one that fits the most is CMU (some kind of Computer Modern as I know) but it still doesn’t support weight 400 which is default for latex (see the letters in the second example are thicker than in the third). Then I tried mutool to extract the font from a compiled latex pdf with a symbol table built by

\usepackage{fonttable}
\fonttable{\fontname\font}

which worked quite well except it had two problems:

  1. If small capital font variant is added to the document files, it applies instead of regular font. I fixed it by assigning small capital a different font family and using a show rule for small caps, but maybe there’s a better solution.
  2. Letters that have diacritics don’t work (see the last example with stresses on words) because latex stores the base symbol and attached diacritic mark separately in the font file.

All custom font files are .otf. Is there a proper way to make the font look the same in all cases?

1 Like

Hi, welcome to the Forum!

Could you provide more info?

  • Which latex engine does your LaTeX setup use? Is pdflatex the most common engine for cyrillic? It looks like it doesn’t work with xelatex nor lualatex.
  • Could you provide the source of the screenshot, so that others can test? Not everyone can type cyrillic characters on their keyboard and determine if OCR/AI works correctly.

These questions may seem obvious to natives, but they create obstacles for non-natives to help you (which might be the reason why no one replied for three days).


I’m not sure, but https://ctan.org/tex-archive/fonts/cm-unicode/fonts/otf might be useful.

Computer Modern Unicode fonts were converted from metafont sources using mftrace with autotrace backend and fontforge. … Currently the fonts contain glyphs from Latin (Metafont ec, tc, vnr), Cyrillic (lh), Greek (cbgreek when available) code sets and IPA extensions (from tipa). This font set contains 33 fonts.
CTAN: /tex-archive/fonts/cm-unicode


By the way, there’s a typst_ru channel on telegram. Perhaps you can find help there.