tiennm99 177c4b9a33 fix: embed font data instead of a path, and bundle a fallback font
PDF rendering failed on Linux with "stat usr/share/fonts/...: no such file or
directory": fpdf joins the font path onto its own font directory, which it
defaults to ".", so path.Join turns an absolute path into a
working-directory-relative one. It only resolved when the process happened to
run from the filesystem root, which is why Windows was unaffected. Font data is
now read by pdfout and handed over as bytes.

LoadFont also falls back to a bundled DejaVu Sans, so a host with no fonts
installed still renders. An explicitly requested font remains a hard error when
unreadable rather than being silently substituted. Tests verify the bundled font
parses and covers Vietnamese, which is the reason it exists.
2026-07-29 23:41:30 +07:00
2025-07-20 18:59:06 +07:00
2020-03-02 14:53:23 +07:00
2025-11-30 20:22:58 +07:00
2024-05-22 21:04:10 +07:00
2025-03-25 19:01:31 +07:00
S
Description
Personal toolbox — utility scripts and small CLI tools (shell/batch, Go, Python, Node.js), merged from standalone repos with full history
16 MiB
0 Stars 1 Watchers 0 Forks
Languages
Go 75%
Python 22.9%
Shell 0.8%
JavaScript 0.7%
Dockerfile 0.4%
Other 0.2%