Digital Font OLED - Seven Segment Display

Hi Team, where do I find a Digital font for OLED -- -- BUT -- -- Not an Adafruit library

many thanks I have done some searches on here and the web, it is proving difficult.

ie Seven Segment display

OLED 128x64 Screen, main Libraries are used below

U8g2_Arduino-master
U8g2

height required, I don't know yet, 30 Pixels, maybe (0-9 only) no letters

Digital read out

You have been a member for over 3 years.

Please post link to actual display that you bought.
Please say which library you prefer to use.
Please say what size font you require e.g. height of 8 in pixels

What is a Digital font ?
If you want a font with only digits 0 to 9 say so.

David.

Hi Dave, notes added, sorry new to the OLED, my understanding it is the library that holds the fonts, thus thats what I am looking for - is this the correct understanding, I have downloaded all the libraries I can find

once I understand if a font (or I can create one) exists, then I can understand the need and write questions to ask, yes 3 year member, but 2 days on OLED

Google for "U8g2 numeric font".

Oliver has an excellent Wiki. And a wide range of numeric fonts.
He supports a wide range of hardware screens. e.g. 128x64 SSD1306

It is always wise to post links to your actual hardware because libraries are often specific to certain displays. However U8g2lib supports almost every monochrome display.

David.

Hi Dave thanks, yes this has the 7 Seg display, Awesome, and it works but is 42 px high, next thing I have to work out is how to edit the code (if I can) to make it 30 px high ??

code below, trying to "work it out"


const uint8_t u8g2_font_7Segments_26x42_mn[847] U8G2_FONT_SECTION("u8g2_font_7Segments_26x42_mn") =
"\22\2\5\5\6\6\1\1\7 \0\0\0\0\0\0\0\0\0\3\62 \15\240:\370\203\377\377\377"
"\377\377-\0*\15\240:\370\203\377\377\377\377\377-\0+\15\240:\370\203\377\377\377\377\377-\0,\15"
"\240:\370\203\377\377\377\377\377-\0-\15\240:\370\203\377\377\377\377\377-\0.\15\240:\370\203\377\377"
"\377\377\377-\0/\15\240:\370\203\377\377\377\377\377-\0\60}\240:\70X!\70W\20\20\25\6#"
"\10)\14\206\220\204!$a\10I\30B\22\206\220\204!$a\10I\30B\22\206\220\204!$a\10"
"I\30B\22\206\220\204!$a\10I\230\201\16'\260\1\12lp\6:\30B\22\206\220\204!$a"
"\10I\30B\22\206\220\204!$a\10I\30B\22\206\220\204!$a\10I\30B\22\206\220\204!$"
"a\4!\205\1Qa\60W\20\216\25\202\3\0\61\35\240:\30\7\37\0B\37q\362\377\353\203\17>"
"\0\2\77p\362\377\353#/\370\340\0\62+\240:\70X!\70W\20\20\25\6%\205\201\223\377_\232"
"\302\200\252\20\240 Th\10S\42\70\371\377\270 $F\251KY\11\0\63.\240:\70X!\70W"
"\20\20\25\6%\205\201\223\377\237\222\302\220\250\20(*\4K\12\3'\377\77%\205\1Qa\60W\20"
"\216\25\202\3\0\64M\240:\30\7\37\0B\37\214P\7CH\302\20\222\60\204$\14!\11CH\302"
"\20\222\60\204$\14!\11CH\302\20\222\60\204$\14!\11CH\302\20\222\60\204$\314\20\244\60\234"
" P!HU\10\324\24\6N\376\177}\344\5\37\34\0\65+\240:\70X\351Z\224\22\204\244\10N"
"\376\77>\204I\5\241RU\10\324\24\6N\376\177J\12\3\242\302`\256 \34+\4\7\0\66U\240"
":\70X\351Z\224\22\204\244\10N\376\77>\204I\5\241JA\240Bp\206 \205\301\20\222\60\204$"
"\14!\11CH\302\20\222\60\204$\14!\11CH\302\20\222\60\204$\14!\11CH\302\20\222\60\204"
"$\14!\11#\10)\14\210\12\203\271\202p\254\20\34\0\67#\240:\70X!\70W\20\20\25\6%"
"\205\201\223\377_\37|\360\1\20\370\201\223\377_\37y\301\7\7\0\70\202\240:\70X!\70W\20\20"
"\25\6#\10)\14\206\220\204!$a\10I\30B\22\206\220\204!$a\10I\30B\22\206\220\204!"
"$a\10I\30B\22\206\220\204!$a\10I\230!Ha\70A\240B\200\202@\205\340\14A\12\203"
"!$a\10I\30B\22\206\220\204!$a\10I\30B\22\206\220\204!$a\10I\30B\22\206\220"
"\204!$a\10I\30B\22F\20R\30\20\25\6s\5\341X!\70\0\71X\240:\70X!\70W"
"\20\20\25\6#\10)\14\206\220\204!$a\10I\30B\22\206\220\204!$a\10I\30B\22\206\220"
"\204!$a\10I\30B\22\206\220\204!$a\10I\230!Ha\70A\240B\220\252\20\250)\14\234"
"\374\377\224\24\6D\205\301\134A\70V\10\16\0:\30\240:\370\203\37\33x\261K|\370\340\377\177p"
"\340\305.\361\341\203\77\0\0\0\4\377\377\0";

There are plenty of attractive numeric fonts in U8g2. Available in many sizes.

It looks as if U8g2 only has this monster 26x42 "ugly" font.

From a practical point of view, it would be simpler to just use Adafruit_SSD1306 library. And very straightforward to create a 30-pixel ugly font. Adafruit_SSD1306 updates the whole screen seamlessly.
Unlike TFT libraries that draw directly to the screen which means you "see" the previous digit being re-drawn.

Adding a new font to U8g2 is difficult.

p.s. my name is David.

H David

yes Adafruit will be the go, but for the project we cant use it, so cornered, is there an xxx.c fonr editor or creator, the has to be somewhere

Well, the difficulty with this Arduino. How cool it would be to copy fonts from somewhere and not bother)

Put your brain into gear. If you have a 128x64 OLED there are practical difficulties in fitting "big" digits on the screen.

e.g. 1 line with 4 digits that are 32x64
e.g. 2 lines with 8 digits that are 16x32

Bear in mind that the lit pixels will be smaller. You have to allow a space between each digit.

You can convert a TTF font on your PC for U8g2 format.
Or convert most other font formats to Adafruit FreeFont format.

It can be a bit fiddly to do the conversion. But if you can show the exact font with exact size that you want to use, someone might do it for you.

If you want a "normal" font with letters 32-127 there are online tools.
For restricted fonts like digits-only, you need to use command line tools. (Or someone might do it for you)

In practice, I would choose the "most attractive" font that comes with your library e.g. U8g2 or Adafruit_GFX.
If none are suitable, be clear about exactly what "custom" font you want.

David.