Validate missing SVG fonts
johndoe31415 opened this issue · 0 comments
Inkscape does a terrible job at validating which fonts are present. They only ever give an error message on the command line that indicates a font wasn't present (and has been substituted) if a specific dialog option is set (Edit -> Preferences -> Text -> Show font substitution warning dialog). Even if this is set (which changes behavior for the user, who may disable it again), if batch mode is used and just the "Quit" verb is called, the warning is not shown. This is horrible.
We do need to validate that fonts are present, otherwise SVGs will be rendered with silently substituted fonts and the presentation may look terrible.
The best option is to parse the SVGs manually, then run "fc-list" on the font-family. Issue an error by default ("MissingFontException") but add a command line option to still allow rendering ("--ignore-missing-fonts") if the user really wants it.