diff options
author | Grigori Goronzy <greg@chown.ath.cx> | 2015-09-01 02:12:19 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@chown.ath.cx> | 2015-09-01 14:34:21 +0200 |
commit | fc49a93e9b74efc399fe7f3b94cce977955b53f9 (patch) | |
tree | 6195fac8822f3c69ee6185e1493f325c2c9a6792 /libass | |
parent | 2a45128601458dd6ec9df90d2825a1ba7a9cc176 (diff) | |
download | libass-fc49a93e9b74efc399fe7f3b94cce977955b53f9.tar.bz2 libass-fc49a93e9b74efc399fe7f3b94cce977955b53f9.tar.xz |
fontselect: stop font selection after first match
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_fontselect.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index c2686bd..955d5f6 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -560,6 +560,11 @@ static char *select_font(ASS_FontSelector *priv, ASS_Library *library, if (score == 0) break; } + + // The list of names is sorted by priority. If we matched anything, + // we can and should stop. + if (selected != NULL) + break; } // found anything? |