You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
gksathyarao
changed the title
In FPDF Kannda fonts are not displaying correctly.
In FPDF Kannada fonts are not displaying correctly.
Jul 21, 2022
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
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.
The text was updated successfully, but these errors were encountered: