Skip to content

In FPDF Kannada fonts are not displaying correctly.  #202

@gksathyarao

Description

@gksathyarao

In Python and FPDF , Kannada fonts are not displaying properly. Tried different Kannada /Uni code fonts but having same issue.
characters jumbled and does not show it properly .
Code : example
from fpdf import FPDF

pdf = FPDF()
pdf.add_page()
pdf.add_font('kan','','/Users/sathyarao/Library/Fonts/AnekKannada-VariableFont_wdth,wght.ttf')
pdf.set_font("kan",size=30)
ktext='ಕನ್ನಡ ರಾಜ್ಯ ಹೇಮ್ಮೇಯ ನಾಡು'
pdf.cell(150, 30, txt = ktext , align='c')
pdf.ln(30)
pdf.output('font.pdf')
print(ktext)

Correct way to display kannada is 'ಕನ್ನಡ ರಾಜ್ಯ ಹೇಮ್ಮೇಯ ನಾಡು' but in FPDF we see it as

image

print(ktext) - shows it correctly only issue with fpdf

ಕನ್ನಡ ರಾಜ್ಯ ಹೇಮ್ಮೇಯ ನಾಡು

Please help us to display Kannada words properly. Looks like this is issue will Indian languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions