Spaces:
Paused
Paused
Commit History
-
feat: derive PDF fonts from a 46-language registry
The PDF exporter used a hardcoded 8-language font map keyed mostly by FLORES-200 codes, falling back to Latin-only NotoSans for anything else. Two consequences: - 15 of the 46 offered languages had no usable font and rendered as empty boxes (Arabic, Hebrew, Thai, Bengali, Gujarati, Gurmukhi, Korean and the Indic set). - The map had "tel_Telu" but not the bare "te". The frontend sends the short code as src_lang and the FLORES code as tgt_lang, so exported PDFs rendered the translation correctly while the source transcript came out blank for every Indic language. Both now resolve through languages.py, which maps language -> script -> font, so adding a language is a single row. The Dockerfile fetches one face per script (15) and the build fails if any is missing, rather than degrading silently at runtime. Text shaping was keyed off `!= "en"`, enabling it for CJK and Latin where it does nothing; it now follows the script. LANGUAGE_PROMPTS is deliberately not taken from the re…157d9bc