# Cyrillic letters in ROOT

Hello. Is it possible to place on ROOT canvas (via TText, TLegend …) cyrllic letters? If it is so, how can I do that?
Thank you beforehand.

No, it is not possible.

Yes, with Qt layer (root.bnl.gov) one can any local fonts and much more because Qt uses UNICODE (as well as Win32)

You can define the default codepage via ROOT $ROOTSYS/etc/system.rootrc resource file. For example one can find there the line Unix..Gui.DefaultFont: -adobe-helvetica-medium-r---12------iso8859-1 To get the russian fonts just define there the cyrrilic font - “iso8859-5” Unix..Gui.DefaultFont: -adobe-helvetica-medium-r---12------iso8859-5 See: cad.ntu-kpi.kiev.ua/multiling/ko … -5map.html ) Hope this helps So that recipe should work with normal ROOT also as it uses TTF which unicode too. [quote=“ryzhinskiy”]Hello. Is it possible to place on ROOT canvas (via TText, TLegend …) cyrllic letters? If it is so, how can I do that? Thank you beforehand.[/quote]You could use LaTeX and psfrag package. Something like that: \documentclass{article} \usepackage{psfrag} \begin{document} \pagestyle{empty} \psfrag{mark}{Cyrillic letter\ldots} \includegraphics{your root eps picture with <<mark>> instead <<Cyrillic letter\ldots>>.eps} \end{documents} Run latex on that file and dvips with option -E. Now you have cyrillic letters in eps picture. Link about psfrag on russian Evgueni To couet: When I use, for instance, iso8859-5 coding instead iso8859-1 the following message appears: Warning in <TGClient::GetFontByName>: couldn't retrieve font -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-5, using "fixed" What proper font name should I write in the$ROOTSYS/etc/system.rootrc file?

[quote=“ryzhinskiy”]
What proper font name should I write in the $ROOTSYS/etc/system.rootrc file? [/quote] Did you try Qt or X11 layer? With the Qt layer the font name is not relevant, it just indicates the desirable “shape” to be used. The code page defines the code of your strings with 8-bit coding. It does count the custom localization also. Qt layer should work with no extra effort. I don’t know precisely what X11 layer does though . Hi, [quote=“ryzhinskiy”]When I use, for instance, iso8859-5 coding instead iso8859-1 the following message appears: Warning in <TGClient::GetFontByName>: couldn't retrieve font -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-5, using "fixed" What proper font name should I write in the$ROOTSYS/etc/system.rootrc file? :?[/quote]
Check man xfs - that’s the server translating the font names into actual fonts. It tells you where the config file resides (usually /usr/X11R6/lib/X11/fs/config), and that file tells you what dirs are checked when looking for fonts. I have /usr/X11R6/lib/X11/fonts/TTF/ in there, and that contains the true type font files. In that dir, there are two text file named fonts.dir and fonts.alias. They contain the “translations” between font names like “Sans-medium-r-normal–0-0-0-0-p-0-iso8859-4” to a font file name, say “luxisr.ttf”. Make sure that you have fonts with “iso8859-5” support in this TTF directory. If you don’t have such a font, get one e.g. from http://www.slovo.info/unifonts.htm. At the bottom of that page you’ll find info on how to install them under linux / unix.
Axel.