Commit e2db268
fix: support single font file paths in fonts config
Previously, the fonts config only worked with directories because
load_fonts_dir() was used unconditionally. This caused single font
file paths (e.g., fonts = "/path/to/font.ttf") to be silently ignored.
Now the code checks whether the path is a file or directory and uses
the appropriate fontdb function:
- load_font_file() for single files
- load_fonts_dir() for directories
Also adds a warning message when the specified font path does not exist.1 parent 38e95bb commit e2db268
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
198 | 209 | | |
199 | 210 | | |
200 | 211 | | |
| |||
0 commit comments