kicad-developers team mailing list archive
Mailing list archive
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
Maciej Sumiński <maciej.suminski@xxxxxxx>
Thu, 14 Apr 2016 11:33:18 +0200
spf=pass (sender IP is 126.96.36.199) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
As recently Jean-Pierre has reported he had been running out of memory
with complex boards, I decided to take another step to reduce memory
footprint of OpenGL canvas.
Currently, the most expensive thing to draw is stroked text, as there
are lots of labels on tracks and pads. To reduce the drawing cost (and
memory requirements), texts that are not targeted to Gerber files (i.e.
pad & track labels) might be displayed using bitmap fonts. This way, a
single letter cost is reduced from tens of triangles to just two.
Another gain is we can select any font for this purpose and easily
change it. I picked one for testing, but I think we have to decide
together which one shall be used. Bitmap fonts are also antialiased (I
am sorry Lorenzo), so they might be a bit easier on eyes.
As texts now do not occupy as much memory space as they used to, they
might be stored in the video card memory. Thanks to that, they might be
displayed on selected items as well (in the past selected items had
labels removed). This should also reduce per-frame traffic and make
rendering process smoother.
I did my best to use the same character set as is available with the
original stroke font, but I wonder if it is really necessary. It seems
that net/pad names are limited to latin characters, so maybe we should
limit the character set. Thoughts?
At the moment bitmap fonts are only available in OpenGL canvas, as I
believe they offer the greatest performance boost there. I am not sure
if Cairo can really benefit from such solution, but it might be tested
Before I push the changes to the master repository, I will be grateful
for some testing  and feedback. There are also two screenshots [2, 3]
to demonstrate the difference.
Description: OpenPGP digital signature