3

When Using Times New Roman in both LuaLaTeX and Google Docs, the acute accent in each isin a different position, with Google Docs having the right one. Why does LuaLaTeX have the wrong position? I would have expected LuaLaTeX to have gotten it right. I do not want to change the font to STIX Two Text, as I have seen inconsistencies in size when using TNR Cyrillic о and STIX Two Text Cyrillic о, STT has a bigger о, and it is noticeable. I must add acute accents to vowels for a document im working on.

\documentclass[letterpaper,12pt]{article}

\usepackage{microtype}
\usepackage{unicode-math} % loads fontspec
    \setmainfont[Ligatures=TeX]{Times New Roman}
    \newfontfamily\secondfont[Ligatures=TeX]{STIX Two Text}
\usepackage[main=english,russian]{babel} 

\title{help with Cyrillic accents!}
\author{(please!)}
\date{\today}

\begin{document}

\maketitle

\foreignlanguage{russian}{
\'ы ы? {\secondfont \'ы ы?}
}

Cyrillic o looks inconsistent when using the two fonts.

\foreignlanguage{russian}{
\'o {\secondfont \'o}
}

\end{document}

It just doesn't make sense the Google Docs has the right positioning, but not LuaLaTeX. I hope there is a fix to this.

1
  • 3
    Off-topic: The fontspec font-loading option Ligatures=TeX has been the default for a decade or more. There's no need to specify this option explicitly unless your TeX distribution is of some stone-age vintage (which, fortunately, is not the case for the TeX distribution used by Overleaf).
    – Mico
    Commented Jan 29, 2024 at 7:44

2 Answers 2

6

Why does LuaLaTeX have the wrong position? I would have expected LuaLaTeX to have gotten it right. ... It just doesn't make sense the Google Docs has the right positioning, but not LuaLaTeX

Please note that LuaLaTeX does "get [the accent position] right" for the ы glyph when using Stix Two Text. Hence, don't blame LuaLaTeX; instead, if you feel so inclined, point your finger at the person(s) who apparently failed to embed sufficient amounts of meta information about the positioning of acute accents into Times New Roman.

I do not want to change the font to STIX Two Text, as I have seen inconsistencies in size when using TNR Cyrillic о and `STIX Two Text Cyrillic о, STT has a bigger о, and it is noticeable.

There's a common misperception that loading two fonts at, say, 12pt implies that their lowercase glyphs should have the same height (the so-called "x-height"). Unfortunately, that's not the case. If you want to make direct comparisons of lowercase letters across fonts, do load them in such a way that their x-heights are indeed the same. Happily, the fontspec package -- which, by the way, works with both LuaLaTeX and XeLaTeX -- makes this easy: just specify the option Scale=MatchLowercase for the second font (i.e., the one that's not specified via \setmainfont).

Once you make this adjustment -- see the screenshot below -- there's still a noticeable difference between the two glyphs, and not just for Cyrillic-o, but for Latin-o as well. However, I see no reason to call this difference in shape an "inconsistency". They're just two different fonts, with a lot of similarities, but also with a few differences.

Do note that not only the Cyrillic-o and Latin-o glyphs, but also the acute (or "sharp") accent glyphs differ across the two fonts. Once more, I see no reason for calling these differencies an inconsistency.

enter image description here

\documentclass[12pt]{article}

\usepackage{fontspec}
\setmainfont{Times New Roman}
\newfontfamily\secondfont{STIX Two Text}[Scale=MatchLowercase]

\usepackage[main=english,russian]{babel} 
\usepackage{microtype}

\begin{document}

\foreignlanguage{russian}{\'ы ы? {\secondfont \'ы ы?}}

\'o {\secondfont \'o} % Latin

\foreignlanguage{russian}{\'o {\secondfont \'o}} % Cyrillic

\end{document}
6

Note that Times New Roman is a windows system font not generally available on other platforms. MicroSoft make an old copy of the true type version available as part of the microsoft corefonts package for linux which is the version you see in Overleaf.

That font does not have good positioning for acute accent on this letter, but as documented in the fontspec manual, you can adjust the accent for commands for this eventuality.

This says to use a classic TeX \accent positioning rather than rely on the font combining acute for this letter.

enter image description here

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}

\DeclareTextCompositeCommand{\'}{TU}{ы}{\accent"B4 ы}
\begin{document}


 \'ы 

\end{document}
2
  • Umm, your solution produces the virtually the same, allegedly incorrect, position for the sharp/acute accent as in the OP's code. I think the OP wants the accent character to be placed more to the right, as is done by default with the Stix Two Text font.
    – Mico
    Commented Jan 29, 2024 at 17:42
  • 1
    @Mico I wasn't sure quite where the OP wanted it, the default pacement (if you do nothing) is at the far right as it just sticks the accent there not expecting the wide character but the code argument is arbitrary code so you could add kerns to shift the accent in any way needed Commented Jan 29, 2024 at 17:52

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.