mirror of
https://github.com/open-webui/open-webui
synced 2024-11-22 16:22:44 +00:00
enh: better pdf CJK language support
This commit is contained in:
parent
6c8a15fae2
commit
89ba98e927
@ -85,9 +85,10 @@ async def download_chat_as_pdf(
|
||||
pdf.add_font("NotoSans", "i", f"{FONTS_DIR}/NotoSans-Italic.ttf")
|
||||
pdf.add_font("NotoSansKR", "", f"{FONTS_DIR}/NotoSansKR-Regular.ttf")
|
||||
pdf.add_font("NotoSansJP", "", f"{FONTS_DIR}/NotoSansJP-Regular.ttf")
|
||||
pdf.add_font("NotoSansSC", "", f"{FONTS_DIR}/NotoSansSC-Regular.ttf")
|
||||
|
||||
pdf.set_font("NotoSans", size=12)
|
||||
pdf.set_fallback_fonts(["NotoSansKR", "NotoSansJP"])
|
||||
pdf.set_fallback_fonts(["NotoSansKR", "NotoSansJP", "NotoSansSC"])
|
||||
|
||||
pdf.set_auto_page_break(auto=True, margin=15)
|
||||
|
||||
|
BIN
backend/static/fonts/NotoSansSC-Regular.ttf
Normal file
BIN
backend/static/fonts/NotoSansSC-Regular.ttf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user