# Compile warning regarding fonts

A MWE of my code is this:

\documentclass[12pt]{article}
\usepackage[top=0.7in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}

\setlength{\parindent}{0cm}

\usepackage{xltxtra}
\usepackage{xgreek}
\setmainfont[Mapping=tex-text]{GFSArtemisia.otf}
\setsansfont[Mapping=tex-text]{GFSArtemisia.otf}

\usepackage[fleqn]{amsmath}
\usepackage{unicode-math}

\begin{document}

Text goes here!

\end{document}


When I compile it I get the following warnings:

Font shape EU1/GFSArtemisia.otf(0)/bx/n' undefined(Font) usingEU1/GFSArtemisia.otf(0)/m/n' instead

Some font shapes were not available, defaults substituted.

What is the problem and how can I fix it?

You have to declare the bold, italic and bold italic fonts separately, if you don't have them installed as system fonts:

\documentclass{article}

\usepackage{fontspec}
\setmainfont[
Ligatures=TeX,
Extension=.otf,
UprightFont=*,
BoldFont=*Bold,
ItalicFont=*It,
BoldItalicFont=*BoldIt,
]{GFSArtemisia}

\begin{document}

Text goes here!

\end{document}


This is because the fonts are in the files

GFSArtemisia.otf
GFSArtemisiaBold.otf
GFSArtemisiaBoldIt.otf
GFSArtemisiaIt.otf

• Thank you very much that did the trick! May I ask you why now the titles are in bold but before (without the Artemisia font) weren't? – Adam Sep 10 '14 at 18:16
• Is the line UprightFont=*, needed? – Mico Sep 10 '14 at 18:24
• @Mico Perhaps not, but it's gives symmetry. – egreg Sep 10 '14 at 19:34
• @Adam The warning told you exactly that boldface was substituted with normal weight. – egreg Sep 10 '14 at 19:35
• @egreg I asked because in the past I had no warnings and this is the first time that I have bold letters in the title. – Adam Sep 11 '14 at 9:18