how to make dotted font from the existing font?
- User
how to make dotted font from the existing font?
- Assistant
An interesting question! Creating a dotted font from an existing font involves modifying the font's outlines to add dots along the curves. Here's a step-by-step guide to achieve this:
Method 1: Using Font Editing Software (Recommended)
Tools needed:
- FontForge (free, open-source, and available for Windows, macOS, and Linux) or Glyphs (commercial, for macOS).
- Your existing font file (in TTF, OTF, or WOFF format).
Steps:
- Open FontForge or Glyphs and import your existing font file.
- Select all glyphs (characters) in the font using Ctrl+A (Windows) or Cmd+A (macOS).
- Use a script or plugin:
- FontForge: Create a new script (e.g.,
dotted_font.py) with the following Python code:
- FontForge: Create a new script (e.g.,
pythonfrom fontforge import * def add_dots(glyph, dot_size=10, dot_spacing=20): pen = glyph.GetPen() for contour in glyph: for i, point in enumerate(contour): if i % dot_spacing == 0: pen.AddCircle(point.x, point.y, dot_size/2) glyph.SetDirty() for glyph in font: add_dots(glyph)code* **Glyphs**: Create a new **Macro** (e.g., "Add Dots") with a similar script:applescripttell application "Glyphs" tell font set dotSize to 10 set dotSpacing to 20 repeat with glyph in glyphs set contourCount to count of contours of glyph repeat with i from 1 to contourCount set contour to contour i of glyph repeat with j from 1 to count of nodes of contour set node to node j of contour if j mod dotSpacing = 0 then make new node at (x of node, y of node) with properties {type:circle, size:dotSize} end if end repeat end repeat end repeat end tell end tell