1

I can not write some French letters (é, è, â, ...) when I use the font Constantia.
This is what I declared before the start of my document:

\usepackage[utf8]{inputenc}  
\usepackage[T1]{fontenc}   
\usepackage{fontspec}
\setmainfont{Constantia}

How can I use this font and be able to write in French without a problem ?

Here is the full packages list I loaded:

\usepackage[utf8]{inputenc}  
\usepackage[T1]{fontenc}   
\usepackage{fontspec}
\setmainfont{Constantia}
\usepackage[frenchb]{babel}  
\usepackage[english]{babel}
\usepackage{multirow}
\usepackage{listings}
\usepackage[export]{adjustbox}
\usepackage{bchart}
\usepackage{array}%for setting cells length
\usepackage{color} 
\usepackage{colortbl}
\usepackage[grey,utopia]{quotchap}
\usepackage{tabularx}
\usepackage{enumitem}
\usepackage{pifont}
\frenchbsetup{StandardLists=true}
\usepackage{wasysym}%for the phone
\usepackage[square, numbers, comma, sort&compress]{natbib} 
  • Remove the loading of inputenc and of fontenc. Where did you download the font? – egreg Apr 28 '14 at 17:45
  • I removed them but the error is still there. Constantia exists in fontspec package – user50475 Apr 28 '14 at 17:49
  • What error do you get? – egreg Apr 28 '14 at 17:51
  • 1
    You can't get an error from inputenc if you don't load it. – egreg Apr 28 '14 at 17:52
  • 1
    Perhaps you're loading a class or package that internally loads inputenc. You need to provide a minimal working example (MWE) that illustrates the problem. – Nicola Talbot Apr 28 '14 at 17:56
2

Load everything which depends to a font setting before loading fontspec. Then it works, at least for me :-)

\documentclass{book}
\usepackage{wasysym}%for the phone
\usepackage[grey,utopia]{quotchap}
\usepackage{pifont}
\usepackage{fontspec}
\setmainfont{Constantia}
\usepackage[english,frenchb]{babel}  

\usepackage{multirow}
\usepackage{listings}
\usepackage[export]{adjustbox}
\usepackage{bchart}
\usepackage{colortbl}
\usepackage{tabularx}
\usepackage{enumitem}
\frenchbsetup{StandardLists=true}
\usepackage[square, numbers, comma, sort&compress]{natbib} 
\begin{document}
é, è, â

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy