markw65 / monkeyc-optimizer

Utilities for optimizing monkeyc projects
10 stars 0 forks source link

new devices don't output fonts as the old ones #2

Open flocsy opened 9 months ago

flocsy commented 9 months ago

npx cft-font-info fr165 vs npx cft-font-info fr245

New devices (fr165, fr165m, venu3, venu3s) are missing the "fonts" section.

markw65 commented 9 months ago

I mentioned this in the forum the other day - it currently only deals with .cft fonts, but many newer devices use .ttf fonts, or a mix of .ttf and .cft. And that seems to be the problem here.

I've also noticed that a few fonts aren't there at all; presumably Garmin's licensing agreement didn't include shipping the fonts in the sdk.

I do plan to update it, but I'm not sure when I'll get around to it. There are existing projects for dealing with .ttf files, so I think I can just use something like opentype.js to parse the fonts and get all the character info.

flocsy commented 9 months ago

This makes me wonder: the simulator does display the texts using some fonts. So if the fonts in the simulator.json (that is your input, isn't it?) are not the ones used by the simulator, then why are they there? We also know that they are not necessarily the fonts used by the real device either. This whole thing confuses me.

Also the fonts called FONT_SIM_EXT... look like they are not fonts from real device, only for the simulator (at least that's what the name suggests), but then even some of them are missing... really confusing