The outline package^{∗} for use with L^{A}TEX2e

Gerd Neugebauer Mainzer Str. 16 56321 Rhens

             gerd@informatik.uni-koblenz.de

1997/08/26

1 Introduction

Doug Henderson has provided some routines in METAFONT to create outlined versions of arbitrary METAFONT fonts. They can be found on the CTAN in the directory tex-archive/fonts/cm/cmoutlines together with some sample files which show outlined versions of a few computer modern fonts. This package provides means to use suich outlined fonts in L^{A}TEX 2ε.

2 Usage

This file can be used as a package by placing its name in the argument of \usepackage. Afterwards some new commands are defined which are described below. Note that before these commands can be used a font has to be selected. This is done with the following command:

\SetOutlineFonts The command \SetOutlineFonts initializes the fonts used for the outlining macros. The first argument is a font specification as used by \newfont. Note that no spaces are allowed at the beginning. This font is loaded together with a font which has an o prepended to its name. The font specification may contain scaling instructions. Thus the following invocation is legal:

   \SetOutlineFonts{cmbx12 scaled \magstep2}

This instruction requires the tfm files of the fonts cmbx12 and ocmbx12 to be loadable in the given sizes. The font with the prepended o is assumed to contain the outlined version of the font without the leading o.

\outline The command \outline typesets its argument in a box using the outlined font

declared with \SetOutlineFonts.

\OutLine The command \OutLine typesets its third argument in a box using the outlined font declared with \SetOutlinedFonts. The interior of the characters is drawn in the color given as first argument. The outline is drawn in the color given as second argument. The colors can take any color names accepted by the color package. Thus

∗This file has version number v1.1, dated 1997/08/26.

\OutLine{yellow}{red}{Outlined text}

typesets the text “Outlined text” in yellow bordered in red.

3 Implementation

1 \RequirePackage{color}

\SetOutlineFonts The macro \SetOutlineFonts loads the fonts for the outline macros.

2 \newcommand\SetOutlineFonts[1]{%
3 \newfont\OL@i{o#1}%
4 \newfont\OL@ii{#1}%
5 }

\outline The macro \outline typesets its argument with the outline font.

6 \newcommand\outline[1]{\mbox{\OL@i #1}}

\OutLine The macro \OutLine typesets its argument with the outline font. The interior is filled with the color given as second argument. The color of the outline is given as third argument.

7 \newcommand\OutLine[3]{%
8 \mbox{\rlap{\textcolor{#1}{\OL@ii #3}}\textcolor{#2}{\OL@i #3}}}