Plotter-like fonts i.e. a series of straight lines which make letter shapes.
Crude fonts for XY plotting
PlotFont
Crude fonts suitable for plotting.
There are many good looking fonts which optimize for appearance. I wanted some cruder fonts which had a simpler representation: a relatively small number of straight lines which could easily be plotted by a machine, or perhaps a person.
Example
Here is an example using diagrams to generate a SVG file:
import qualified Graphics.PlotFont as PF
import Diagrams.Prelude
import Diagrams.Backend.SVG
strokes :: [[(Double,Double)]]
strokes = PF.render' PF.canvastextFont "Hello World!"
toDiag :: [[(Double,Double)]] -> Diagram SVG
toDiag = extrudeLeft 20 . mconcat . map (fromVertices . map p2)
main :: IO ()
main = renderSVG "hello.svg" (mkSizeSpec2D (Just 800) (Just 200)) $
toDiag strokes # lw 3
Licenses
The code written by me is licensed under the GPL, version 2 or later.
The data for the fonts come from Jim Studt's canvastext.js http://jim.studt.net/canvastext/ which he placed in the public domain. He cites the original source as the Hershey fonts: https://en.wikipedia.org/wiki/Hershey_fonts
The Hershey fonts appear to have this license:
The following acknowledgements must be distributed with the font data:
The Hershey Fonts were originally created by Dr. A. V. Hershey while working at the U. S. National Bureau of Standards.
The format of the Font data in this distribution was originally created by James Hurt Cognition, Inc. 900 Technology Park Drive Billerica, MA 01821 (mit-eddie!ci-dandelion!hurt)
The font data in this distribution may be converted into any other format EXCEPT the format distributed by the U.S. NTIS (which organization holds the rights to the distribution and use of the font data in that particular format). Not that anybody would really want to use their format... each point is described in eight bytes as "xxx yyy:", where xxx and yyy are the coordinate values as ASCII numbers.
It is not clear to me if Mr Studt used 'this distribution'.