Closed ouhaiorg closed 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.
It's OK,thanks! I direct to replace '' for unicode '\uf0239' in glyphs and print.
file: 'fonts/materialdesignicons-webfont.ttf' id: mdi_small size: 31 glyphs: [ '', # mdi-wifi-strength-alert-outline '', # mdi-themometer '' # mdi-water-percent ]
it.print(375, 75 + offsetY, id(mdi_small), TextAlign::BASELINE_CENTER, ""); //thermometer
can display the thermometer icon? how display other icon?