]> granicus.if.org Git - libass/commitdiff
Fix similarity calculations
authorGrigori Goronzy <greg@chown.ath.cx>
Thu, 18 Aug 2011 22:40:40 +0000 (00:40 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Fri, 10 Jul 2015 08:42:40 +0000 (10:42 +0200)
libass/ass_fontselect.c

index 84e7a73b42b43a31148c465f4742642c433c4383..176d0c1949ea7d0f3acdf1955ebd0258084a4578 100644 (file)
@@ -260,12 +260,12 @@ static unsigned font_info_similarity(ASS_FontInfo *a, ASS_FontInfo *req)
 
     // compare shortened family, if no fullname matches
     if (similarity > 0 && strcasecmp(a->family, req->family) == 0)
-        similarity = 1000;
+        similarity = 2000;
 
     // nothing found? Try fallback fonts
     while (similarity > 2000 && *fallback)
         if (strcmp(a->family, *fallback++) == 0)
-            similarity = 2000;
+            similarity = 5000;
 
     // compare slant
     similarity += ABS(a->slant - req->slant);