Login  Register

Re: Some questions about the LFF fonts

Posted by R. van Twisk on Sep 12, 2017; 7:39pm
URL: https://forum.librecad.org/Some-questions-about-the-LFF-fonts-tp5715159p5715317.html


Hey,

I will try to answer to the best I can.

- Why has LibreCAD introduced LFF instead of using CXF?
Rallaz was the author and creator of it so all kudos go to him. His motivation was that the new font format was more compact as it could re-use characters. UTF-8 font's can be very large and this would allow to reuse A -> Á
It's based on polylines.

- What's the difference between CXF and LFF?
As you noticed more compact, it uses polyline to support arc's.

- Is there any documentation about the LFF file format?
I coped this from a mail:

Attached a proposal of new fonts, and below a explanation:
[0041] A
0.0000,0.0000;3.0000,9.0000;6.0000,9.000
1.0800,2.5500;4.7300,2.5500

line 1 => utf-8 code + letter (same as QCAD)
line 2 & 3 =>sequence like polyline vertex with ";" seperating vertex
and "," separating x,y coords

[0066] f
1.2873,0;1.2873,7.2945;A0.5590,3.4327,9.0000
0.000000,6.0000,3.0000,6.0000

line 2  =>sequence like polyline vertex with ";" seperating vertex and
"," separating x,y coords, if vertex is prefixed with "A"
the first field is a bulge

[00C1] Á
C0041
2.000000,9.0000,4.0000,10.0000


- Are you satisfied with LFF or would you change something to make it better?
At this moment we are satisfied, meaning I didn't see any requests for changes.

For license you can contact Rallaz, he is copyright owner and might beable to help here. However, the polyline idea is just a written down idea and there is nothing that prevent's you to re-create it in your own code with your own license.
I believe (I know I am on slippery ground here) that you can always add the GPLv2 font's in a GPLv3 projects as there is no direct linkage between compiled code and the font itself as long as you maintain copyright and mention license. Consult your local license guru to be sure :)

The use of vector font's is obviously much less than the past. Nowdays for a lot of applications TTF will be good enough as not to many people still use pen plotters, of in your case gerber file formats (does that even exist still???) The idea of vector font's really came from a area where vector fon't (with fills) where impossible to render quickly or to plot using pen plotters... IMH~O...

A stand aline parser can welcome, at least as a lib??

Hope that helps.
Ries