U8glib: Graphics Lib for LCDs and OLEDs

Hi Oliver

Thanks for the reply.

I have tried again with bdfconv.exe. I have checked the .bdf file I created and it has 11 glyphs (I only need numbers 1-10 and a degree symbol which I replaced glyph 47 with)

The code I put into the command line:

bdfconv.exe -v -b 2 -f 1 -m '47-57' myfont12.bdf -o myfont12.c -n myfont12 -d myfont12.bdf

It then output the following log:

Parse File myfont12.bdf: 11 glyph(s) found
Map: map_cmd_list=''47-57''
Map: exclude=0 from=0 to=0 map=0
Reduce: Start
Reduce: End
CalculateMaxBBX: x=1095254868, y=726999122, w=173162824, h=1380013139
CalculateMaxBBX: Encodings x=0, y=0, w=0, h=0
bf_CalculateMinMaxDWidth: dx_min=32767, dx_max=-32767
bf_CalculateMinMaxDWidth: x_min=32767, x_max=-32767
bf_CalculateMaxBitFieldSize: bbx.x=0, bbx.y=0, bbx.w=0, bbx.h=0, dwidth=0
RLE Compress: best zero bits 2, one bits 2, total bit size 0
RLE Compress: Font code generation, selected glyphs=0, total glyphs=11
RLE Compress: 'A' pos = 0, 'a' pos = 0
RLE Compress: Font size 27
Monospace Statistics: Max width extention 0, average width extention 0.0
bf_WriteU8G2CByFilename: Write file 'myfont12.c'

Opening the myfont12.c file doesn't seem to have found any glyphs:

/*
  Fontname: myfont
  Copyright: Michael
  Glyphs: 0/11
  BBX Build Mode: 2
*/
const uint8_t myfont12[27] U8G2_FONT_SECTION("myfont12") = 
  "\0\2\2\2\0\0\0\0\0HSTR\14\0\14\0\0\0\0\0\0\2\0\0\0";

I have attached the myfont12.bdf as a .txt for you too. Please let me know where I have gone wrong

Thanks

Michael

Hi
This is acutally a u8g2 problem (while this thread is for u8glib).
I have created an issue here: myfont2.bdf does not work · Issue #81 · olikraus/u8g2 · GitHub
Let us discuss the problem on github instead.

Thanks,
Oliver

Hi all. Ive connected LCD RG12864C-BIW-V to my Arduino DUE via voltage coverters 74LVX3245MTC and i have problem with software. Im sure that wrote right GPIO pins in class contructor from this library (using DB0..DB7, CS1,CS2,RS,RW,DI,E), but theres no LCD reaction. (I did everything what was wrote here: thelloworld · olikraus/u8glib Wiki · GitHub). I've used constructor U8GLIB_KS0108_128. On my board theres 1 way communication so im not checking LCD's busy flag, wanted deal with it using delays, but i can't find any delays in this library. Any ideas?

Problem solved, after checking everything 20th time found that i mixed CS1 with CS2 so position 0,22 was out of display. :slight_smile: rly nice library, ty.

Hallo,
ich möchte auf dem Nokia1510 mit dem "U8glib" font fub11 " °C" mit dem Befehl

u8g.drawStr(60, 15, " °C");

anzeigen lassen.
Es wird aber " İC" angezeigt.
Was mache ich falsch?

Reinhard

Hallo und willkommen.
Dies ist ein Englischsprachiges Thema.

You are telling the library to put a character number, followed by degrees Celsius on the screen.
The character is number 196 in that font (click !).
You should tell it to put your value to the screen instead of a character.

@Reinhard: You need to enter the correct hex code of the glyph into the string in the form " \xXYC" where XY should be the correct hex code of the symbol.
The problem is caused by the mismatch of the string encoding. Arduino IDE supports UTF-8 which is not supported by u8glib. The new version of u8glib (u8g2) supports UTF-8. So this problem will not appear any more with u8g2.

Oliver

Hello Oliver and MAS3,
thanks for your very quick answer.

Reinhard

Hello Oliver,

I am wondering if you could help me out with a problem. I have ARM STM32f4Discovery (STM32f407 if we are exact) I followed some guide and example code from the internet and while he had a working lcd mine is glitched. The square that you can see on the bottom right is something that I wanted to draw, everything else I didn't.

I am using the following SPI u8g_dev_st7920_128x64_hw_spi

Any suggestions? Also the screen is working normally on the u8g2 library on Arduino but I need to get it working on the STM

You should slow down the STM specific code.

Oliver

Hi. is this lib work with attiny85 and attiny84 over I2C?
Thanks

olikraus:
U8glib 1.00 is available for download.

Note: The DFRobot ST7920 should be supported by the U8GLIB_ST7920_128X64 device,
but it has been reported that this is not working. Maybe someone from the Arduino
community is able to check this (I do not own this display).

Oliver

I have a 128x64 graphic ST7920 display clone that looks, walks, quacks and feels like a Robot. This one works with your updated library (> 1,000,000 x thanks) displaying temperature (DS18B20) and humidity (DHT11) see sketch, see picture of the setup

LCD_128x64_DS18B20_DHT11_05_OK_works.ino (3.57 KB)

hello Arduino friends,
I have been looking for how to display Tibetan character on tft 2.4` mcufriend lcd for a week now... I am not able to find any related articles to display Tibetan character at all. can anyone help me how to make the display recognize Tibetan character Unicode encoding start with F00, and can display my language on any display

thank you in advance.

u8glib does not support unicode, but it could be added to u8g2 (which does support unicode).
However u8g2 does not support tft RGB displays.

Shell I add Tibetan font to u8g2 (which is a monochrome graphics lib)?

Oliver

Please, I need description of internal u8glib font format.
I need to get one char from regular font (u8g_font_helvR08) to reduced one, like u8g_font_helvR08r. But I do not know the u8glib font structure.
Thank you.

You can define the characters and/or remove the chars from the font source. Then use the modified font source file (BDF) and reconstruct the u8g font. Use the BDF sourcefile of the font and the bdf converter. Details are described here:

BDF font source: u8glib/helvB08.bdf at master · olikraus/u8glib · GitHub

Maybe also consider u8g2, which uses a compressed font format.

Oliver

Thank you Oliver, it worked.

Hi

Is it possible to use this library with the attiny85 digispark board and a st7920 LCD?

Qualcomm:
Hi

Is it possible to use this library with the attiny85 digispark board and a st7920 LCD?

U8g2 (the successor of U8glib) should work with attiny85 (only the U8x8 interface). ST7920 LCDs are supported with both libs.

Oliver

olikraus:
U8g2 (the successor of U8glib) should work with attiny85 (only the U8x8 interface). ST7920 LCDs are supported with both libs.

Oliver

What is the u8x8 constructor for the st7920?