Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,11 +22,11 @@ def register_fonts():
|
|
| 22 |
"""Register fonts for different languages"""
|
| 23 |
try:
|
| 24 |
# Using Noto Nastaliq Urdu for Urdu
|
| 25 |
-
pdfmetrics.registerFont(TTFont('NotoNastaliqUrdu',
|
| 26 |
# Using Noto Naskh Arabic for Arabic
|
| 27 |
-
pdfmetrics.registerFont(TTFont('NotoNaskhArabic',
|
| 28 |
# Using Noto Sans for other languages
|
| 29 |
-
pdfmetrics.registerFont(TTFont('NotoSans',
|
| 30 |
except Exception as e:
|
| 31 |
st.warning(f"Font files not found. Default fonts will be used. Error: {str(e)}")
|
| 32 |
|
|
|
|
| 22 |
"""Register fonts for different languages"""
|
| 23 |
try:
|
| 24 |
# Using Noto Nastaliq Urdu for Urdu
|
| 25 |
+
pdfmetrics.registerFont(TTFont('NotoNastaliqUrdu','NafeesNastaleeqXX.ttf'))
|
| 26 |
# Using Noto Naskh Arabic for Arabic
|
| 27 |
+
pdfmetrics.registerFont(TTFont('NotoNaskhArabic','NotoNaskhArabic-Regular.ttf'))
|
| 28 |
# Using Noto Sans for other languages
|
| 29 |
+
pdfmetrics.registerFont(TTFont('NotoSans','NotoSans-Regular.ttf'))
|
| 30 |
except Exception as e:
|
| 31 |
st.warning(f"Font files not found. Default fonts will be used. Error: {str(e)}")
|
| 32 |
|