0

I'm using fpdf2 for python (pyfpdf) and I have a problem to show some whatsapp characters in my pdf. It would be great if I could use the whatsapp .ttf file but I don't know the name or even if it exists

I show my code here

from fpdf import FPDF
...
self.add_font("DejaVuSans", fname="C:/Users/Downloads/fonts/segoe-ui-symbol.ttf")

But I have some problems with some characters like for example รข or icons like

1 Answers1

1

Using the latest version of fpdf2 (v2.5.7), the following Python code display a clover icon using the Segoe UI Symbol font:

from fpdf import FPDF

pdf = FPDF()
pdf.add_font('SegoeUISymbol', '', 'fonts/Segoe-UI-Symbol.ttf')
pdf.set_font('SegoeUISymbol', size=60)
pdf.add_page()
pdf.text(50, 50, "")
pdf.output("so_72598878.pdf")
Lucas Cimon
  • 1,859
  • 2
  • 24
  • 33