# fakebold error in fontspec or lualatex

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.

-
I can only confirm the behavior. – egreg Nov 9 '11 at 23:41

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)

-
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
Hm when trying this I can easily twiddle up the "enbolden" factor up to very thick but I can not get it low enough. Even when I set it to 0.0 it comes out too black for me. Both in print and on screen it still looks like ink blobs to me. I suppose the technique used is not very compatible with my font... – jonalv Jul 25 '13 at 15:12
This is 4 yars old question..Lualatex supports fakeslant..does it support fakebold now? i tryied and with no succes..maybe my lualatex engine is too old? – Levan Shoshiashvili Dec 25 '15 at 23:00