kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #02698
Re: Vector fonts
--- In kicad-devel@xxxxxxxxxxxxxxx, "Lorenzo" <lomarcan@...> wrote:
> > I were making a couple of experiments with potracelib && system fonts and seems
>>that does its work more or less correctly, now i'm looking to nice way toapproximate
>>Bézier curves to segments.
>
> There's a nice algorithm that for conic bezier (the one used by truetype)is more or less
>three linear interpolations..
>
> http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm
>
> In a nutshell you can either decide to divide the curve in, say 3-4 segments (like for arc
>during zone computations), or subdivide it recursively until you get the desired 'fit' with
>a line.
> Why are you using potrace? just load the font with freetype and use
>FT_Outline_Decompose... it gives you the native outline (as lines and beziers).
>FT_Outline_Render gives you a raster bitmap, but there are easier way to do that...
> Something like: FT_InitFreeType, FT_Open_Face, FT_Load_Char, FT_Outline_Decompose... (more or less :D)
Because is usable also for "images" like logos to be placed on the boards.
I agree with you that freetype guarantees a better (re)soluction and a moredirect approach.
Are you able to do some proof of concepts about freetype to polygon conversion ?
--
Marco
Follow ups
References