[XeTeX] font shapes not defined resulting in accents too high?

Bruno Voisin bvoisin at mac.com
Wed Jul 28 07:58:49 CEST 2004

Le 28 juil. 04, à 04:26, Cyril Niklaus a écrit :

> I'm trying to typeset for my pleasure L'Etranger by Camus using XeTeX 
> and Adobe Garmond as the font, but I ran across a problem, as the 
> program tells me some font shapes are not defined. Thing is, they are 
> defined in the preamble. Where is one to look for other places to 
> define them? I'm tried using the font defs provided inthe example and 
> once on this list, with similar error messages.
> Is it because I use the book class?
> Since the book is in french, I use the \usepackage[francais]{babel}, 
> but when the fonts are substituted this is what I see:
> <ToC.tiff>. Notice how far too high the accent is?

This is because babel has been designed with standard (La)TeX in mind: 
it assumes you are using fonts in either OT1 encoding (the 7-bit ASCII 
encoding of the original Computer Modern -- CM -- fonts) or T1 encoding 
(the 8-bit encoding, also known as Cork, of the European Computer 
Modern -- EC -- fonts), not fonts in Unicode encoding.

Hence, for maximum compatibility -- in standard (La)TeX sense -- it 
contains definitions such as (from french.ldf):

    \def\contentsname{Table des mati\`eres}%
    \def\listfigurename{Table des figures}%
    \def\listtablename{Liste des tableaux}%
    \def\figurename{{\scshape Fig.}}%
    \def\tablename{{\scshape Tab.}}%
    \def\partname{\protect\@Fpt partie}%
    \def\@Fpt{{\ifcase\value{part}\or Premi\`ere\or Deuxi\`eme\or
    Troisi\`eme\or Quatri\`eme\or Cinqui\`eme\or Sixi\`eme\or
    Septi\`eme\or Huiti\`eme\or Neuvi\`eme\or Dixi\`eme\or Onzi\`eme\or
    Douzi\`eme\or Treizi\`eme\or Quatorzi\`eme\or Quinzi\`eme\or
    Seizi\`eme\or Dix-septi\`eme\or Dix-huiti\`eme\or Dix-neuvi\`eme\or
    \def\alsoname{{\emph{voir aussi}}}%
    \def\enclname{P.~J. }%
    \def\ccname{Copie \`a }%
    \def\proofname{D\'emonstration}% for AMS-\LaTeX

The problem is, commands such as \`e don't work well in XeTeX which is 
based on Unicode and expects è instead. Generally what I do (as I don't 
like Babel's defaults most of the time anyway) is redefinitions in the 
preamble, such as:

   \renewcommand{\contentsname}{Table des matières}}

or even better for my taste:


As I am writing this I receive Ross' post which solves all these 
problems in a much more general and elegant way, so please regard my 
post as complementary information only.

> The message I get is:
> LaTeX Font Warning: Font shape `OT1/AdobeGaramondPro/bx/n' undefined
> (Font)              using `OT1/cmr/m/n' instead on input line 57.

The occurence of \`e makes TeX look for the font Adobe Garamond Pro in 
OT1 encoding, but this font has only been defined in U encoding. This 
message should disappear with the above redefinitions.

> LaTeX Font Warning: Font shape `U/AdobeGaramondPro/m/sl' undefined
> (Font)              using `U/AdobeGaramondPro/m/n' instead on input 
> line 65.

There is no slanted version of Adobe Garamond Pro defined. I don't know 
(not having the font myself) whether this version exists. If not, you 
can use in the preamble:

> \DeclareFontShape{U}{AdobeGaramondPro}{m}{sl}%
>      {<-> ssub * AdobeGaramondPro/m/it}{}

Hope this helps,

Bruno Voisin

More information about the XeTeX mailing list