kicad-developers team mailing list archive
Mailing list archive
Re: New file uploaded to kicad-devel
Mon, 08 Jun 2009 11:11:48 -0000
--- In kicad-devel@xxxxxxxxxxxxxxx, jean-pierre charras - INPG <jean-pierre.charras@...> wrote:
> If you are a Java programmer, i can commit a Hersey font editor found on
> internet (with some hershey fonts).
> I am thinking it needs some work to make it usable, but seems interesting.
> An a good Hersey font editor could be *very* useful.
You mean that applet that 'saves' on console? :D:D
I probably could make a similar one using GTK in a few days :P:P
The real question is: do we want to follow the hershey way?
Kicad (but every CAD has the same problem) need a 'stick' font, while the commonly used Truetype and Type1 are 'outline' font. I mean, I could use freetype to extract glyph outlines and convert them to vectors, but we'll always have outline characters! The real problem is actually ONLY the gerber production... IIRC Altium (or was it OrCAD?) is so sick to use times new roman in schematics :P
So, for native vector (stick) fonts IMHO we have 3 choices...
- Keep the Hershey format and digitize glyphs when needed
- Use CXF fonts (used by QCad and GRASS IIRC); they also can contain arcs but we could approximate them as lines on loading. CXF is self-explanatory as a format and you edit glyphs using QCad.
- Use SHP fonts (the decompiled form of SHX fonts used by Autocad et al.); like CXF they can contain arcs and are a PITA to calculate: you need some analytical geometry... arcs are specified as 'bulges' between a line and a semicircle (of course autocad probably already contains LOT of analytical arc routines :PP). I didn't find documentation on the SHX format, but there are decompilers to extract the source format. The problem is: 99% of the fonts are 7-bit (and, yes, Hersheys are supplied even in SHX format :D), and the 'free' ones are of questionable quality IMHO...
The last choice is to load a truetype and render it as an outline (which iswhat autocad does, in practice) or 'scan converting' it using a 1-mil track width (which is IIRC what OrCAD and Altium do with imported bitmaps, likelogos for silkscreen)