]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix the latest fix to Font_IndexForSize
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 Jan 2011 21:49:22 +0000 (21:49 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 Jan 2011 21:49:22 +0000 (21:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10696 d7cf8633-e32d-0410-b094-e92efae38249

ft2.c

diff --git a/ft2.c b/ft2.c
index b6a72513dcc1fee5f4f6e1e37183e4e9dda2be69..782a185f1241b6cc6eba93eadd22aa563ecf1875 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -830,7 +830,7 @@ int Font_IndexForSize(ft2_font_t *font, float _fsize, float *outw, float *outh)
                if (!maps[m])
                        continue;
                // "round up" to the bigger size if two equally-valued matches exist
-               nval = 0.5 * (abs(maps[m]->size - fsize_x) + abs(maps[m]->size - fsize_y));
+               nval = 0.5 * (fabs(maps[m]->size - fsize_x) + fabs(maps[m]->size - fsize_y));
                if (match == -1 || nval < value || (nval == value && matchsize < maps[m]->size))
                {
                        value = nval;