font-preview: If a font provides sample text, show it by default

This commit is contained in:
K. Lange 2021-12-08 16:17:01 +09:00
parent 7619fce256
commit c2f6d699a6

View File

@ -117,6 +117,9 @@ int main(int argc, char * argv[]) {
if (argc > 2) { if (argc > 2) {
preview_string = argv[2]; preview_string = argv[2];
} else {
char * maybe = tt_get_name_string(tt_font, 19);
if (maybe) preview_string = maybe;
} }
struct decor_bounds bounds; struct decor_bounds bounds;