diff options
author | Grigori Goronzy <greg@chown.ath.cx> | 2015-09-07 10:27:26 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@chown.ath.cx> | 2015-09-07 10:27:26 +0200 |
commit | db8856e6485a5f8bab23869f49477aeb2a227328 (patch) | |
tree | 544d224c805019e5ac56eb1bfecece38c8ad3d29 | |
parent | e020bee2631950815ec7707d5a6f8a348de3a2d7 (diff) | |
download | libass-db8856e6485a5f8bab23869f49477aeb2a227328.tar.bz2 libass-db8856e6485a5f8bab23869f49477aeb2a227328.tar.xz |
fontselect: call match_fonts for each alias
In case a font provider actually uses more than one substitution.
-rw-r--r-- | libass/ass_fontselect.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 0c37bb5..fbdface 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -607,9 +607,12 @@ static char *select_font(ASS_FontSelector *priv, ASS_Library *library, // on demand, and retry the search for a match. if (result == NULL && name_match == false && default_provider && default_provider->funcs.match_fonts) { - // FIXME: what if substitution adds more than one alias? - default_provider->funcs.match_fonts(library, default_provider, - meta.fullnames[0]); + // TODO: consider changing the API to make more efficient + // implementations possible. + for (int i = 0; i < meta.n_fullname; i++) { + default_provider->funcs.match_fonts(library, default_provider, + meta.fullnames[i]); + } result = find_font(priv, library, meta, bold, italic, index, postscript_name, uid, stream, code, &name_match); } |