plotfont: Plotter-like fonts i.e. a series of straight lines which make letter shapes.

[ graphics, library ] [ Propose Tags ]

Crude fonts for XY plotting


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1
Dependencies base (>=4 && <5), containers [details]
License LicenseRef-GPL
Author M J Oldfield
Maintainer ex-hackage@mjoldfield.com
Category Graphics
Source repo head: git clone git@github.com:mjoldfield/plotfont.git
Uploaded by mjoldfield at 2015-09-17T14:11:00Z
Distributions NixOS:0.1.0.1
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1563 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-09-17 [all 1 reports]

Readme for plotfont-0.1.0.1

[back to package description]

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:

  1. 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)

  2. 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'.