Francesco, you mentioned some time back you intended to provide a way of generating .BIN files to use as Annex custom fonts.
Doing a hex dump of one it does appear to be a fairly simple bitmapped file.
I know you've got a lot on your plate at the moment, but could you possibly give some detail on the format of a .BIN font file?
Format of .BIN fonts.
-
- Posts: 250
- Joined: Mon Feb 15, 2021 1:44 pm
- Has thanked: 156 times
- Been thanked: 145 times
-
- Posts: 521
- Joined: Tue Jun 21, 2022 2:17 pm
- Location: South coast UK
- Has thanked: 291 times
- Been thanked: 163 times
- cicciocb
- Site Admin
- Posts: 2781
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 592 times
- Been thanked: 1990 times
- Contact:
-
- Posts: 250
- Joined: Mon Feb 15, 2021 1:44 pm
- Has thanked: 156 times
- Been thanked: 145 times
Re: Format of .BIN fonts.
And there again, maybe not[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Nov 07, 2022 8:59 pm . . . it does appear to be a fairly simple bitmapped file.

Looks like it's continuous, not byte constrained data, with the first block (434 bytes in the TomThumb font) pointing to offsets in the main data block.
That's like the Arduino GFX Glyph library format these originated from, but I was hoping they'd be decompressed for Annex use.
Ah well

Francesco, does your cryptic comment mean you don't know either?

(You were using someone else's code to convert these?)
- cicciocb
- Site Admin
- Posts: 2781
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 592 times
- Been thanked: 1990 times
- Contact:
Re: Format of .BIN fonts.
No, it was simply a joke.
The format is simply the GFXfont format, (the include .h files simply converted in .bin) but using a simple little trick to have all in the same contiguous memory space.
In fact these fonts contains several tables (3, if I remember well) that can be allocated in different memory places when imported in the code as .h
What I did is simply put these tables in sequence with an offset reference and computing back the absolute memory address when loaded in memory.
This has been done to be compatible with the original tft_espi functions and font format.
The problem is that I forgot how I did and I need to find where is the program I did for the conversion.
The good news is that I'm working on the WS28B12 and I want implement text scrolling so I'm motivated in the research
The format is simply the GFXfont format, (the include .h files simply converted in .bin) but using a simple little trick to have all in the same contiguous memory space.
In fact these fonts contains several tables (3, if I remember well) that can be allocated in different memory places when imported in the code as .h
What I did is simply put these tables in sequence with an offset reference and computing back the absolute memory address when loaded in memory.
This has been done to be compatible with the original tft_espi functions and font format.
The problem is that I forgot how I did and I need to find where is the program I did for the conversion.
The good news is that I'm working on the WS28B12 and I want implement text scrolling so I'm motivated in the research
- cicciocb
- Site Admin
- Posts: 2781
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 592 times
- Been thanked: 1990 times
- Contact:
Re: Format of .BIN fonts.
I have a good news for you
Always using the web simulator, I created a little example and written a simple procedure in the sketch available here
https://wokwi.com/projects/347765374091002450
You will find the instructions with an already included font in the tab "sketch.ino"
Enjoy and let me know; you could also share the converted fonts on the forum.
cicciocb

Always using the web simulator, I created a little example and written a simple procedure in the sketch available here
https://wokwi.com/projects/347765374091002450
You will find the instructions with an already included font in the tab "sketch.ino"
Enjoy and let me know; you could also share the converted fonts on the forum.
cicciocb
-
- Posts: 250
- Joined: Mon Feb 15, 2021 1:44 pm
- Has thanked: 156 times
- Been thanked: 145 times
-
- Posts: 250
- Joined: Mon Feb 15, 2021 1:44 pm
- Has thanked: 156 times
- Been thanked: 145 times
Re: Format of .BIN fonts.
. . . or even tonight.
Just tried running through the process for making an Annex font from a TTF and it works perfectly.
Just tried running through the process for making an Annex font from a TTF and it works perfectly.
