rm-hull / luma.oled

Python module to drive a SSD1306 / SSD1309 / SSD1322 / SSD1325 / SSD1327 / SSD1331 / SSD1351 / SH1106 OLED
https://luma-oled.readthedocs.io
MIT License
807 stars 161 forks source link

Support to display latin characters #389

Closed DavidEscri closed 5 months ago

DavidEscri commented 5 months ago

Type of Raspberry Pi

Raspberry Pi 4 model B

Linux Kernel version

Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Expected behaviour

Display characters with diaeresis (ü), the tilde (ñ), and the acute accent (é, á, í, ó, and ú) in the next order: a - á - ä - A - Á - Ä e - é - é - E - É - Ë i - í - ï- I - Í - Ï o - ó - ö - O - Ó - Ö u - ú - ü - U - Ú - Ü ñ - Ñ

Actual behaviour

I'm using the modules:

from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import sh1107
from PIL import Image, ImageDraw, ImageFont

When using draw.text() function it display the next characters: display_oled_spanish_characters

DavidEscri commented 5 months ago

It was a Font issue, is not related with luma.oled module. Loading a truetype font solved the issue.