Looking at the example in the KivyMD documentation, the Labels the data table appear to respond to markup.
I’d suggest changing the font with markup. See: https://kivy.org/doc/stable/api-kivy.uix.label.html?highlight=label#markup-text
from kivy.metrics import dp
from kivy.uix.anchorlayout import AnchorLayout
from kivymd.app import MDApp
from kivymd.uix.datatables import MDDataTable
class Example(MDApp):
def build(self):
layout = AnchorLayout()
data_tables = MDDataTable(
size_hint=(0.9, 0.6),
use_pagination=True,
column_data=[
("No.", dp(30)),
("Column 1", dp(30)),
("[color=#52251B]Column 2[/color]", dp(30)),
("Column 3", dp(30)),
("[size=24][color=#C042B8]Column 4[/color][/size]", dp(30)),
("Column 5", dp(30)),
],
row_data=[
(
f"{i + 1}",
"[color=#297B50]1[/color]",
"[color=#C552A1]2[/color]",
"[color=#6C9331]3[/color]",
"4",
"5",
)
for i in range(50)
],
)
layout.add_widget(data_tables)
return layout
Example().run()
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/8e39c9df-1c72-4c05-b67f-5cb4813d4c28n%40googlegroups.com.
Did you use the markup directives in Label to set the font to a font that contains the required glyphs?
From: tornike kharitonishvili
Sent: Thursday, May 5, 2022 11:23 PM
To: Kivy users support
Subject: Re: [kivy-users] python kivymd MDDataTable font error
Thanks for the feedback.
I have a problem with the data retrieved from the server.
For example:
I have a record on the server in Georgian, but it does not show me in MDDataTable:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b703bb17-cbbb-4087-a0b4-aba4d676765bn%40googlegroups.com.