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 suspect this isn't valid code, but the docs are ambiguous.

fontspec is loaded with \fontspec[<font features>]{fontname}. BoldFont is included in "font features". Then I should be able to recursively define:

\setmainfont[SizeFeatures={
{Size={-8},BoldFont=Arial},
{Size=8-}}]{Hoefler Text}

But this gives

(fontspec) The following font options are not recognised:
(fontspec)     BoldFont=Arial

Not allowed or there's a way around it? My hopes were to make the whole font definitions in this way (with BoldFeatures={SizeFeatures=...} again and so on).

A minimal working file:

\documentclass{article}
\usepackage{fontspec}

\setmainfont[SizeFeatures={
{Size={-8},BoldFont=Arial},
{Size=8-}}]{Hoefler Text}

\begin{document}
Normal text\\

{\small \textbf{Small bold}}\\
\end{document}

Edit: Using Gentoo/Linux, Texlive-2010

share|improve this question
    
(Wanted to add the tag "sizefeatures" but not allowed to new members, could someone create it?) –  user7384 Aug 22 '11 at 11:55
1  
Welcome to tex.sx! I think fontspec is precise enough for a tag. –  ℝaphink Aug 22 '11 at 12:13

1 Answer 1

up vote 5 down vote accepted

define first a bold font:

\documentclass{article}
\usepackage{fontspec}

\setmainfont[BoldFont=Arial Bold,
  SizeFeatures={
  {Size={-8},BoldFont=Arial Bold},
  {Size=8-}}]{Hoefler Text}

\begin{document}
Normal text\\

{\small \textbf{Small bold}}\\
\end{document}
share|improve this answer
    
(fontspec) The following font options are not recognised: (fontspec) BoldFont=Arial Bold For immediate help type H <return>. ... l.7 {Size=8-}}]{Hoefler Text} –  user7384 Aug 22 '11 at 12:42
    
I get the above with your code, or other fonts. (XeLatex is working fine with other samples) –  user7384 Aug 22 '11 at 12:44
    
are you running Linux or Windows? –  Herbert Aug 22 '11 at 13:53
    
Sorry Linux/Gentoo, TexLive 2010 –  user7384 Aug 22 '11 at 15:09
    
2010 is a bit old for the package fontspec. Can yiou upgrade to 2011? –  Herbert Aug 22 '11 at 15:38

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.