19

wizpen - a Pigpen cipher-based LaTeX metafont

 5 years ago
source link: https://www.tuicool.com/articles/hit/INN7bi2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

wizpen

A Pigpen cipher -inspired font, originally created for a D&D wizard spellbook. Unlike Pigpen, characters in this font can share vertical strokes while still being readable.

Copying a spell into your spellbook involves reproducing the basic form of the spell, then deciphering the unique system of notation used by the wizard who wrote it (5E PHB, p. 114)

Based on the LaTeX pigpen font , originally (C) 2008 Oliver Corff. This is version 1.0.

You can use a package like microtype to add spacing between characters. Both "expanded" and "compact" examples are shown below.

jQn6FzE.png!web

Shoutouts

  • DMs and brewers at Battlemage Brewery in San Diego, California
  • dc858 folks (especially ice)
  • Distractions, Inc for peer review and feedback

Build prereqs

  • metafont
  • pdflatex
  • ruby (if you want to rebuild the font)

Building

  • make : Build everything
  • make clean : Clean everything
  • make redo : Run make clean and make all

Using the font

Create a texmf folder like the one here (or just copy it) and export TEXMFHOME=mytexmf before running pdflatex .

An example document will look like this:

\documentclass{article}

\usepackage[top=0.125in,bottom=0.125in,left=0.125in,right=0.125in]{geometry}
\usepackage[letterspace=150]{microtype}
\usepackage{setspace}

\usepackage{wizpen}

\begin{document}

{
    % Uncomment the \lsstyle to add a little spacing between symbols
    \Large \wizpenfont \noindent %\lsstyle
    ABCDEFGHI \enspace JKLMNOPQR \enspace STUV \enspace WXYZ \\ \\
}

\end{document}

Example

Check spellbook.tex for spoilers on what all these actually say.

ABFFjum.png!web

Modifying the font

script/wizpen.rb is how the font gets generated (check the makefile). If you want to modify it, edit that file, and the font will be regenerated at the next make .

License

Licensed under the LaTeX Project Public License : See LICENSE


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK