diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2021-06-17 19:42:25 +0300 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2021-07-10 02:36:31 +0300 |
commit | 887e6cc50bfbe8fc354993682edc03c51203e2fc (patch) | |
tree | 5fccc501b40b24192d2573e88fe240703b7d9d98 /libass/ass_font.c | |
parent | 72c4eaadb42c7692ebdd828b0903a907acad5d16 (diff) | |
download | libass-887e6cc50bfbe8fc354993682edc03c51203e2fc.tar.bz2 libass-887e6cc50bfbe8fc354993682edc03c51203e2fc.tar.xz |
fontselect: automatically read metadata from font file if needed
Diffstat (limited to 'libass/ass_font.c')
-rw-r--r-- | libass/ass_font.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libass/ass_font.c b/libass/ass_font.c index 9dc8772..a7ee576 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -203,8 +203,13 @@ FT_Face ass_face_stream(ASS_Library *lib, FT_Library ftlib, const char *name, FT_Face face; int error = FT_Open_Face(ftlib, &args, index, &face); if (error) { - ass_msg(lib, MSGL_WARN, - "Error opening memory font: '%s'", name); + if (name) { + ass_msg(lib, MSGL_WARN, + "Error opening memory font: '%s'", name); + } else { + ass_msg(lib, MSGL_WARN, + "Error opening memory font"); + } return NULL; } |