Jump to content

Assistance required converting a .bdf file to .c or .h


lesthegrngo

Recommended Posts

Here you are

Regards, Vinc

 

Edit: following parameters have been used, if you need only specific characters please tell me 

bdfconv.exe -v -f 1 -m "32-255" ../bdf/DecimalVHS48.bdf -o DecimalVHS48.c  -n u8g2_font_DecimalVHS48 -d ../bdf/DecimalVHS48.bdf
type DecimalVHS48.c

bdf.tga DecimalVHS48.c

 


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Ok, looks like I need to re-evaluate what I need in terms of the font conversion. The .c version of the file is essentially u8g2 format and seems incompatible with the SSD1306 library, so I need to find a way to convert the bdf file to an SSD1306 compatible .h file

I ended up using my son's computer to try and get bdfconv working, which did work. Not sure why it doesn't on my PC but at least I have managed to get that back. However studying the options, clearly a .h file is not one of them, so I now have to find some kind of converter that is compatible with SSD1306 files. I have found many that convert standard fonts, Squix for example, however none will do bespoke files.

Cheers

Les

Link to comment
Share on other sites

I can use that with the u8g2 library. Unfortunately SSD1306 needs a different protocol. 

However, I was able to achieve what I wanted to by playing around with the4 sketch. It's not perfect but it does the job. One day I'll come back to this and try and improve it

Cheers

 

Les

Link to comment
Share on other sites

Hi Vinc

I had the OLEDs working with a u8g2 version, but the sheer size of the u8g2 sketch when you are forced to use the full frame buffer option meant that you only had space to do the OLEDs and nothing else. There were advantages to the u8g2 version, there is a lot more flexibility with text and it works better for placement, but in the end the SSD1306 version was a better compromise.

Now, if they were to bring out a Nano with double the memory it would make me rethink it

By the way, yet again I found that there was a limit to the number of total devices that could be operated that was independent of the number of available pins. The setup theoretically would allow all 5 OLEDs via the multiplexer over pins A4 and A5, the 5 frequency rotary encoders via pins D3 to D12, and one of the rotary switches via D13, A0, A1, A2 and A3.

I could make the OLEDs and the 5 encoders work fine, but as soon as I add the rotary switch line, it stops the entire sketch from working. Uncomment the rotary switch line, back it comes. I found the same behaviour with the IFF panel using the BCD switches, it would accept all the BCD switches and a maximum of four or five other switches before it made the sketch fail, and that was on a Mega. I have no idea why, I ended up just designing around it

Cheers

Les

Link to comment
Share on other sites

Hi Les,

in described case I would propose to use two Nanos per panel. That should double the limit of useable inputs.

Another method is to use port expanders. As you don't rotate all the switches at the same time.

Regards, Vinc


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

On 9/8/2023 at 5:29 PM, outbaxx said:

How do you use the .c ?
Have you used this for any other display?
/F

You have to copy the code from the .c file into the Arduino sketch.

Than it can be used like the built-in fonts of the u8g2 library.

Edit: see ->here for an example.

 

Regards, Vinc


Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...