41

Is there a way to simulate imperfections of some of the older books in LaTeX? Like the missing pieces of letters, extra splotches of ink and such?

Here is an interesting artifact: enter image description here

P.S.: I guess one way would be to get an old printer haha :-0

8

2 Answers 2

32

This answer is to the question of how to dirty up an existing font, rather than using a pre-aged font. First, you need to get a few good inkblots such as

enter image description here

and

enter image description here

Then, you need code that underlays these blots below the text, while varying which blot to underlay, how large to draw the blot, and where relative to the letter to spill the ink. The coding is such to make sure the blot doesn't screw up the letter kerning (via stackengine's \useanchorwidth setting [next to last argument]).

In this revision, I have also added \wblot, which overlays the letters with white stuff. But in this case, I can't overlay a white graphic, because the border is rectangular, and so the overlay would also be rectangular. Instead, I overwrite a white glyph over the desired letter. As with the black blot, you pick the overlay glyph (instead of the black blot), the scale of the overlay blot, and the (x,y) placement of the overlay blot.

So we have:

\documentclass{article}
\usepackage{stackengine}
\usepackage{graphicx}
\usepackage{color}
\newlength\dellet
% blot-file, blot-scale, dx, dy, character
\newcommand\blot[5]{%
  \setlength\dellet{\widthof{#5}}%
  \stackengine{#4\dellet}{\phantom{#5}}%
    {\hspace{#3\dellet}\includegraphics[scale=#2]{#1}}%
    {O}{l}{T}{T}{L}%
  \stackengine{0pt}{\usebox{\stackedbox}}{#5}{O}{l}{F}{T}{L}%
}
\newcommand\wblot[5]{%
  \setlength\dellet{\widthof{#5}}%
  \stackengine{#4\dellet}{\phantom{#5}}%
    {\hspace{#3\dellet}\textcolor{white}{\scalebox{#2}{#1}}}%
    {O}{l}{T}{T}{L}%
  \stackengine{0pt}{#5}{\usebox{\stackedbox}}{O}{l}{F}{T}{L}%
}
\begin{document}
\blot{blot1}{.0025}{.1}{.1}{H}%
\blot{blot1}{.0045}{.4}{.4}{o}%
\blot{blot2}{.0025}{.7}{.6}{w}%
\ %
\blot{blot1}{.0015}{.3}{.1}{i}%
\blot{blot2}{.0035}{.5}{.2}{s}%
\ %
\blot{blot2}{.003}{.2}{.5}{t}%
\blot{blot2}{.002}{.1}{.1}{h}%
\blot{blot1}{.004}{.2}{.3}{i}%
\blot{blot2}{.004}{.5}{.4}{s}%
\blot{blot1}{.006}{.7}{.8}{?}%

\wblot{$\wedge$}{.50}{.2}{.1}{H}%
\wblot{/}{1.0}{.4}{.4}{o}%
\wblot{*}{.70}{.6}{.0}{w}%
\ %
\wblot{y}{.90}{.3}{.1}{i}%
\wblot{z}{1.2}{.5}{.2}{s}%
\ %
\wblot{q}{.90}{.2}{.5}{t}%
\wblot{A}{.70}{.1}{.1}{h}%
\wblot{t}{.65}{.3}{.3}{i}%
\wblot{n}{.80}{.5}{.4}{s}%
\wblot{o}{.90}{.7}{.8}{?}%
\end{document}

The result is

enter image description here

The top line shows black blots underlaid, while the bottom line shows white overlays added.

Obviously, the shape and library of blots is a key parameter, and mine is limited to two, for example purposes only. I imagine ones would look better if they didn't look like spills, but rather stray imprints. Further, one doesn't want to throw them around gratuitously as I did in the MWE.

I will leave it to others to figure out how to randomly throw these about a document, rather than explicitly lay them in, as I have.

2
  • so, did anybody figure out how to add these randomly?
    – Masum
    Mar 20, 2022 at 19:08
  • 1
    @Masum No one has spoken up about it...however, you may also check the "Linked Questions" that appear in the right-hand column, in case someone did so with a link to this question/answer. Mar 20, 2022 at 21:09
32

Well, I finally got a chance to look over my font library for fonts that might fit your description as "defective" and "old". This may not be exactly what you are looking for, because these are particular fonts, rather than defects in a font which you, the user, specify. Nonetheless, here they are.

The best example of general use has got to be Dominican, one of my favorite fonts:

enter image description here enter image description here enter image description here

Another is Butterbrotpapier, notice the descended "b" for example:

enter image description here

Similar aged fonts exist for blackletter:

enter image description here enter image description here

There are also fonts that exhibit defect, but are specialized, and probably not of general use, such as these:

enter image description here enter image description here

I also have a number of older fonts that are not defective in their construction, but are from a bygone era. I'll post only one here, as a good example...Caslon Antique.

enter image description here

10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .