Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,16 +23,16 @@ def download_image(image_url):
|
|
| 23 |
class PDF(FPDF):
|
| 24 |
def __init__(self, *args, **kwargs):
|
| 25 |
super().__init__(*args, **kwargs)
|
| 26 |
-
self.add_font('
|
| 27 |
-
self.set_font('/home/user/app/
|
| 28 |
|
| 29 |
def chapter_title(self, num, label):
|
| 30 |
-
self.set_font('/home/user/app/
|
| 31 |
self.cell(0, 10, f"Chapter {num} : {label}", 0, 1, 'C')
|
| 32 |
self.ln(10)
|
| 33 |
|
| 34 |
def chapter_body(self, body, image_url):
|
| 35 |
-
self.set_font('/home/user/app/
|
| 36 |
self.multi_cell(0, 10, body)
|
| 37 |
self.image(image_url, x=10, w=100)
|
| 38 |
self.ln(60)
|
|
|
|
| 23 |
class PDF(FPDF):
|
| 24 |
def __init__(self, *args, **kwargs):
|
| 25 |
super().__init__(*args, **kwargs)
|
| 26 |
+
self.add_font('NanumGothic', '', '/home/user/app/NanumGothic.ttf', uni=True)
|
| 27 |
+
self.set_font('/home/user/app/NanumGothic.ttf', '', 12)
|
| 28 |
|
| 29 |
def chapter_title(self, num, label):
|
| 30 |
+
self.set_font('/home/user/app/NanumGothic.ttf', '', 15)
|
| 31 |
self.cell(0, 10, f"Chapter {num} : {label}", 0, 1, 'C')
|
| 32 |
self.ln(10)
|
| 33 |
|
| 34 |
def chapter_body(self, body, image_url):
|
| 35 |
+
self.set_font('/home/user/app/NanumGothic.ttf', '', 12)
|
| 36 |
self.multi_cell(0, 10, body)
|
| 37 |
self.image(image_url, x=10, w=100)
|
| 38 |
self.ln(60)
|