# Cyrillic letters in ROOT

**URL:** <https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464>\
**Category:** ROOT\
**Created:** [January 24, 2005, 3:38pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464 "2005-01-24T15:38:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryzhinskiy](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/ccd318/32.png) [@ryzhinskiy](https://root-forum.cern.ch/u/ryzhinskiy)\
**Post date:** [January 24, 2005, 3:38pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/1 "2005-01-24T15:38:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 24, 2005, 4:16pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/2 "2005-01-24T16:16:35Z")

</div>

No, it is not possible.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [January 24, 2005, 10:01pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/3 "2005-01-24T22:01:23Z")

</div>

> [@couet](#):
>
> No, it is not possible.

Yes, with Qt layer ([root.bnl.gov](http://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](http://cad.ntu-kpi.kiev.ua/multiling/koi8-ru/ISO8859-5map.html) )

Hope this helps

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 25, 2005, 8:56am UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/4 "2005-01-25T08:56:03Z")

</div>

So that recipe should work with normal ROOT also as it uses TTF which unicode too.

---

<div class="post-metadata">

**Author:** ![Evgueni](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e19b73/32.png) [@Evgueni](https://root-forum.cern.ch/u/Evgueni)\
**Post date:** [January 25, 2005, 3:52pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/5 "2005-01-25T15:52:06Z")

</div>

[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](http://kedr.inp.nsk.su/~baldin/Cyrillic-HOWTO-russian/ch10s05.html) on russian

Evgueni

---

<div class="post-metadata">

**Author:** ![ryzhinskiy](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/ccd318/32.png) [@ryzhinskiy](https://root-forum.cern.ch/u/ryzhinskiy)\
**Post date:** [January 25, 2005, 4:09pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/6 "2005-01-25T16:09:23Z")

</div>

To couet:

> [@](#):
>
> So that recipe should work with normal ROOT also as it uses TTF which unicode too

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? 😕

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [January 25, 2005, 5:36pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/7 "2005-01-25T17:36:49Z")

</div>

[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 ☹ .

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [January 25, 2005, 9:13pm UTC](https://root-forum.cern.ch/t/cyrillic-letters-in-root/1464/8 "2005-01-25T21:13:15Z")

</div>

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](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.
