Commit 75bab58c authored by faizol ama's avatar faizol ama

define main.py

parent c40d261c
import flet as ft
from theme.colors import Color
def main(page: ft.Page):
page.title = "Custom fonts"
page.fonts = {
"Kanit": "https://raw.githubusercontent.com/google/fonts/master/ofl/kanit/Kanit-Bold.ttf",
"Open Sans": "fonts/OpenSans-Regular.ttf",
}
page.theme = ft.Theme(font_family="Kanit")
page.add(
ft.Text("This is rendered with Kanit font", color=Color.DARK_BLUE),
ft.Text("This is Open Sans font example", font_family="Open Sans"),
)
ft.app(target=main, assets_dir="assets")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment