diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-19 16:11:27 +0300 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-21 21:36:48 +0300 |
commit | ab6aef6d0766aa1ce801c5b4ca1441a491681489 (patch) | |
tree | f169840c7c7f5ebc6186d34a5e306acfb65b1bce /libass/ass_fontselect.c | |
parent | f224c97d4566ca7338cfcd621ce3bd8548372791 (diff) | |
download | libass-ab6aef6d0766aa1ce801c5b4ca1441a491681489.tar.bz2 libass-ab6aef6d0766aa1ce801c5b4ca1441a491681489.tar.xz |
fontselect: move PostScript name into ASS_FontProviderMetaData
Diffstat (limited to 'libass/ass_fontselect.c')
-rw-r--r-- | libass/ass_fontselect.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 72d6d0b..d0d282f 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -237,14 +237,13 @@ static void ass_font_provider_free_fontinfo(ASS_FontInfo *info) * \param meta basic metadata of the font * \param path path to the font file, or NULL * \param index face index inside the file (-1 to look up by PostScript name) - * \param psname PostScript name of the face * \param data private data for the font * \return success */ int ass_font_provider_add_font(ASS_FontProvider *provider, ASS_FontProviderMetaData *meta, const char *path, - int index, const char *psname, void *data) + int index, void *data) { int i; int weight, slant, width; @@ -322,15 +321,15 @@ ass_font_provider_add_font(ASS_FontProvider *provider, goto error; } - if (path) { - info->path = strdup(path); - if (info->path == NULL) + if (meta->postscript_name) { + info->postscript_name = strdup(meta->postscript_name); + if (info->postscript_name == NULL) goto error; } - if (psname) { - info->postscript_name = strdup(psname); - if (info->postscript_name == NULL) + if (path) { + info->path = strdup(path); + if (info->path == NULL) goto error; } @@ -881,8 +880,7 @@ static void process_fontdata(ASS_FontProvider *priv, ASS_Library *library, ft->face = face; ft->idx = idx; - if (ass_font_provider_add_font(priv, &info, NULL, face_index, - NULL, ft)) { + if (ass_font_provider_add_font(priv, &info, NULL, face_index, ft)) { ass_msg(library, MSGL_WARN, "Failed to add embedded font '%s'", name); } |