But we need to show something else when the font doesn't have its own sample text and doesn't support "Latin"/English. E.g. other scripts/languages, but also icon and emoji fonts.
Quick fix: if no "embedded sample text" and no "Basic Latin Unicode Block support" then dump the first 100 characters from the cmap. This will at least show something on the screen.
Better fix: detect script/language, and fetch a corresponding sample text.
Sample text is now:
But we need to show something else when the font doesn't have its own sample text and doesn't support "Latin"/English. E.g. other scripts/languages, but also icon and emoji fonts.
Quick fix:
if no "embedded sample text" and no "Basic Latin Unicode Block support" then dump the first 100 characters from the cmap
. This will at least show something on the screen.Better fix: detect script/language, and fetch a corresponding sample text.
(Also see https://github.com/Wakamai-Fondue/wakamai-fondue-site/issues/103)