← Back to team overview

kicad-developers team mailing list archive

Re: Vector fonts

 

--- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:

> Please, let's not do this again. Please use a reasonable subject in 
> your postings.

Mea culpa :P fixed I hope :D

> Let's please start by identifying what problems we are trying to solve, 
> enumerate them in a list please. Then more folks will be able to 
> contribute to a solution.

Never told I want to yank out Hersheys when I've just finished the Latin-1 repertoire :D:D

The problem is people wants to use international characters (example: polish ones, I have no ideas of what strange letters they use apart of U+0142 LATIN SMALL LETTER L WITH STROKE :P). (ISO apparently doesn't want... 3098 only specifies latin, greek, cyrillic and diacritics but, as usual with ISO standards, who cares :D And, anyway, Hersheys predates 3098 so who cares, DOUBLY :D:D)

At the moment the repertoire includes:
- Standard ISO 646 ASCII
- Cyrillic (no idea if it is complete or not)
- ISO 8859-1 right hand (i.e. Latin-1 accented letters and such)
- Some greek (but IIRC not enough to write in greek :P)

Also available in the Hersheys (but need to be encoded, probably... I don'tknow if GNU plotlib already contains codepoint for these...)
- Kana (hiragana and katakana)
- The most usual kanjis

Once integrated the japanese glyph, the repertoire is more or less the sameof QCad unicode.cxf and (I think) AutoCAD bigfont. So we shouldn't be too ashamed of it :P

As for adding the 'missing' characters (i.e. the rest of Unicode :P:P):
- Latin Extended-A is mostly done by composition (i.e. just adding diacritics or single strokes to letters)
- All the other stuff need to be drawn :((

Extended characters are readily available as TrueType (even as free font, like DejaVu) BUT TrueType is an a OUTLINE format (it describe the outline ofthe font and then FILLs it). What we use now is a STROKE font (describe the lines constituting the glyph and STROKE them).

The simple way is to simply stroke the outline: with a light enough body the border strokes simply 'fill' the interior (but, sadly, they could fill the eyes in letters like P and B). Some AutoCAD release just do this by default (you need to set the TEXTFILL variable, and then it becomes slow as an Apple II LOGO :D maybe they fixed it recently).

The real trouble with outline font is for Gerber and HPGL... HPGL fill model isn't really the same used by fonts (and anyway is an 'advanced' function). Gerber polygon fills are known to be buggy on some photoplotters. Postscript is not an issue since it can do the Right Thing, when given the right operators.

The other way to handle outline fonts is to rasterize them (maybe only during plotting?). Either feed the outline to the zone filler (or something similar), or just ask freetype for a B/W bitmap of the glyph, hinted and such at a resolution of one half of the line size. Then scan convert it to horizontal lines (it's trivial :D). I think that most PCB programs do it in thisway. And in the same way bitmap logos could be handled. CONS: it is slow, like a zone fill :P

Just remember that, even if copper text is not an issue (it can handle a few mils track...), most of the silk screen is done by... silk screening :D few of us can pay for photographic silk :P (well, usually we simply don't dosilk to pay less :D). And silk resolution is somewhat coarse (about 0.1mm,thats depend on manufacturing).







Follow ups

References