I tried cranking up (10-fold) the number of line-segments that are used when approximating conics and cubics with lines. The results are mostly OK, but sometimes "wiggles" or "S-curves" appear, which cause problems for the medial-axis filter. This "P" is an example:
The medial axis on the right does not look correct. If we zoom in it's clear that there's an "S-curve" in the input geometry, which causes a LINELINE edge (drawn in darker blue), which the medial-axis filter doesn't think should be removed:
For the letters "EMC" it looks mostly OK, but there's a similar wiggle in "E"
Increasing the number of line-segments further causes even stranger things. Here's a zoom-in at the top of "P" that shows both the wiggle that was visible before, but also a strange inward bulge:
Hopefully this is a bug in how conics/cubics are converted to line-segments in ttt, and not an issue with how FreeType fonts are represented.
4 thoughts on “Non-smooth output from ttt”
I'm pretty sure it's a bug in the specific font. In inkscape I created the letter "P" in freeserif bold italic and the wiggle-and-bulge appear in the same location as in your screenshots that ultimately came from ttt.
Great work - is there a shortcut method of adding new fonts to TTT? Is is possible to give a path to a font?
Thanks for your great work!
This script shows how to change font:
The fonts that my version of truetype-tracer uses are hard-coded here:
It may be possible to use other .ttf files also, I haven't tried. An improvement would be to auto-detect all ttf-fonts from one(or many) directory.