Hershey fonts for OpenSCAD

Hershey fonts for OpenSCAD

thingiverse

The standard OpenSCAD fonts work well for a simple extrusion 3D profile. But what if you want a different 3D profile, e.g., you want text that looks like it's been machined with a V-shaped bit, or text that is rounded in 3D? This library includes the ASCII portions of the Hershey vector fonts, and draws text using whatever convex shape you specify. For instance, you can do rounded text via: use <hershey.scad>; drawHersheyFont("Hello, OpenSCAD!", font="Script") sphere(r=2,$fn=16); A call to `drawHersheyFont()` requires a child object that specifies what the drawing is done with. The drawing is done by putting the child object at the two endpoint of a lines and doing a `hull()` operation. The following optional arguments are available: `halign="left"|"right"|"center"`: horizontal alignment `valign="top"|"baseline"|"center"|"bottom"`: vertical alignment `size=x`: specify height of capital T `extraSpacing=x`: add this extra spacing between letters (can be negative) `forceMinimumDistance=d`: make sure that the distance (not necessarily horizontal) between successive glyphs is as close to `d` as reasonably possible; use this if you want to draw fat letters that overlap by the same amount, like [here](https://www.thingiverse.com/thing:2482372) `minimumDistancePrecision=p`: set the precision for the `forceMinimumDistance` option There is also a function to measure text width: `widthHersheyText(text, font=name)`, with optional `size=x` and `extraSpacing=x` parameters. Unfortunately CGAL rendering is going to be _very_ slow. The "Hello, OpenSCAD!" CGAL render took about three minutes. Note the licensing on the Hershey library in the source code, which isn't fully compatible with Creative Commons -- but the restrictions are very, very slight. **Updates:** * August 16, 2019: Optimize file size of hershey.scad for faster loading. * August 10, 2019: Added Latin1 accented characters. Fixed baseline alignment. Renamed fonts to be more intuitive (old names are still supported). Removed duplicate fonts.

Download Model from thingiverse

With this file you will be able to print Hershey fonts for OpenSCAD with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Hershey fonts for OpenSCAD.