AdriaanK
(Adriaan Kop)
July 9, 2023, 7:54pm
1
Currently im working on a Lilygo T5 screen and im busy with using the openweathermnap weather codes.
These codes have a matching unicode font. now im not a big programmer and i have trouble displaying them. when ik print one of the fonts on the lilygo screen its displayed multiple times instead of once. im sure im making a mestake somewhere with calling the unicode icon but i dont know where. Bits of the code i use are below.
font section:
file: ‘fonts/owfont-regular.ttf’
id: OWM_font_250
size: 250
glyphs: [
“uniED82”,
]
lambda section:
it.printf(260, 55, id(OWM_font_250), TextAlign::TOP_LEFT, “%s”, “uniED82”);
i hope some one can give me a push in the richt direction.
Kind regards Adriaan
zoogara
(Daryl)
July 10, 2023, 12:02am
2
Are you sure that Unicode notation is supported? According to the docs glyphs: only supports single characters and ligatures.
I use a similar method to the one detailed in this post:
I want to make a weather station out of a ESP32 with attached e-paper screen. So I will get a weather forecast from HA and depending on what the forecast is, I need to display a different icon. I could download all the possible pictures, include them all in the .yaml definition and in the lambda write a big if statement to select the right image.
It seems to me that the MaterialDesign icons web font should be able to do the same but in a smaller, lighter package. So if I include the .ttf webfon…
AdriaanK
(Adriaan Kop)
July 11, 2023, 12:28pm
3
thank you for your reply, ik wil have a look at that post, hopefully i understand whats going on.
btw this is whats happening when i use the font (apart from the screendamage)
So the font seems to work as wel as the calling but i probably do it the wrong way.
.
AdriaanK
(Adriaan Kop)
July 22, 2023, 6:33pm
4
Found the solution, calling the uniED82 needed to be changed to \uED82.
1 Like