Handle installation from downloaded ZIP bundles more effectively
Font Viewer could behave smarter when the user downloads a font package in a zip file that contains multiple items. This includes:
- Handling installation of multiple .ttf / .otf font files in the same zip (possibly in separate folders)
- Installing auxiliary files (e.g., documentation, help, licenses/EULAs, specimens, JS/CSS examples, etc) to an appropriate directory under the user's home folder.
I'm assuming a non-root user, in which case XDG provides ~/.local/share/doc/ as a well-defined destination for the auxiliary files. Personally, I would posit that generating a subdirectory name under that location, from the font-foundry + font-family name, would be the most obvious hierarchy, and not prone to name collisions. Although merely providing that as a prompt and allowing the user to alter it would almost be required. Certainly other approaches are possible.
Here are some examples of .zip downloads containing different folder structures and contents:
- EB Garamond (fairly straightforward): https://bitbucket.org/georgd/eb-garamond/downloads/
- Gentium Plus (same): https://software.sil.org/gentium/download/
- Fira (many styles, lots of documentation in PDFs): https://github.com/mozilla/Fira/releases
- FiraCode (different developer, uses HTML for specimen): https://github.com/tonsky/FiraCode/releases
- XITS (large collection; a Math font): https://fontlibrary.org/en/font/xits-math
- Cardo (lengthy manual): http://scholarsfonts.net/cardofnt.html#DownloadLink
- Amiri (includes docs in two languages): https://github.com/alif-type/amiri/releases/tag/0.111
- InputFont (a free, but closed source, example): http://input.fontbureau.com/download/