Tell me more ×
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 have been trying to fake small caps which are not available in Myriad Pro. So I used the Scale and FakeBold options. Scaling is allright, but as you all know the glyphs slim out. To work against that I tried to "fatten" them somewhat.

The code below does not "fatten" the scaled characters when using lualatex (latest TeX-Live). Using xelatex (also latest TeX-Live) works fine.

I think its a bug.

\documentclass[11pt,a4paper]{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Heros}
\begin{document}
ABC {\fontspec[FakeBold=5,Scale=0.72]{TeX Gyre Heros} ABC} ABC
\end{document}

For demonstration the code above uses another fontwich actually supports small caps.

share|improve this question
1  
I can only confirm the behavior. – egreg Nov 9 '11 at 23:41

1 Answer

LuaTeX does not support emboldening, so FakeBold will not work. fontspec should issue a warning here.

It might be possible to implement emboldening in lua, say in luaotfload package, but I didn't investigate closely.

Here is a work around using pdf literals (which is essentially what XeTeX does behind the scenes).

\def\embolden#1#2{%
    \pdfliteral direct {2 Tr #1 w}%
     #2%
    \pdfliteral direct {0 Tr 0 w}%
}
ABC \embolden{0.5}{ABC} ABC
\bye

This even works with pdftex.

(Note, when you use Scale=0.72, the FakeBold will be 5*0.72, so you might want to use 0.36 instead of 0.5)

share|improve this answer
Works fine, twiddling with Scale and "enbolden" I get an fake "small caps" thats close enough to the real thing. – Michael Ewe Nov 10 '11 at 21:50

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.