]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - ft2.c
fix the latest fix to Font_IndexForSize
[xonotic/darkplaces.git] / 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;