kicad-developers team mailing list archive
Mailing list archive
Re: Stroke font
--- In kicad-devel@xxxxxxxxxxxxxxx, "Lorenzo" <lomarcan@...> wrote:
> 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)
I've noticed this recognisable shape that I've seen many times at differentplaces, but I do not know about american realities.
I've already decoded that format. In very past i've invented similar (twiceas compact: 0..15 coord limits) for one embedded app. :)
If I understand correctly that nothing said about permission on modifying Hershey font (this would be derivative work), so I better consider on developing open analog from scratch (like Wine developers did for Windows fonts).
> 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 an end of stripe marker), I approximated shp arcs with the obvious polygonal representation...
CXF fonts packaged with QCad have same drawback as Hershey's ones: they contain limited set of characters. So it seem impossible to collect all characters of one style.
> > 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...
I thinking about easy method for installing new font into KiCad.
> Another idea was to rasterize a type 1 or truetype and plot it as a stackof stripes (like other layout programs do). Look into the archive, there was some thread a while ago about this, I also posted a proof of concept program to rasterize bitmaps (useful for bitmaps on silk layers)
It would be great if KiCad have such possibility. But IMHO whis is not for 'everyday' use - type 1 fonts are too complex and require very high resolution of silkscreen plotter. Especially in tendency for components to be smaller so text is becoming smaller too.