"Wire" (one dimensional) font


Question

All fonts I have ever heard of are two dimensional: each glyph is basically a two dimensional region (a closed contour or some closed contours), which the software or printer somehow strokes or fills depending on the instructions given by the user. I would like to know whether there are one dimensional fonts, where the glyphs are described just as collections of segments (which the software can stroke but not necessarily fill), not of regions.

In other word (or better, in images), what I would like to have is the left thing instead of the right one in the picture below. Does this exist?

From a two dimensional to a one dimensional letter

(sorry for the picture, I know it is really bad; I just did that quickly)

1
17
12/22/2015 8:58:00 PM

Accepted Answer

In plotters, it's called a "stroke font", "single line font", "engraving font", "technical lettering font", or just "plotter font".

A plotter strokes images onto paper using a pen. It cannot fill images except by repeatedly stroking them less than a pen-width apart. So fonts designed for use with plotters will contain glyphs with one stroke ("simplex"), two more or less parallel strokes ("duplex"), or three strokes ("triplex"). Fonts with more strokes take longer to draw but allow more variation in stroke width within a glyph. Using a pen too narrow for a glyph at a given size will cause visible gaps between the strokes.

One example of a mostly simplex font is Hershey Vector Font. Its at sign @, brackets [], braces {}, and tilde ~ are duplex.

Glyphs in Hershey Vector Font

If you've seen "blackboard bold", that's a 𝕕𝕦𝕡𝕝𝕖𝕩 font with the pen width less than the distance between strokes.

BOLD in a duplex serif font

Old-school imaging libraries supported stroke fonts in much the same way as a plotter does. When rendering text, an application would set the stroke width and color before drawing text, just as it does before drawing a line. This is analogous to selecting a pen on a plotter.

But modern raster imaging libraries use OpenType fonts, which contain TrueType or CFF (PostScript Type 2) outlines. OpenType fonts simulating stroke fonts instead contain the outline of a stroke at some line width. This stroking operation can be reversed by insetting the glyph's outline by a distance of half a stroke width, sort of the inverse of algorithmic bold.

23
5/23/2017 11:33:00 AM

Most engineering applications support fonts with just lines and user supplies thickness. As do quite many engraving and milling machines. Some fonts exist though they wont work very well in modern software (if at all).

This is the problem: The font engines have regressed since we deprecated PostScript. Sorry no easy solutions. So one could have all kinds of goodies back in the day that is no longer possible on most computers. Nearly no apps do support this even if present wont even work in svg as svg font definitions got deprecated from browsers.

The problem is that theres no universal format for such fonts. And the fonts themselves will malfunction in many cases. Normal apps will treat them weird. See:

  • A other question on the topic star-trek-interior-plaques where you can find a font like this that may work on some applications.

Jongware has made a script called monoline text drawing for illustrator for example you can get it here:

It is possible to make your own fonts of this type in PostScript though using type 3 fonts (but support is no longer wide*, though illustrator could use these under some circumstances). The support in design apps is scarce though. But i actually use this all day when doing ostScript. Here's a example (font for special use only  editted for this demo):

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 200 40
%%Title: Demo type 3 font
%%Creator: Janne Ojala
%%CreationDate:  2015-12-23
%%EndComments

% set stroking characteristics
5 setlinewidth 
1 setlinecap
1 setlinejoin

% lets define the font
10 dict dup begin
  /FontType 3 def
  /FontMatrix [.01 0 0 .01 0 0] def
  /FontBBox [-2 0 52 102] def

  /Encoding 256 array def
  0 1 255 {Encoding exch /.notdef put} for 

  Encoding
    dup (L) 0 get /L put
    dup (a) 0 get /a put
        (b) 0 get /b put

  /Metrics 4 dict def
  Metrics begin
    /.notdef 30 def
    /L 65 def
    /a 65 def
    /b 55 def
  end

  /BBox 4 dict def
  BBox begin
    /.notdef [0 0 0 0] def
    /L [0 0 75 100] def
    /a [25 0 75 100] def
    /b [25 0 65 100]  def
  end

  /CharacterDefs 4 dict def
  CharacterDefs begin
    /.notdef { } def

    /L
      { newpath
        0 100 moveto
        0 0 lineto
        50 0 lineto
        stroke
      } def 
    /a
      { newpath
        25 25 25 0 360 arc 
        50 45 moveto 
        50 0 lineto
        stroke
      } def
    /b
      { newpath
        0 100  moveto
        0 0 lineto
        40 0 40 50 17.5 arct
        40 50 0 50 17.5 arct
        0 50  lineto
        stroke
      } def
    end

  /BuildChar
    { 0 begin

        /char exch def
        /fontdict exch def

        /charname fontdict /Encoding get char get def
        fontdict begin
          Metrics charname get 0
          BBox charname get aload pop
              setcachedevice

          CharacterDefs charname get exec
        end
      end
    } def
  /BuildChar load 0 3 dict put
  /UniqueID 1 def
end

/SpecialUseOnly exch definefont pop
/special /SpecialUseOnly findfont 20 scalefont def

special setfont 

10 10 moveto

%write some text
(Lab baa baa abL) show

%%EOF

To use this just put it in text file with a EPS ending and drag and drop it into illustrator or word. make sure theres no empty lines before the begin. You can edit the text by changing whats inside the parens on 3 line form end. The caveat here is I only defined the chars 'L' 'a' and 'b'.

Preview

Image 1: Preview of font program.

* So this was easily possible back in late 1980's and mid 1990's, but not today. Support has been mostly removed some adobe softs still have this.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow


Website under construction!!!
^