Hi all,
I'm currently implementing functionality which allows Inkscape to
use fonts *not* installed on the system [1].
- Suppport for loading fonts from share/inkscape/fonts as well
as the fonts dir in Inkscape's configuration directory is
already added.
- Support for custom locations configurable by the user is
provided, too.
- One task is left: load fonts from the location of the
currently opened SVG document
While the last point could be especially interesting (e.g. it
would allow people to simply distribute fonts required by an SVG
alongside with it) it's also a bit tricky: fontconfig scans
directories recursively. This means if the user were to open an
SVG file somewhere at the top of the directory tree, fontconfig
suddenly would scan *a lot* of directories for fonts.
So I basically want to collect some opinions:
- Do you think this would be acceptable? In that case I'd
probably implement a boolean setting which defaults to false and
explains the risks.
- Could it make sense to rephrase the task a bit to "load fonts
from the 'fonts' directory in the folder of the currently opened
SVG"? It might be an option to offer this functionality while
reducing the risk of indexing a large amount directories,
however discoverability of the feature would be significantly
reduced.
- Should I just skip the last task?
- Other ideas?
Let me know what you think!
Best Regards,
Eduard
[1] https://gitlab.com/inkscape/inkscape/merge_requests/102