I want to plot letters/fonts as curves, hence access to a more point-like representation.
I’m looking for a way to get a point[all pixels] or curve[boundary] representation of fonts maybe normalised within a unit box, not sure if here sizes between different fonts will change a lot. Any packages out there that might help will be appreciated? Thanks.
It looks like Luxor.jl may provide what you need with a nice high-level interface. For example, this gets a list of points outlining the letter “C” in the current font:
using Luxor
using LaTeXStrings
using MathTeXEngine
@drawsvg begin
background("black")
fontsize(120)
sethue("gold")
text(L"e^{i\pi} + 1 = 0", Point(0, 0), halign=:center, paths=true)
pts = pathtopoly()
for pt in pts
randomhue()
poly(pt, :fill)
end
end