Zeming Liu, Master’s candidate
David R. Cheriton School of Computer Science
TrueType font is a vectorized font which is used by almost all modern devices. TrueType font bytecode is a highly-dynamic stack-based bytecode language, which is hard to perform static analysis and optimizations on. It is executed by the font engines when rendering the font, to align the glyphs for specific screens and font sizes. The fonts used by webpages are always subset to include only the glyphs used by the webpages, to save the limited bandwidth and device’s memory. While current font manipulating techniques do not touch the bytecode, which makes the subset fonts contain un-optimized bytecode programs. Since accessing webpages using hand-held devices, such as smart phones, using 4G connection is more and more popular, it is the time to introduce TrueType bytecode analysis and optimization to font manipulation techniques.
COI is the first attempt to manipulate TrueType bytecode, which enables the analysis and optimization of TrueType bytecode. This work improved the design of our the prototype abstract executor, introducing new features to COI. We also performed basic optimizations on COI and completed the cycle by translating the COI back to TrueType bytecode.
Our latest abstract executor and COI can successfully translate TrueType font programs to COI more practically. Our experiments show that the optimization can reduce the size of bytecode and the optimized font yields the same bitmaps as the original font.
200 University Avenue West
Waterloo, ON N2L 3G1