summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xfakebold
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-07-24 21:44:53 +0000
committerKarl Berry <karl@freefriends.org>2018-07-24 21:44:53 +0000
commita30761b01ce80a822f0c544edc4c2b3264dbc876 (patch)
tree8377e5e48856baf63224b5e23bab48b7aa74bfbc /Master/texmf-dist/tex/latex/xfakebold
parent1b726505a6706626ec3f57ce6205d1665a963f2f (diff)
xfakebold (24jul18)
git-svn-id: svn://tug.org/texlive/trunk@48268 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xfakebold')
-rw-r--r--Master/texmf-dist/tex/latex/xfakebold/xfakebold.sty52
1 files changed, 52 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/xfakebold/xfakebold.sty b/Master/texmf-dist/tex/latex/xfakebold/xfakebold.sty
new file mode 100644
index 00000000000..78610704a85
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/xfakebold/xfakebold.sty
@@ -0,0 +1,52 @@
+% $Id: xfakebold.sty 787 2018-07-23 18:03:13Z herbert $
+%%
+%% This is file `xfakebold.sty',
+%%
+%% Copyright (C) 2018 Herbert Voss
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%%
+\ProvidesPackage{xfakebold}[2018/07/23 v0.01 using bold characters]
+\RequirePackage{ifluatex,ifxetex,xkeyval}
+
+\def\setBold{}
+\def\unsetBold{}
+\def\fake@bold{0.3}%
+
+\DeclareOptionX{bold}{%
+ \def\fake@bold{#1}%
+ \ifdim\fake@bold pt > \p@
+ \else
+ PackageWarning{fakebold}{The value must be greater than 0. Will chooose 0.3}%
+ \def\fake@bold{0.3}%
+ \fi}
+
+\ProcessOptionsX
+
+
+\ifxetex
+ \typeout{We have XeTeX}%
+ \PackageWarning{fakebold}%
+ {^^J No LuaTeX or PDFTeX running!
+ ^^J For Xe(La)TeX use the FakeBold option from package fontspec!
+ \def\fakebold{0}}%
+\fi
+
+
+\ifluatex
+ \gdef\setBold{\pdfextension literal direct { 2 Tr \fake@bold\space w } }
+ \gdef\unsetBold{\pdfextension literal direct { 0 Tr 0 w } }
+ \typeout{We have LuaTeX}%
+\else
+ \gdef\setBold{\pdliteral direct { 2 Tr \fake@bold\space w } }
+ \gdef\unsetBold{\pdfliteral direct { 0 Tr 0 w } }
+ \typeout{We have pdfTeX}%
+\fi
+