При печати таблицы в приведенном ниже коде язык Arabi c отображается в виде символов. Спасибо
import mysql.connector
from reportlab.lib import colors
from reportlab.lib.pagesizes import letter
from reportlab.platypus import Paragraph, SimpleDocTemplate, Table, TableStyle
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
doc = SimpleDocTemplate("Ropert_Accont.pdf", pagesize=letter)
pdfmetrics.registerFont(TTFont('Arabic', 'Arial.ttf'))
styles = getSampleStyleSheet()
elements = []
db = mysql.connector.connect(user='root', passwd='', host='localhost', database='users')
cursor = db.cursor()
cursor.execute("SELECT * FROM acoonus WHERE idus = 1")
result = cursor.fetchall()
dt = [('ت', 'المبلغ', 'تاريخ التسليم', 'الملاحضات')]
for rus in result:
dt = dt + [rus]
t = Table(dt)
t.setStyle(TableStyle([('ALIGN', (0, 0), (-1, 0), 'CENTER'),
('TEXTCOLOR', (0, 0), (-1, 0), colors.black),
('BACKGROUND', (0, 0), (-1, 0), colors.green),
('TEXTCOLOR', (0, 0), (0, -1), colors.red),
('VALIGN', (0, -1), (-1, -1), 'MIDDLE'),
('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black),
('BOX', (0, 0), (-1, -1), 0.5, colors.black),
('TEXTfont', (0, 0), (-1, -1), "Arabic")
]))
elements.append(t)
doc.build(elements)