
Pixelly font library for OpenSCAD
cults3d
This is a user-created OpenSCAD library to generate pixelly fonts based on PalmOS bitmap fonts from Ron Buelow. The library includes 29 fonts. I used it to make a Minecraft-themed cake topper for a birthday celebration. You can find the full library code here - this Thing only includes a self-contained demo file. To use, begin with: include <pixellyfont.scad> The syntax for the main library call is as follows: renderString(string, font=font_8x8, halign="left", valign="bottom", invert=false, spacing=1, size=10, pixelScale=1.01, height=0) string: text to be rendered; only characters in the CP-1252 character set are supported; other characters will be turned into spaces font: font to use; fonts are defined in fontdata.scad halign: horizontal alignment: "left", "right" or "center" valign: vertical alignment: "bottom", "top" or "center" invert: set to true if you want to draw the background instead of characters spacing: scale for character spacings size: height of characters pixelScale: scaling to apply to pixels; increasing it noticeably above 1 makes pixels join up, and decreasing it below 1 results in blank space around them height: height to extrude pixels; set to 0 to make pixels 2D You can also use renderString() as a modifier for a shape. In this case, pixelScale and height are ignored, and instead the shape is used as a pixel. For instance, you can do this to make foreground pixels be large circles and background pixels be small circles: renderString("abc") circle(d=1); renderString("abc", invert=true) circle(d=0.1); If you want to know how much horizontal space text will take up, you can call getStringWidth(string[, options]) where the available options are the font, spacing, and size options that renderString() uses. If you want to know how many pixels high characters in a font are, call getFontHeight(font). You can then compute the size of an individual pixel as size/getFontHeight(font) where size is the size parameter for renderString().
With this file you will be able to print Pixelly font library 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 Pixelly font library for OpenSCAD.