Getting bitmap data out of Caps embedded fnt files

  1. "Save & Download" the file from Caps
  2. Open in text editor
  3. find line starting data=
  4. cut&paste everything after that on the one long line into a new file
  5. save it somewhere as data.bin
  6. in Terminal.app:
    cat data.bin | base64 -d > out.png
  7. you have your image data as out.png

If you open the browser’s Console and enter prefs.saveFormat=1 that will save separate fnt+png files. prefs.saveFormat=0 will restore the default all-in-one fnt file.

This will also be exposed in an upcoming update:
Screen Shot 2021-05-12 at 10.31.00 AM

2 Likes

Hi Shaun, prefs.saveFormat=1 is only saving the PNG at the moment?

I think the browser is doing something weird when saving the fnt file when a fnt file of the same name already exists in your Downloads folder. I was able to reproduce but discovered that changing the name of the font before you save (or moving or renaming the all-in-one already in the Downloads folder) seems to make it perform as expected.

It’s weird that this didn’t come up in testing because I remember it creating a font-name-2.fnt if an all-in-one font-name.fnt already existed when you saved as separate fnt+png files. (It actually does this anytime you try to save and download a fnt with the same name but different contents.)

I really wish browsers could request access to the local file system (Chrome’s proposed API looks to be dead in the water Window: requestFileSystem() method - Web APIs | MDN).

Yes! I looked into Local File System Access API but it's still cooking.

It's not even downloading two items, only one is in my downloads list. I'd expect two.

I'll make sure to not have exiting files in the same save folder and see how I get on.