Skip to content

Instantly share code, notes, and snippets.

@vijinho
Created October 26, 2014 13:32
Show Gist options
  • Save vijinho/5e658aea0d823aaf6270 to your computer and use it in GitHub Desktop.
Save vijinho/5e658aea0d823aaf6270 to your computer and use it in GitHub Desktop.
from kivy.core.text import LabelBase
KIVY_FONTS = [
{
"name": "Ubuntu",
"fn_regular": "assets/fonts/ubuntu/Ubuntu-L.ttf",
"fn_bold": "assets/fonts/ubuntu/Ubuntu-M.ttf",
"fn_italic": "assets/fonts/ubuntu/Ubuntu-LI.ttf",
"fn_bolditalic": "assets/fonts/ubuntu/Ubuntu-MI.ttf"
}
]
for font in KIVY_FONTS:
LabelBase.register(**font)
# in .kv
<Label>:
font_name: 'Ubuntu'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment