Skip to content

Commit d3c6941

Browse files
gucci-on-fleekzauguin
authored andcommitted
Update embolden documentation.
1 parent d414e42 commit d3c6941

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

doc/luaotfload-main.tex

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,32 @@
11071107
\endaltitem
11081108

11091109
\beginaltitem {embolden}
1110-
A factor, defined as a decimal number.
1110+
A factor, defined as a decimal number. This fakes a bold font by
1111+
stroking the glyph outlines with an outline of a constant width. This
1112+
is typographically not ideal, but can give acceptable output when the
1113+
factor and is rendered correctly by the PDF viewer. However, many PDF
1114+
viewers---most notably Chrome---completely misrender the effect at low
1115+
zoom levels, so you should only use this feature on fonts typeset at
1116+
large sizes, if you know for certain which PDF viewers will be used to
1117+
view the document, or if you're printing to paper.
1118+
1119+
\identifier{luaotfload} defines the \identifier{embolden} feature to
1120+
give the same results as the same feature in \XeTeX, so its definition
1121+
is rather obscure: internally, the \identifier{embolden} parameter is
1122+
divided by~10, multiplied by the font size in \TeX{} points
1123+
(\verb|pt|), and then directly written to the PDF file as the stroke
1124+
width (therefore treating \TeX{} points as PostScript points
1125+
(\verb|bp|)). As an additional feature not present in \XeTeX, if you
1126+
set the \identifier{embolden} parameter to exactly~0, \LuaTeX{} will
1127+
stroke the font without setting the stroke width, meaning that the
1128+
stroke width will be inherited from the outer PDF graphics state.
1129+
1130+
Setting \identifier{embolden} to values below~0.5 is only useful for
1131+
print documents, since many PDF viewers will always render the stroke
1132+
widths at some greater minimum value; setting \identifier{embolden} to
1133+
values above~20 is rarely useful since if the stroke overlaps with
1134+
itself, there will be significant visual artifacts. Useful values are
1135+
generally between~1 and~10.
11111136

11121137
For example
11131138

0 commit comments

Comments
 (0)