Skip to content

Instantly share code, notes, and snippets.

@kengoon
Created June 11, 2021 12:29
Show Gist options
  • Save kengoon/9766ef6be656f97334fa8ae616f799f0 to your computer and use it in GitHub Desktop.
Save kengoon/9766ef6be656f97334fa8ae616f799f0 to your computer and use it in GitHub Desktop.
example of how to use icofont
import os
from kivymd.app import MDApp
from kivy.lang import Builder
from kivymd.uix.label import MDIcon, MDLabel
from kivymd.uix.button import MDIconButton
from tools.iconfonts import icon, register
register("material", "fonts/MaterialIconsSharp-Regular.otf", "fonts/MaterialIconsSharp-Regular.fontd")
class Test(MDApp):
def build(self):
Ic = MDIcon(halign="center", markup=True, font_style="Icon")
Ic.text = icon("search", font_name="material")
return Ic
Test().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment