NOTE: This README is best viewed at https://terryspitz.github.io/dactyl-font/README.html
Play with the Dactyl Live explorer — explore fonts interactively, or switch to the Glyphs tab to see how Dactyl's glyph string definitions convert to different letters.
See some of the chequered development history at Dactyl Font Gallery, and some sample fonts at Sample fonts
Dactyl is a functional font generator written in F#, in service of ticking 'create a font' off my bucket list!
Dactyl is parameterised with a large (and growing) number of inputs including 'axes' (parameters) common in variable fonts such as stroke thickness and x-height, and more unusual ones like roundness and end-bulbs.
It's an exercise in understanding how fonts can be built in code using both 'words and rules' — where the 'rules' are a minimal set of general shape logic in code along with the 'words': a minimal set of hardcoded shape data per glyph (letter).
As well as generating pretty and super-controllable fonts, this work will hopefully also help me improve my AI font generator DeeperFont, though at the moment the technologies are quite different and combining them will be an interesting future challenge.
You can explore Dactyl live in your browser using the Dactyl Live explorer. Note the Reset and Random icons at the top. The settings deliberately extend beyond 'normal' values to show how the fonts behave (and often misbehave) under extremes.
A few predefined Dactyl fonts are available to download in the ttf{:target="_blank" rel="noopener"} subdirectory. Note: these fonts are still a work in progress and do not have good spacing or kerning, or even good shapes under some settings. In future I plan to make fonts downloadable after customising in the live browser.
- DactylGlyph Documentation — How glyph string definitions work
- DactylSpline Documentation — The DactylSpline curve implementation
Dactyl fonts initially used and were inspired by Ralph Levien's Spiro curves. I used Wiesław Šoltés's C# port, which I've ported to F# to run under the fantastic Fable to transpile to javascript, meaning I can write the whole thing in beautiful F#.
Raph superseded his v1 Spiro curves in 2018 with spline-research, described in this blog post, which are available with the 'spline2' checkbox. These offer direct control of tangents specifically to help font design (this feature was also later added to Spiro curves as Anchor/Handles). See Raph's talk.
Later splines which I'd like to investigate:
- κ-Curves: Interpolation at Local Maximum Curvature
- Enhancing flexibility and control in κ-curve using fractional Bézier curves
Dactyl is also inspired by Variable Fonts technology. Unfortunately it isn't easy to output a Dactyl font as a variable font since they can only interpolate between two glyphs with the exact same knot points, which is hard to achieve with Dactyl's spiro bezier curves.
- v-fonts.com — Interactive variable font playground
- MDN Variable Fonts Guide — "The five registered axes are weight, width, slant, italic, and optical size."
- Google: Variable Fonts
- Play Type Detail
- Axis-Praxis — Variable font sandbox
- A List Apart: UI for Variable Fonts
FontForge is an open-source font editor which supports Spiro.
Since none of the font interop formats I found support spiros directly, the Dactyl generator writes files in FontForge native format (a .fsdir directory of .glyph files), which can be loaded into FontForge and used to generate TTF fonts. FontForge is also useful to view and interact with the letter glyphs in detail: it has great validation, viewing and editing features.
This project is a great opportunity to dive into the vast world of typographic design. A few sites and articles that have caught my eye:
- Design With FontForge: Creating o and n
- Design With FontForge: Trusting Your Eyes
- Creating Fonts with Inkscape and FontForge (Reddit)
- Typography.com: Text for Proofing Fonts
On letter spacing, tracking and kerning: