kicad-developers team mailing list archive
Mailing list archive
Re: Stroke font
--- In kicad-devel@xxxxxxxxxxxxxxx, "vladimir_uryvaev" <vovanius@...> wrote:
> Where and in what format Hershey font was taken?
The Hershey fonts were hand digitized by a guy (named Hershey) in the '60, iirc... since it was for government works they are free to use and, in fact, you find them everywhere (Borland BGI, Autocad, plotutils and QCad too...). I used the 'usenet encoding' which is a simple two-character encoding for them (so you see them as ugly strings, more or less like base64)
> Hmm. I do not have AutoCAD, so this tool will be useless for me. I'll probably use QCad and simple conversion script (or direct mind-to-string encoding sometimes). I also think KiCad symbol editor would be usable. (So why do not use Kicad libraries as font containers in future?)
QCad can make cxf fonts (which only it uses, it seems...). It's a somewhat trivial format (lines and arcs) but uses floating point coordinates. It contains hersheys, too :D If someone restricts itself to integer endpoints it should be trivial to encode them. Also it's quite easy to convert the font machinery to floating point, given a suitable external representation... Hershey only uses moveto and lineto, in fact (to be precise: a line to and anend of stripe marker), I approximated shp arcs with the obvious polygonal representation...
> As I currently see, current grid size is enough for fine looking font. And there's no problem to change offsets and factors as we have source code.
As I said the 'limitation' is only from the text encoding... if we move toward another external storage (maybe a lib of some kind) it's easily adaptable to float coordinates...
Another idea was to rasterize a type 1 or truetype and plot it as a stack of stripes (like other layout programs do). Look into the archive, there wassome thread a while ago about this, I also posted a proof of concept program to rasterize bitmaps (useful for bitmaps on silk layers)