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 am sometimes using a font that has no boldface, so I am wondering whether or not there is a way to use some fakebold-feature in LuaLaTeX.

The fontspec documentation explains a feature for XeLaTeX, which does not (yet?) work in LuaLaTeX.

  1. Does fakebold already work in LuaLaTeX?
  2. If not, is something like it planned?
  3. If yes, is there any scheduled release date for this feature?
  4. If no to all the above: is there a hack or workaround?

MWE:

% !TEX TS-program = lualatexmk
\documentclass[20pt, a4paper, DIV=calc]{scrbook}

\usepackage{fontspec}

\setmainfont[AutoFakeBold=2.0]{Times New Roman}

\begin{document}

A Test. \textbf{A bold test}?

\end{document}
share|improve this question
    
do you have any problem to try it out? –  Herbert Mar 15 '13 at 6:44
1  
I did and it does not work. I added a MWE to my question. –  ClintEastwood Mar 15 '13 at 6:54
    
Times already has a bold variant. –  Herbert Mar 15 '13 at 7:25
1  
Yes. This, however, is a MWE for testing and showing. I did not want to spent time on looking for a font that (a) does not have a boldface and (b) is installed on every user's system. A MWE should work on all systems. –  ClintEastwood Mar 15 '13 at 7:34
2  
It can be implemented in luaotfload, but XeTeX implementation has its problems already, so a better solution is needed first (not that I volunteer to implement it). –  Khaled Hosny Mar 15 '13 at 12:52

1 Answer 1

up vote 8 down vote accepted

@ 1, yes it does work in LuaTeX. Here's how. Note that this also works in plain pdftex if you throw out lines 2 and 3.

\documentclass[20pt, a4paper, DIV=calc]{scrbook}
\usepackage{fontspec}
\setmainfont{Times New Roman}

\renewcommand{\textbf}[1]{%
    \pdfliteral direct {2 Tr 1.5 w} %the second factor is the boldness 
     #1%
    \pdfliteral direct {0 Tr 0 w}%
}

\begin{document}
A Test. \textbf{A »bold« test}?
\end{document}

@ 2, via fontspec, it doesn't work in LuaTeX yet, but you know that already :)

@ 3, see Khaled's comment

@ 4, yes, I guess what I justed posted can be considered a workaround or even a hack, as it bypasses fontspec and works at pdf level

that said, I strongly disadvise against using either this hack (with Lua) or fakebold (with Xe) as a substitute for a proper bold font, as the results are unpredictable -- when it comes to printing!

I tried using fakebold not to fake bold, but to create a fake footnote-size grade of a font that, like most fonts in our times, only comes in one grade. A grade optimized for a smaller size usually has (among other features) its stroke width increased, particularly in the hairlines and serifs. This is what I wanted to emulate. What I did was add just a tiny little bit of extra fake-boldness in \footnotesize, so the serifs at that size were as sturdy as the ones at \normalsize (rather than proportionally thinner).

fake opticals fake opticals using a fake boldness of 0.16. Note how, at different point sizes, serif thickness remains identical (or different, depending on how you look at it)

While, after some tweaking, things looked great on screen, particularly when magnified, what ended up on paper was horrible. The \footnotesize passages, on a contemporary business-class LaserJet at 1200dpi, were way too fat. Reducing the amount a bit yielded no significant change. Reducing it further, I abruptly arrived back at the font's default appearance. This probably has to do with the way the printer interprets the original font outlines vs. how it interprets the font outlines with added fake boldness.

Note to self: just like fake italics, fake bold is not an option for serious typographic business. But, to be fair, noone promised it would be :)

share|improve this answer

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.