greiman / SSD1306Ascii

Text only Arduino Library for SSD1306 OLED displays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to Determine Biggest Text for 128 x 32

KungFuHaiku opened this issue · comments

Hi there,

First off, thanks for the fantastic library - it's so much snappier than the Adafruit one and has alleviated some blocking issues I had with a real-time application.

My question is whether you know which font and scale combination (e.g. set2X) I can use to capitalise on the screen's real-estate? I'd like the biggest text possible. At the moment I'm using fixednums8x16 with a set2X multiplier, but it could be bigger (or at least bold).

Also, how would I display both some large centred text and then a smaller string next to it (see attached image)? All my attempts are simply replacing one with the other.

oled-example-text

Many thanks.

I can't help with a choice for a better font than fixednums8x16 with a set2X multiplier. A few people have edited fonts with this font editor:

See openGLCDFontCreator.zip here:

https://bitbucket.org/bperrybap/openglcd/downloads/

See this "issue":

#85

There are several tools that help position text. The key idea is to determine the length of text and then position the cursor correctly.

Use size_t strWidth(const char* str) to determine the size of each section of text in pixels and then position the cursor to the appropriate position for the text. You may need to erase the area.