Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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} 
share|improve this question
    
Remove the loading of inputenc and of fontenc. Where did you download the font? –  egreg Apr 28 at 17:45
    
I removed them but the error is still there. Constantia exists in fontspec package –  user50475 Apr 28 at 17:49
    
What error do you get? –  egreg Apr 28 at 17:51
1  
You can't get an error from inputenc if you don't load it. –  egreg Apr 28 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 at 17:56

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.