Closed fieldofhats closed 11 months ago
I'd try manually decoding and drawing a letter from your .c file on some graph paper or a spreadsheet. Then draw the same letter from one of my existing fonts (preferably the same size or close to the same size). Pick a letter such as "F" that doesn't have line symmetry.
I don't think there is any standard for generating .c font files. Your program may be incompatible. You can post the line for the letter F and I will take a look. I might be able to create a converter.
Thank you for getting back to me and taking a look at this. I understand my font might be incomparable. The font file can be viewed at : https://github.com/fieldofhats/c_font_example/blob/main/28_pt_font.c. Ill paste the line for F below.
fyi this is the app that I used: https://github.com/ayoy/fontedit/releases/v1.1.0
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0x0F,0xF0,0xFF,0x0F,0xF0,0xFF,0x0F,0xF0,0x00, 0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00, 0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0xFF,0x07,0xF0,0xFF,0x07,0xF0,0xFF,0x07,0xF0, 0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00, 0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00, 0xF0,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00, // Character 0x46 (70: 'F')
Please generate a font the same size as one of my fonts such as 13x21 pixels. Also, a variable width font would be better than fixed width.
A quick review of the coding of your letter F show several differences from GLCD Font Creator format.
Here's what your F would look like when decoded:
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000011111111111111110000
000011111111111111110000
000011111111111111110000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011111111111111100000
000011111111111111100000
000011111111111111100000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000011110000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
Here's how to write a conversion program:
great, Ill give it a try. Thank you for the advice.
I went ahead and created a FontEdit conversion utility for you. This is a very quick release that I didn't thoroughly test. I converted your Deja Vu font and it worked.
Wow, Rad! thank you, ill try it out.
Hello, any chance you could help me figure out how to load a new font? I'm on linux so not using glcd-font-creator, I found a different utility that make a .c font file and I was able to load it after some struggles (the font has a different bytes per letter than specified in the load code from the xglcd_font script. Now I am getting an error in the get_letters function (in the xglcd_font scrip) when i try to draw letters on the screen. the error is on line 144 of the xglcd script, and I do not have much experience dealing with raw memmory. If you are willing to take a look I can share the font file etc. Thank you in advance, Brian