2

I am looking for a LaTeX font to emulate a digital LCD clock display, looking something like the fonts at this link.

I found this and this possible font on the LaTeX Font Catalogue, but when I try to load them using the instructions on their respective pages, I get the error that the font is not loadable: Metric (TFM) file not found.

Are there any other 'LCD display'-style fonts which are easier to work with? Alternatively, what should I do to make the aforementioned fonts work? For reference, I am using MikTeX on Windows 7.

3

At great effort, you can emulate them. Here's a start. For the roundrule package, see Is there such a thing as a `\mathrule`? (rounded endcaps)

\documentclass{article}
\usepackage{stackengine,roundrule}
\setstackEOL{\\}
\setstackgap{S}{0pt}
\def\barThk{1pt}% rule thickness
\def\barLen{5pt}% rule length
\def\barGap{.4pt}% rule gap
\def\barsb{1pt}% character sidebearing
\newcommand\barlet[2]{\def#1{\kern\barsb\Shortstack{#2}\kern\barsb}}

\def\barX{\smash{%
  \kern\barGap\roundrule[-.5\dimexpr\barThk]{\barLen}{\barThk}\kern\barGap}}
\def\barY{\makebox[0pt]{\raisebox{\barGap}{%
  \addstackgap[\barGap]{\roundrule{\barThk}{\barLen}}}}}
\def\barXP{\kern\dimexpr\barLen+2\dimexpr\barGap\relax\relax}
\def\barYP{\rule{0pt}{\dimexpr\barLen+2\dimexpr\barGap\relax\relax}}
\begin{document}
\barlet\barA{\barX\\\barY\barX\barY\\\barY\barXP\barY}
\barlet\barB{\barX\\\barY\barX\barY\\\barY\barX\barY}
\barlet\barC{\barX\\\barY\barXP\\\barY\barX}

\let\barEight\barB
\barlet\barNine{\barX\\\barY\barX\barY\\\barX\barY}

The alphabet: \barA\barB\barC 

The numbers: \barEight\barNine
\end{document}

enter image description here

| improve this answer | |
1

The fonts in your second link are not part of TexLive. They are, however, in ctan.

All you need to do is download them to your computer and then run as described. For instance: go to capbas in ctan, download d7seg.mf and and d7seg.tmf to your working directory, then simply use the fonts as in this MWE

\documentclass{article}
\usepackage{addfont}
\addfont{OT1}{d7seg}{\dviiseg}
\usepackage{lipsum}

\begin{document}
\dviiseg\lipsum
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.