3

I am using XeTeX and love it very much. When I use helatex, I have no problems at all. But I want to try do it «True Way»: plainTex. XeTeX takes all annoyance with unicode from me, but sample like this

\font\foo=bar
\foo
{\bf Привет, мир!}


{Jellios}
\bye

fails, because font have not cyrillic symbols. So, my question is example of font(with tfm file), that have cyrillic symbols.

My system is Arch GNU/Linux.

jarnosc
  • 4,266
KAction
  • 703
  • 2
    You basically have to reproduce the working of \usepackage[utf8]{inputenc} and of \usepackage[T2A]{fontenc}. Not impossible, but quite a project. – egreg May 12 '12 at 12:17
  • Why do you want to use a font with tfm with xetex? Why don't you use simply a system font with cyrillic symbols? And why do you want to restrict yourself to an old and plain system when newer and better systems like latex or context exist? – Ulrike Fischer May 12 '12 at 12:49
  • 1
    @Ulrike: the word "restrict" is sooooo out of place in your comment! ;-) – morbusg May 12 '12 at 15:10
  • @Ulrike: Because I want to combine deep understanding that can be digged in Knuth' book and UTF-8 convinence. – KAction May 19 '12 at 08:42

2 Answers2

2

I managed to make it work with the following settings:

Created file in WIN1251 encoding with the following contents:

\font\rm=larm1095
\font\bf=labx1095

\beginsection
Что сказал медведь

\rm

Выпей водки и сыграй на балалайке, Иван

\bye

Compiled it with pdftex.

I used this answer by David Carlisle in the neighbour thread to determine the font, which is used by latex, so all credits go to him.

Hope this helps.

Pukeko
  • 21
1

The Plain \bf macro calls \fam6 (change math family) and also \tenbf (the actual font name), which is (by default) the Computer Modern tfm ten point bold font. So you could do (note, you said your example uses tfm, my example uses OpenType font which came with OSX, because you explicitly mentioned XeTeX and Unicode):

\font\tenrm="Baskerville"
\font\tenbf="Baskerville/B"
\rm

{\bf Привет, мир!}

Jellios
\bye
morbusg
  • 25,490
  • 4
  • 81
  • 162
  • What does this have to do with the question? – egreg May 12 '12 at 15:21
  • @egreg: what do you mean? Does my edit clear things up? – morbusg May 12 '12 at 16:04
  • The question deals with "classical" TeX fonts (with tfm file). – egreg May 12 '12 at 16:18
  • @egreg: I understand the question differently. – morbusg May 12 '12 at 17:55
  • XeTeX dont find tfm file for Baskervillie so by analogy I tried use DejaVu Sans Mono, that works perfectly for xelatex. Strangely, I get no cyrillic symbols. – KAction May 19 '12 at 08:43
  • @illusionoflife: XeTeX doesn't need tfm files for OpenType fonts, it can use the system fonts directly. What fonts are available on your OS depends on the system you use. I use Mac OS X, and Baskerville comes with that. A common font which comes with both Windows and OS X is Arial which includes cyrillic. But depending on what you're doing, it may well not be that great a font all things considered. Maybe you could try out Charis SIL and see if you like it? Just install it on your OS and then you can use it in XeTeX. – morbusg May 19 '12 at 10:12
  • @illusionoflife: also, DejaVu Sans Mono (OTF) should work just by \font\blah="DejaVu Sans Mono" \blah Привет\bye. – morbusg May 19 '12 at 10:57