This post was updated on .
Hi,
I'm the main developer of LibrePCB and I'm looking for a vector font which can be used in PCBs to make Gerber export possible (only straight lines and arcs are allowed). I found several existing fonts, for example: - Hershey - NewStroke - QCad CXF - LibreCAD LFF As the first two do not support arcs, they don't look really nice, so I don't like to use them in LibrePCB. The CXF and LFF look pretty nice because they support arcs and even allow to let characters inherit from other characters which saves space in the font files. But I still have several questions, maybe someone of you could help me here? - Why has LibreCAD introduced LFF instead of using CXF? - What's the difference between CXF and LFF? - Is there any documentation about the LFF file format? - Are you satisfied with LFF or would you change something to make it better? If I'm not mistaken, the license of most of your LFF files should be compatible with GPLv3 and thus could also be used in LibrePCB (which is GPLv3). But the source code of your parser (rs_mtext.cpp) is GPLv2 and thus probably not compatible with GPLv3(?). Actually I wonder why there isn't a good "standalone" free vector font project which could be used in many other projects (e.g. QCad, LibreCAD, LibrePCB, KiCad, and many other CADs). There are many projects which require vector fonts. Maybe I will create such a standalone project instead of embedding it in the source code of LibrePCB. If I created a standalone LFF font parser, would you be interested in using this also in LibreCAD? I would love to see some discussion about vector fonts here :) Regards |
Administrator
|
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 |
Hi Ries,
Many thanks for your response! Now I have some more information which helps to decide how to proceed with my project :) Yes, (unfortunately) Gerber is still the de facto standard for PCB production data, and it is even still under active development ;) And because Gerber does not have any support for fonts, we need to convert texts to polylines. But TTF is extremely complex and thus a pain to convert it into polylines, so a simple stroke font makes sense here. Of course it would be developed as a library. I would need to integrate it into my C++ project then. Regards, Urban |
Free forum by Nabble | Edit this page |