Jump to content

Recommended Posts

Posted (edited)

Hi Les,

the name of your font is "SEG14" so the line must read as follows

u8g2.setFont(SEG14);

But even if there are no compiling errors, the font is not displayed.

 

EDIT:

Have a look at Olli Kraus's webite (the author of U8g2) how to convert fonts.

https://github.com/olikraus/u8g2/issues/1140

He even has an example there of the 14 segment font at the end of the page. Unfortunately the height is 18pt (20 pixels).

 

Regards, Vinc

Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted

Thanks Vinc and Outbaxx, I finally got it working

My bdfconv files were not appending the headers with "u8g2_font_" hence the error for the callout. Once I figured that out and added "u8g2_font_" in front of the font name the fonts I was creating started working.

So it is now showing  the correct numbers and at the correct height, I will have to play with the actual bitmaps a bit to make them nicer. However it is a bit weird that there is no full stop / decimal point included in the font, and when you go to a font editor, the character space is blanked out that corresponds to the decimal point. Unfortunately that is a necessary glyph, so my next task is how to incorporate it in the font

Cheers

Les

Posted

Ok, all, job done! I found another font that had the decimal point in it, and used Fony to basically redo all the numerical characters and decimal point to suit my sketch. And boy am I happy at how it turned out!

The characters look great, the spacing of the characters is perfect for my fascia, and it works perfectly with the Nano. For anyone interested I have included the sketch below for download, remember that this is for the 2.08" SH1122 OLED but you can probably use the guts of it to suit another OLED.

Now, just because I like a challenge I am going to see if I can get a 0.66" i2C OLED to run from the same Nano.

Once more, thanks to Vinc and Outbaxx for their help on this

 

Les 

208OLEDUHF_with_go_wait_SEG14_LCD5.ino

  • Like 2
Posted (edited)

Well, a lot easier than I thought, I managed to make two instances of the OLEDs and it worked first time. 
 

I’ll have to make a second smaller font to match the smaller OLED, but that should be easy now I’ve learned how to do it

Les

Edited by lesthegrngo
  • Recently Browsing   0 members

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