blob: 70dc0e678c258f5fd56c6c254e07d199092d1584 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
% $Id: xfakebold.sty 793 2018-08-06 16:39:25Z 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/08/21 v0.04 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\fake@bold{-1}}%
\fi
\ifluatex
\def\setBold{\pdfextension literal direct { 2 Tr \fake@bold\space w }\relax}
\def\unsetBold{\pdfextension literal direct { 0 Tr 0 w }\relax}
\typeout{We have LuaTeX}%
\else
\ifdim\fake@bold pt < \p@ \else
\def\setBold{\pdfliteral direct { 2 Tr \fake@bold\space w }\relax}
\def\unsetBold{\pdfliteral direct { 0 Tr 0 w }\relax}
\typeout{We have pdfTeX}%
\fi
\fi
|