maxmacstn / HA-ePaper-Display

E-Paper display for viewing sensor data from Home Assistant.
361 stars 23 forks source link

How display thermometer icon #4

Closed ouhaiorg closed 3 years ago

ouhaiorg commented 3 years ago

can display the thermometer icon? how display other icon?

maxmacstn commented 3 years ago

In order to display other icons, you need to find a Unicode character that is corresponding to the icon in materialdesignicons-webfont.ttf

You can use this site to find the Unicode value of the glyphs in that font file. https://fontdrop.info/

And then find the Unicode character from the Unicode value from this site. https://unicode-table.com/ Ex. 0F0239 -> 󰈹

Finally, just use that 󰈹 character in the code where you want to display the icon as in the example in my code.

PS. Don't worry that you see a black box instead of icons in the code, it will work on the screen.

ouhaiorg commented 3 years ago

It's OK,thanks! I direct to replace '󰖎' for unicode '\uf0239' in glyphs and print.