For some reason the russian letter ё
is missing in some fonts, which leads to
warning (file c:/Users/mishk/OneDrive/Stuff/fonts/PTSerifPro-Regular.otf) (cff
): 'seac' character deprecated in type 2 charstring
! error: (file c:/Users/mishk/OneDrive/Stuff/fonts/PTSerifPro-Regular.otf) (cf
f): Type2 Charstring Parser: parsing charstring failed: (status=-1, stack=5)
! ==> Fatal error occurred, no output PDF file produced!
However it is pretty always acceptable to substitute it with the letter е
, but this code doesn't work:
\newunicodechar{ё}{\iffontchar\font`ё ё\else{е}\fi}
\newunicodechar{Ё}{\iffontchar\font`Ё Ё\else{Е}\fi}
Can I do the automatic substitution without declaring ё
to be an active character?
Full LuaLaTeX MWE:
\documentclass{book}
\usepackage{polyglossia}
\usepackage{newunicodechar}
\setmainlanguage{russian}
\newcommand{\MyPath}{C:/Users/mishk/OneDrive/Stuff/fonts/}
\newfontfamily{\cyrillicfont}{PTSerifPro}[
Path = \MyPath,
Extension = .otf,
UprightFont = *-Regular,
]
\newunicodechar{ё}{\iffontchar\font`ё ё\else{е}\fi}
\newunicodechar{Ё}{\iffontchar\font`Ё Ё\else{Е}\fi}
\begin{document}
ааа еее ёёё
\end{document}
ё
also – Michael Fraiman Feb 13 '18 at 19:02