However, I did discover something very interesting. The size of the executable. It came out to right around 250K upxed. That's really, really small compared to the 2+MB upxed links executables that I've been building. This got me thinking again about how to put links on a diet. I know OpenSSL is significantly heavier than MatrixSSL. But the built in font contributes most of the links bloat. Bunjalloo gets by with only one size (small) font containing only ASCII characters as far as I know. On the tiny zipit screen that's probably good enough. If you think about it, the text mode of links does exactly that.
Now, I already knew the enormous font_include.c file was just a bunch of png files shoveled into C code. But after some digging around I finally realized the graphics subdirectory contains the actual png glyph files and source to the generate_font program which created font_include.c. Jackpot! I pruned the glyph files down to just the basic Latin15 codes and some extra punctuation glyphs and then ran generate-font. Next I rebuilt links with the new slimmer font_include.c and voila! The upxed executable is almost megabyte lighter.
I tested it on some ebooks and a few websites. So far It seems to have all the glyphs I typically run into, except for some unusual arrow characters on slashdot that weren't in the original font anyhow. It's definitely a step up from retawq on the jffs.
I'm now positive I can get a upxed build of links (with graphics) slimmed down to less than a megabyte. Some of the options I might try are:
- Only one font (no monospace text)
- No bold characters
- ASCII only (no Latin15)
- MatrixSSL instead of OpenSSL
- No SSL.
That should free up a whole bunch of space on the rockbox/links iz2jffs distro variant...
For the gmenu2x/gmu iz2jffs I save 200K right off the bat by using the existing jpeg, png, and libz shared libs required by gmenu2x instead of the static libs. I can get another 150K by retiring retawq. And I think removing the bold characters buys 200-300K. If I rebuild gmenu2x without libfreetype (using the code from slug's github?) I think it all might just fit. For now I just went only ASCII only, no bold, and no SSL for a 750K quick and dirty retawq replacement on the gmenu2x/gmu iz2jffs system.
links-iz2jffs-gmenu2x.tar.bz2
I'll try to put SSL and such back in after I see how the new gmenu2x build goes...