\documentclass[12pt]{article}

\usepackage{bigstrut}
\usepackage{fontspec}
\usepackage{hyperref}
\usepackage{url}

\title{Genjimon fonts, v0.2}
\author{Matthew Skala}
\date{October 2, 2012}

\newfontface\genjiface[Scale=1.1,ExternalLocation]{GenjimonMedium.ttf}
\newcommand\genji[1]{{\genjiface #1}}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\maketitle

\section{Genjimon}

The \textit{Genjimon} (lit.~``Genji crests'') are a set of 54 abstract
visual designs associated with Japanese culture.  They as used as chapter
numbers in the Heien Period classic \textit{The Tale of Genji}, which dates
from the turn of the 11th Century; they are also used in an
incense-appreciation game that was popular in that era.  Much later, Edo
Period ``floating world'' (\textit{ukiyo-e}) woodblock prints (from the 18th
and 19th Centuries) were sometimes produced in series corresponding to the
Genji chapters; the actual subject matter of the prints might be only
remotely connected to the book.  The Genjimon often appeared on the prints,
and collectors use them to identify the prints within the series.

In the incense game,\footnote{I am describing a form that may be more recent
than the Heien Period.} players experience five samples of incense, some
of which might be the same, and must guess which of the samples go together.
They indicate their guesses in writing using
Genjimon.  In the crest, the vertical bars represent the five incense
samples; bars joined horizontally or in \textsf{T}-shapes are the same
incense, but bars crossing each other are not.  For instance, this crest
\begin{center}
  \Huge\genji{L}
\end{center}
means that (reading from the left) the first, third, and fourth samples are
the same as each other, but are different from the second and fifth, which are
the same as each other.

These kinds of patterns, formed by putting $n$ distinguishable things into
$n$ indistinguishable bins, have some mathematical interest.  The number of
such patterns for $n$ things is called the $n$-th Bell number; in the case
$n=5$, it is $52$. As well as incense patterns, Bell numbers correspond to
the possible rhyme schemes for an $n$-line poem.  The pictures themselves
are called ``Murasaki diagrams'' in mathematics, after the author of the
\textit{Tale of Genji}.  Another interesting question is the number of
\emph{non-crossing} Murasaki diagrams for $n$ things.  Not every pattern of
incense can be expressed without the lines crossing each other; the number
that can, for $n$ samples, turns out to be equal to the $n$-th Catalan
number.

Readers may have noticed that I said there are 54 glyphs, but I also said
only 52 different patterns are possible.  In fact, there are two duplicated
patterns, each represented by two different but combinatorially equivalent
glyphs in the traditional set.  One of the duplicate pairs is easy to
recognize; the other is much harder.

Is there any structure in the chapter sequence of crests?  Is there any
connection or similarity to the sequence of hexagrams of the I~Ching?

\section{What's new?}

New in version 0.2:
\begin{itemize}
\item Autotools build system, integrated with the Tsukurimashou build.
\item Bundled METATYPE1 derivative, making it easier to build on a system
that just has a standard \TeX\ installation (no mtype13 needed anymore).
\item Two new ``round'' font styles.
\end{itemize}

\section{About the fonts}

This package contains six TrueType fonts (illustrated on the following
pages) for printing the Genjimon in six different styles.  The glyphs are
mapped, in Genji chapter order, to ASCII codes 65 to 91 (A to Z followed by
[), and 97 to 123 (a to z plus \{).  The intention is to make them easy to
type.  As far as I know, there is no standard encoding for the Genjimon; in
the Tsukurimashou Project, from which this package descends, Genjimon glyphs
are mapped into the Unicode Private Use Area at code points U+F17C1 to
U+F17F6, but if they're going to be in a font by themselves, it makes sense
to me to map them into the ASCII range.

The fonts are written in the METAFONT language, intended to be processed by
Tsukurimashou's customized version of METATYPE1 to create Postscript files
and then by FontForge to further clean up the Postscript and generate
TrueType output (which seems to be what the largest number of
nonprofessional users want).  If you actually want Postscript or OpenType as
the final form, it should be easy to edit the FontForge script to produce
that; but don't just skip FontForge, because the output of METATYPE1 is
\emph{not} well-behaved; the clean-up steps are necessary.

As of version 0.2, these fonts are packaged as a ``parasite'' of the
Tsukurimashou Project.  See the Web site at
\url{http://tsukurimashou.sourceforge.jp/} for more information.  All bug
and support requests should be filed in the Tsukurimashou Project's ticket
tracker, using the ``Parasite font packages'' component selection.

When distributed as an independent package, Genjimon comes with a standard
GNU Autotools build system.  Type ``./configure'' to set it up, and ``make''
to build it.  The ``make install'' target is supported, but because font
installation is often quite system-specific, that target may not really do
what you want, and you might be better served by just copying the font files
out of the build directory after running plain ``make.''  There is also a
``make check'' target, which runs FontForge's fontlint program on all the
installable fonts.  How well it works, however, may be questionable, because
fontlint sometimes flags harmless conditions as errors.

These are released under the GNU General Public License, version 3, with
font-embedding clarification.  See the file named COPYING and note the
following addition:

\begin{quotation}
As a special exception, if you create a document which uses this font, and
embed this font or unaltered portions of this font into the document, this
font does not by itself cause the resulting document to be covered by the
GNU General Public License. This exception does not however invalidate any
other reasons why the document might be covered by the GNU General Public
License. If you modify this font, you may extend this exception to your
version of the font, but you are not obligated to do so. If you do not wish
to do so, delete this exception statement from your version.
\end{quotation}

The license means (and this paragraph is a general summary, not overriding
the binding terms of the license) that you may use the fonts at no charge;
you may modify them; you may distribute them with or without modifications;
but if you distribute them in binary form, you must make the source code
available.  Furthermore (this is where font-embedding becomes relevant)
embedding the font, for instance in a PDF file, does not automatically
trigger the source-distribution requirement.

I would like to emphasize that I do take the source-distribution
requirement seriously.  I am particularly concerned about the large number
of ``free'' font Web sites that \emph{sell} fonts of dubious legality (some
free, some shareware, some simply pirated commercial) in large collections
without credit to the original authors, representing themselves as the
source of the fonts and never mentioning any possibility that users might
end up owing shareware fees on top of the money they already paid for the
``free'' TrueType files.  I don't care about making money from these fonts,
but I do want credit for my work, and I don't want others to make money from
these fonts without giving me credit, nor do I want to support the general
corrupt business of the free-fonts Web sites. Hence the choice of the GPL. 
The not-really-free Web sites I object to are not set up to distribute
source code, so this license means that if they file off the serial numbers
and distribute my work as bare TrueType files, it will be very clear that
they are acting illegally, and I can sue them.  However, it'll still be
possible for good-faith actors to share the fonts without needing further
licensing arrangements.

I'd love to hear from users of these fonts, especially if you think of
something interesting or unusual to do with them.

\vspace{\baselineskip}

\noindent Matthew Skala\\
\url{http://ansuz.sooke.bc.ca/}\\
\url{mailto:mskala@ansuz.sooke.bc.ca}\\
\textit{October 2, 2012}

\clearpage

\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Genjimon Medium}

{\fontspec[Scale=3.5,ExternalLocation]{GenjimonMedium.ttf}
ABCDEFGHI

JKLMNOPQR

STUVWXYZ[

abcdefghi

jklmnopqr

stuvwxyz\{}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Genjimon Reverse}

{\fontspec[Scale=3.5,ExternalLocation]{GenjimonReverse.ttf}
ABCDEFGHI

JKLMNOPQR

STUVWXYZ[

abcdefghi

jklmnopqr

stuvwxyz\{}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Genjimon White}

{\fontspec[Scale=3.5,ExternalLocation]{GenjimonWhite.ttf}
ABCDEFGHI

JKLMNOPQR

STUVWXYZ[

abcdefghi

jklmnopqr

stuvwxyz\{}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Genjimon Black}

{\fontspec[Scale=3.5,ExternalLocation]{GenjimonBlack.ttf}
ABCDEFGHI

JKLMNOPQR

STUVWXYZ[

abcdefghi

jklmnopqr

stuvwxyz\{}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Genjimon Round}

{\fontspec[Scale=3.5,ExternalLocation]{GenjimonRound.ttf}
ABCDEFGHI

JKLMNOPQR

STUVWXYZ[

abcdefghi

jklmnopqr

stuvwxyz\{}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Genjimon Round Outline}

{\fontspec[Scale=3.5,ExternalLocation]{GenjimonRoundOutline.ttf}
ABCDEFGHI

JKLMNOPQR

STUVWXYZ[

abcdefghi

jklmnopqr

stuvwxyz\{}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Encoding table}

\begin{tabular}{rrccl}
 dec & hex & key & mon & chapter \\ \hline \bigstrut[t]
  65 & 41 & A & \genji{\large A} & \#1 Kiritsubo \\
  66 & 42 & B & \genji{\large B} & \#2 Hahakigi \\
  67 & 43 & C & \genji{\large C} & \#3 Utsusemi \\
  68 & 44 & D & \genji{\large D} & \#4 Yuugao \\
  69 & 45 & E & \genji{\large E} & \#5 Wakamurasaki \\
  70 & 46 & F & \genji{\large F} & \#6 Suetsumuhana \\
  71 & 47 & G & \genji{\large G} & \#7 Momiji no Ga \\
  72 & 48 & H & \genji{\large H} & \#8 Hana no En \\
  73 & 49 & I & \genji{\large I} & \#9 Aoi \\
  74 & 4a & J & \genji{\large J} & \#10 Sakaki \\
  75 & 4b & K & \genji{\large K} & \#11 Hana Chiru Sato \\
  76 & 4c & L & \genji{\large L} & \#12 Suma \\
  77 & 4d & M & \genji{\large M} & \#13 Akashi \\
  78 & 4e & N & \genji{\large N} & \#14 Miotsukushi \\
  79 & 4f & O & \genji{\large O} & \#15 Yomogyuu \\
  80 & 50 & P & \genji{\large P} & \#16 Sekiya \\
  81 & 51 & Q & \genji{\large Q} & \#17 Eawase \\
  82 & 52 & R & \genji{\large R} & \#18 Matsukaze \\
  83 & 53 & S & \genji{\large S} & \#19 Usugumo \\
  84 & 54 & T & \genji{\large T} & \#20 Asagao \\
  85 & 55 & U & \genji{\large U} & \#21 Otome \\
  86 & 56 & V & \genji{\large V} & \#22 Tamakazura \\
  87 & 57 & W & \genji{\large W} & \#23 Hatsune \\
  88 & 58 & X & \genji{\large X} & \#24 Kochou \\
  89 & 59 & Y & \genji{\large Y} & \#25 Hotaru \\
  90 & 5a & Z & \genji{\large Z} & \#26 Tokonatsu \\
  91 & 5b & [ & \genji{\large [} & \#27 Kagaribi \\
\end{tabular}

\begin{tabular}{rrccl}
 dec & hex & key & mon & chapter \\ \hline \bigstrut[t]
  97 & 61 & a & \genji{\large a} & \#28 Nowaki \\
  98 & 62 & b & \genji{\large b} & \#29 Miyuki \\
  99 & 63 & c & \genji{\large c} & \#30 Fujibakama \\
  100 & 64 & d & \genji{\large d} & \#31 Makibashira \\
  101 & 65 & e & \genji{\large e} & \#32 Umegae \\
  102 & 66 & f & \genji{\large f} & \#33 Fuji no Uraba \\
  103 & 67 & g & \genji{\large g} & \#34 Wakana no Jou \\
  104 & 68 & h & \genji{\large h} & \#35 Wakana no Ge \\
  105 & 69 & i & \genji{\large i} & \#36 Kashiwagi \\
  106 & 6a & j & \genji{\large j} & \#37 Yokobue \\
  107 & 6b & k & \genji{\large k} & \#38 Suzumushi \\
  108 & 6c & l & \genji{\large l} & \#39 Yuugiri \\
  109 & 6d & m & \genji{\large m} & \#40 Minori \\
  110 & 6e & n & \genji{\large n} & \#41 Maboroshi \\
  111 & 6f & o & \genji{\large o} & \#42 Ninounomiya \\
  112 & 70 & p & \genji{\large p} & \#43 Koubai \\
  113 & 71 & q & \genji{\large q} & \#44 Takegawa \\
  114 & 72 & r & \genji{\large r} & \#45 Hashihime \\
  115 & 73 & s & \genji{\large s} & \#46 Shii ga Moto \\
  116 & 74 & t & \genji{\large t} & \#47 Agemaki \\
  117 & 75 & u & \genji{\large u} & \#48 Sawarabi \\
  118 & 76 & v & \genji{\large v} & \#49 Yadorigi \\
  119 & 77 & w & \genji{\large w} & \#50 Azumaya \\
  120 & 78 & x & \genji{\large x} & \#51 Ukifune \\
  121 & 79 & y & \genji{\large y} & \#52 Kagerou \\
  122 & 7a & z & \genji{\large z} & \#53 Tenarai \\
  123 & 7b & \{ & \genji{\large \{} & \#54 Yume no Ukihashi
\end{tabular}

\end{document}
