1

I've seen many references online that say something along the lines of "XeTeX assumes its input is Unicode by default." From this I imagined that I would be able to put in some French text with accents and have it come out accented, but instead these letters don't print correctly. Here's my MWE, in a file called test.tex

\obeylines
La cigale, ayant chanté
Tout l'été
Se trouva fort dépourvue
quand la bise fut venue.

\bye

After running xetex test, I get test.pdf which shows up like this:

enter image description here

Is there something else I have to do to get these accents to appear? Ideally I'd like to do this with any font, not just CM. A different (but equally wrong) thing happens when I switch to a different font (Adobe Caslon) using \font\ctenrm="ACaslonPro-Regular" at 10pt.

enter image description here

1
  • latex defaults to opentype fonts with xetex, if you use plain you are using code that predates Unicode, so it just does what it does with TeX82 Commented Mar 7 at 21:16

2 Answers 2

1

You have to choose a font that supports Unicode, so OpenType or TrueType.

\font\main="[lmroman10-regular.otf]:mapping=tex-text"
\main

\obeylines
La cigale, ayant chanté
Tout l'été
Se trouva fort dépourvue
quand la bise fut venue.

\bye

enter image description here

More information in xetex-reference.pdf

1

You need font(s) that support that character set. For example,

\font \ariblk="[ariblk.ttf]" at 11pt
\font \corsclight="[CormorantSC-Light.ttf]" at 11pt
\obeylines
\ariblk  
La cigale, ayant chanté
Tout l'été
Se trouva fort dépourvue
quand la bise fut venue.

\corsclight 
La cigale, ayant chanté
Tout l'été
Se trouva fort dépourvue
quand la bise fut venue.
\bye

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .