DOF type(inter)face
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
outline
source
.gitignore
LICENSE.md
README.md

README.md

DOF Specimen DOF Specimen

DOF is a type(inter)face initiated on the occasion of the exhibition and research project The Weathers They Live In. Written in the typographic description language METAFONT, DOF can be understood as a set of genes to generate different font families by the regulation of parameters.

At present DOF supports the ASCII character set (with some additional characters) and its major parameters are unit-width, stroke-width and -height, slant, overdraw, superness and cutoff (/ expand). Throughout the development the three families DOF-1, DOF-2 and DOF-3 have been released and converted to outline fonts (TrueType).

DOF is licenesed under the SIL Open Font License, its source code and outline fonts are free to use. Further parameters and characters will be developed in the future. For requests contact mail (at) pbernhard.com.

Docs

DOF would not be possible without the programmatic dedication to typography of Donald E. Knuth, the creator of METAFONT, and his comprehensive work on the typeface Computer Modern. For a deeper understanding of METAFONT read The Concept of a Meta-Font and the METAFONTbook by Donald E. Knuth.

To generate DOF families with the following steps METAFONT, GFtoDVI and XDVI are required. All of these will come with a basic installation of TeX or LaTeX.

Parameters

Visualisations of major parameters can be found at examples/parameters/. Parameter settings of existing families can be found in the respective outline/ folder of each release (e.g. dof-1-parameters.txt).

slant = 0 left or right font slant (numeric value, 0 = no slant)
u = 3/9pt unit defines the basic character width
cap = 9pt capital height
xheight = 0.75cap x-height
figheight = cap figure height
desc = 2.25pt descender depth
s = 2u character's distance to its sidebearings
o = 1/18pt vertical overshoot of round characters, as in O or U
barheight = 0.5cap height of horizontal bar, as in H
ebarheight = 0.5xheight height of horizontal bar in lowercase, as in e
overdraw = 0.5u overdraw the stroke endings of certain characters, as in E, I or R
opendraw = true leave circles of certain characters open, as in %, ° and 0 (boolean true or false)
superness = 0.74 controls the corner expansion of round shapes (super-ellipse), as in O, S or g (numeric value between 0 and 1, higher values expand and lower values implode the character's corners, 0.74 equals a regular round ellipse)
cutoff = false cut off the stroke endings (boolean true or false)
expand = 1/10pt if cutoff = true, controls the stroke expansion towards cut off stroke endings
compactcor = 0.7 if cutoff = true, thins out strokes to correct compaction, as in A or M (numeric value between 0 and 1)
penx = 1.1pt stroke-width
peny = 0.4pt stroke-height
penangle = 0 pen angle (degrees as numeric value)
puncscale = 1.2 scale of pen for dots in punctuation

Structure and Rendering

All necessary source files are in the source/ folder. dofbase.mf is DOF's base file with the font setup and necessary helper methods. The character coordinates are defined in dofupper.mf (uppercase characters), doflower.mf (lowercase characters) and doffigurepunc.mf (figures and punctuation). The parameters are defined in an initiative file (e.g. dof1reg.mf for DOF-1 Regular) which will call the base file and so on.

To generate new DOF families and view a proof, copy one of the parameter files, such as dof1reg.mf, to newdof.mf, adjust the parameters, save and render with…

$ mf newdof

…this will create a proof file newdof.2602gf (Generic font file format). To display the proof file, convert it to .dvi (Device independent file format) with…

$ gftodvi newdof2602.gf

…and display the created newdof.dvi.

$ xdvi newdof

You can conclude everything in on command:

$ mf newdof && gftodvi newdof.2602gf && xdvi newdof

Outline conversion

METAFONT was originally meant to provide bitmap fonts for TeX, thus it is not able to output scalable outline fonts (e.g. TrueType) on its own. For this purpose Han-Wen Nienhuys wrote the program mftrace which accepts METAFONT's files, traces the output and converts it to PostScript or TrueType. A list of available options can be found on the mftrace website.

$ mftrace newdof.mf

The resulting output newdof.pfa (PostScript) might have some misplaced glyphs, missing font information or encoding which can be edited with any font editor, such as FontForge. DOF has a FontForge script outline/convert.pe to fix misplaced glyphs, add font information and output a TrueType file. Move the PostScript file newdof.pfa in the same folder as the convert.pe script and run with the following arguments…

$ fontforge -script convert.pe newdof.pfa familyname fontweight versionnumber

…to output newdof.ttf.

References

ToDo

  • Add accents (à, è, é, spanisch wave, etc.) for Miguel. (to surf)