[Cuis-dev] Optimization in TrueType fonts

Juan Vuletich juan at jvuletich.org
Fri May 17 06:21:07 PDT 2019


Hi Folks,

Saving an image with TrueType fonts already loaded resulted in huge 
image files. And in a few cases, corrupt images (thanks Ken and Luciano 
for reporting).

Problem was that the TrueType font description stuff I took from Squeak 
creates a huge number (several million in our case) of TTPoint, Point 
and Rectangle. I modified the code to use more efficient 
ShortPointArrays, ByteArrays with new bit access, and straight numeric 
ivars instead of Rectangles. Also removed some fonts (although they are 
in the zip files, and of course on the Web). Images saved are now much 
smaller, and have few big objects instead of many small objects. This 
means less stress on GC and better VM stability.

Please try it. It is important to get rid of older instances. If 
possible, start with a fresh image.

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list