Drafont 0.5 by donb 3d model
3dmdb logo
Thingiverse
Drafont 0.5 by donb

Drafont 0.5 by donb

by Thingiverse
Last crawled date: 4 years ago
Drafont is a font system for the OpenSCAD program to have Unicode characters from scalable TrueType fonts.
Example Usage:
To make the Hi! greeting at left, do as follows:
Download freeserif_basiclatin.scad and freeserif_cherokee.scad (see below for download links)
Type this into Openscad:
use ;
use ;
d=12; // detail level - use 1 or 12
freeserif_H(d)
freeserif_i(d);
translate([-800,-1600,0])
freeserif_13a3(d)
freeserif_13cf(d)
freeserif_13f2(d);
Features
Each character is a module. Chain them together for auto-positioning
Each character can be referred to by unicode, or a 'shorthand' name
At the top of each .scad file is a list of the characters available
Two detail levels: 1 and 12
You can generate your own .scad font from a Truetype font, with any detail level you want. Download the .py files, edit settings at the end of ddump.py, and run it as follows:
python ddump.py FreeSerif.ttf 0x0041-0x007a > freeserif_basiclatin.scad
python ddump.py FreeSerif.ttf 0x13a0-0x13f4 > freeserif_cherokee.scad
Bugs
If you use the same char twice in a word, you have to use two _ (underscore)
Some complicated characters won't render properly
It is slow
CJK characters in FreeSerif not working
Some fonts don't work, at all (Sawasdee)
Licenses
Drafont python code & all .stl files are released under the Creative Commons Share-Alike Attribution license 3.0.
FreeSerif.ttf and the FreeSerif .scad files are under the GPL 3 license. See http://www.gnu.org/software/freefont/license.html
The Nixish .scad files are under the GUST public license:http://www.gust.org.pl/projects/e-foundry/licenses
Name
This project is named in honor of Thomas Drake, NSA Whistleblower, whom you can read about by clicking here: http://bit.ly/mrm4q9
Sample .stl
"Anna Akhmatova" is an example of Cyrllic and Latin text in FreeSans.
1234567890 is the font Nixish, which is derived exactly from LMRomansUnsl10
See Also
http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html FreeType manual, David Turner et alhttp://code.google.com/p/freetype-py/ Freetype-py by Nicolas Rougierhttp://www.fileformat.info/info/unicode/block/index.htm Unicode Blockshttp://en.wikipedia.org/wiki/Anna_Akhmatova
Fonts:
http://bit.ly/m9oJWh LMRomanUnsl10 from Polish LaTeX user group GUSThttp://www.gnu.org/software/freefont/index.html GNU FreeFont
Bezier:
http://en.wikipedia.org/wiki/File:Bezier_2_big.gif Bezier Curve, Phil Tregoning, Wikipediahttp://www.thingiverse.com/thing:8443 William Adam's pub domain Bezier Curveshttp://www.thingiverse.com/thing:8931 Conic Bezier Curve, donb
Changelog
0.5 pre-rendering
0.4 enable 'ranges' of unicodes to be dumped. use 'advance' from font
0.3 move openscad code
0.2 fix chunking
0.1 started

Tags