4

I am using a specific font that does not feature italic or bold fonts (GFS Elpis). I want to keep my current font as main, and specify another font only for bold and italics. What is the preamble for this?

Here is a sample code as requested:

\documentclass[12pt, oneside, a4paper]{article} 
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts} 
\usepackage{xltxtra} 
\usepackage{xgreek}
\usepackage{fontspec} 
\setmainfont[Mapping=tex-text]{GFS Elpis}

\begin{document}

\section{Testing}

This is a testing evironment on the GFS Elpis font (font for Greek)    and its ability to implement both \textbf{boldcase} or \textit{italics}. The font is downloaded from the Greek Font Society and it seems that it does not integrate bold or italics. Maybe the solution is to use a different font set for bold or italics? The following subsection will now test Greek as well. (See the footnotes)

\subsection{Ελληνικά}

Αυτό είναι ένα δοκιμαστικό αρχείο για την γραμματοσειρά GFS Elpis και τη δυνατότητά της να αναδείξει \textbf{μαύρα γράμματα}\footnote{this is supposed to be bold} και \textit{πλάγια}\footnote{this is supposed to be italics}.

\end{document}
5
  • Welcome! Please give us a small, sample document which includes the preamble you are using to configure the main font. Let us know which engine you are using to compile (e.g. LuaTeX or pdfTeX or...) and which format (e.g. LaTeX or ConTeXt or...). Without this information, we can only guess.
    – cfr
    Commented Aug 17, 2015 at 17:01
  • Do note, however, that what you want to do is likely to lead to a typographical monstrosity. It will never look 'right' if you mix another font for bold and italic. It would be better either to eschew those in your document or to choose a font which supports the range of weights and shapes you need.
    – cfr
    Commented Aug 17, 2015 at 17:06
  • I am using XeTeX,
    – chris
    Commented Aug 17, 2015 at 17:14
  • If you aren't sure what is required, have a look at [these instructions]{meta.tex.stackexchange.com/questions/228/…}. Note that there will be no general answer to this. We need to see an example and we need to know which font you want to use for bold and italic. Right now, we still don't know your format (plain? LaTeX? something else?), how you are loading GFS Elpis, what class you are using, if you are using any additional packages to configure fonts etc.
    – cfr
    Commented Aug 17, 2015 at 23:52
  • cfr you are absolutely right. I just added a sample code.
    – chris
    Commented Aug 18, 2015 at 10:09

1 Answer 1

2

You can use the fontspec facilities for this:

\documentclass[12pt, oneside, a4paper]{article} 
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts} 
\usepackage{fontspec} 
\usepackage{xgreek}

\setmainfont[
  ItalicFont={GFS Didot Italic},
  BoldFont={GFS Didot Bold},
  BoldItalicFont={GFS Didot Bold Italic},
]{GFS Elpis}

\begin{document}

\section{Testing}

This is a testing evironment on the GFS Elpis font (font for Greek) and its ability to 
implement both \textbf{boldface} or \textit{italics}. The font is downloaded from the Greek 
Font Society and it seems that it does not integrate bold or italics. Maybe the solution is to 
use a different font set for bold or italics? The following subsection will now test Greek as 
well. (See the footnotes)

\subsection{Ελληνικά}

Αυτό είναι ένα δοκιμαστικό αρχείο για την γραμματοσειρά GFS Elpis και τη δυνατότητά της να 
αναδείξει \textbf{μαύρα γράμματα}\footnote{this is supposed to be bold} και 
\textit{πλάγια}\footnote{this is supposed to be italics}.

\end{document}

Note that xltxtra is not to be loaded (it used to be handy, but nowadays it just provides a couple of rarely needed features).

enter image description here

0

You must log in to answer this question.

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