Many people ask what it would take to add font previews to different static contexts[1]. Previews are much more convenient for users than abstract text descriptions.
Here are the requirements of an automated font preview generator. If such a utility was available publishing font previews would be quite easy. Note that those requirements are different from the ones you want for dynamic previews[2].
A good static previewer:
- would take a variable list of ttf/otf/ttc/pfa/pfc/pcf files as input;
- would generate one small (size) standalone file as output;
- without requiring any other input[3];
- would give a good idea of the unicode coverage of the font files, probably using pangrams for the most interesting unicode blocks or script they include.
- Wikipedia has a pangram list,
- and fontconfig in fedora-devel has a command to detect the script coverage of a font[4],
- …so it's just a matter of hooking one with the other[5];
- would generate vector shapes (probably svgz) so the preview does not degrade on high pixel density displays;
- would work with complex scripts such as indic, which requires using a shaper such as pango;
- would not embed the font files themselves, or be a conversion of the fonts to some other format, as this would result in hairy licensing problems;
- would be reasonably fast and not require insanely big or exotic software dependencies.
If someone is interested in working on this it can probably be a fun little project. If successful it would be used all over the place by all the entities interested in free/open fonts[6].
Notes:
- ↑ Release notes, wiki pages, packagekit info
- ↑ Such as in a font preview application or a dynamic web site.
- ↑ Even if an option to force a specific preview text wouldn't hurt.
- ↑
$ fc-query --format ':lang=%{lang}\n' /usr/share/fonts/gfs-theokritos/GFSTheokritos.otf :lang=eu|fj|gv|ho|ia|id|ie|io|nds|nr|om|so|ss|st|sw|ts|vo|xh|zu
- ↑ Of course, finding the right heuristic is going to be tricky, and pangrams do not work for CJK, and listing the full glyph list of a font is out of the question.
- ↑ Font authors, distributions, font web sites, etc.