summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xforms/colour_chart.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/forms/colour_chart.py b/forms/colour_chart.py
index 30d97d7..efcd7d0 100755
--- a/forms/colour_chart.py
+++ b/forms/colour_chart.py
@@ -44,13 +44,26 @@ class Chart:
def write_pdf(self, fname):
pdf = fpdf.FPDF(format="A5")
+ pdf.add_font(
+ family="FreeSans",
+ fname="/usr/share/fonts/opentype/freefont/FreeSans.otf",
+ )
+ pdf.add_font(
+ family="FreeSans",
+ style="B",
+ fname="/usr/share/fonts/opentype/freefont/FreeSansBold.otf",
+ )
+ pdf.add_font(
+ family="FreeSerif",
+ fname="/usr/share/fonts/opentype/freefont/FreeSerif.otf",
+ )
for p_num, page in enumerate(self.get_arranged_cells()):
pdf.add_page()
- pdf.set_font("helvetica", size=12)
+ pdf.set_font("FreeSerif", size=12)
pdf.cell(64, 8, self.data["title"], align="C")
pdf.ln()
- pdf.set_font("helvetica", "B", 12)
+ pdf.set_font("FreeSans", "B", 12)
for j in range(self.COLUMNS):
pdf.cell(16, 8, str(j + p_num * self.COLUMNS),)
pdf.cell(16, 8, "")