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.

Kerkis font is an OpenType font that has Greek glyphs Small Caps both for regular and bold shapes. The names of the OTF files are KerkisSmallCaps.otf and KerkisSmallCaps-Bold.otf.

When I compile the following example, the textbf is ignored. This is not surprising, as only the regular font is declared.

If I replace KerkisSmallCaps with KerkisSmallCaps-Bold then (obviously) the bold shape is used for both lines.

\documentclass{article}

\usepackage{fontspec}

\setmainfont[
    UprightFont = Kerkis,
    ItalicFont = KerkisItalics,
    SlantedFont = KerkisItalics,
    BoldFont = Kerkisb,
    BoldItalicFont = Kerkisbi,
    BoldSlantedFont = Kerkisbi,
    SmallCapsFont = KerkisSmallCaps]
    {Kerkis}

\begin{document}
\textsc{κείμενο στα ελληνικά}

\textbf{\textsc{κείμενο στα ελληνικά}}
\end{document}

The question is, how can I make xelatex typeset the first sentence in the regular shape and the second sentence in the bold one? What options should be passed at fontspec?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I guess bold small caps is so uncommon that the fontspec authors didn't consider it. As a workaround you could separately define a new font command for bold small caps.

\documentclass{article}
\usepackage{fontspec}
\setmainfont[
    UprightFont = Kerkis,
    ItalicFont = KerkisItalics,
    SlantedFont = KerkisItalics,
    BoldFont = Kerkisb,
    BoldItalicFont = Kerkisbi,
    BoldSlantedFont = Kerkisbi,
    SmallCapsFont = KerkisSmallCaps]
    {Kerkis}

\newfontface\bfsc{KerkisSmallCaps-Bold}

\begin{document}
\textsc{κείμενο στα ελληνικά}

{\bfsc κείμενο στα ελληνικά}
\end{document}
share|improve this answer
    
Thank you! Yeah I know that it is a rather obscure choice, but I was fooling with fontspec and I couldn't figure out how to do it. I thought about creating a new fontface but I believed that there would be an option. If nothing else comes up, I'll accept your answer. –  pmav99 May 1 '11 at 16:09
1  
@pmav: Maybe Will or Khaled see this and can shed some light on the absence of a BoldSmallCapsFont option. –  Caramdir May 1 '11 at 16:13
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.