Exemplo n.º 1
0
    def register_fonts(self):
        for font in FONTS:
            LabelBase.register(**font)

        for iconfont in ICON_FONTS:
            create_fontdict_file(**iconfont)
            register_iconfont(**iconfont)
Exemplo n.º 2
0
 def test_create_fontdict_file(self):
     res = iconfonts.create_fontdict_file("iconfont_sample.css",
                                          'iconfont_sample.fontd')
     self.assertEqual(res, {'icon-plus-circled': 59395, 'icon-spin6': 59393,
                            'icon-doc-text-inv': 59396,
                            'icon-emo-happy': 59392,
                            'icon-comment': 59397, 'icon-users': 59394})
Exemplo n.º 3
0
 def test_create_fontdict_file(self):
     res = iconfonts.create_fontdict_file("iconfont_sample.css",
                                          'iconfont_sample.fontd')
     self.assertEqual(
         res, {
             'icon-plus-circled': 59395,
             'icon-spin6': 59393,
             'icon-doc-text-inv': 59396,
             'icon-emo-happy': 59392,
             'icon-comment': 59397,
             'icon-users': 59394
         })
Exemplo n.º 4
0
import iconfonts

iconfonts.create_fontdict_file('./css/fontawesome.css', 'font-awesome.fontd')
Exemplo n.º 5
0
__author__ = 'Jan Bogaerts'
__copyright__ = "Copyright 2016, AllThingsTalk"
__credits__ = []
__maintainer__ = "Jan Bogaerts"
__email__ = "*****@*****.**"
__status__ = "Prototype"  # "Development", or "Production"

import iconfonts

iconfonts.create_fontdict_file('font-awesome.css', 'font-awesome.fontd')
Exemplo n.º 6
0
from kivymd.theming import ThemeManager

from app.models import db
from app.util import TELAS
from app.views.configuracao import Configuracao
from app.views.contatos import (TelaContatos, TelaEditarContato,
                                TelaNovoContato, TelaVisualizarContato)
from app.views.inicio import Home
from app.views.sobre import Sobre
from app.views.transacoes import (TelaNovaTransacao, TelaTransacoes,
                                  TelaVisualizarTransacao, TelaEditarTransacao)
from iconfonts import create_fontdict_file, register
from settings import ICONFONTS, FONTS, LOCALE

for font in ICONFONTS:
    create_fontdict_file(font['css'], font['fontd'])
    register(font['name'], font['prefix'], font['ttf'], font['fontd'])

for font in FONTS:
    LabelBase.register(**font)


class MyRootLayout(NavigationLayout):
    def __init__(self, **kwargs):
        super(MyRootLayout, self).__init__(**kwargs)
        self.pp = App.get_running_app()

    def switch_to(self, screen, **kwargs):
        if screen == TELAS.INICIO:
            self.ids.scr_mngr.switch_to(Home(name=screen.name))