]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - ft2.c
again, a stupid fix for stupid MSVC not supporting a 11 years old C standard
[xonotic/darkplaces.git] / ft2.c
diff --git a/ft2.c b/ft2.c
index 420cc3864155c924c785ece568a69cb359b2743e..1e31dc4fa07054b5a45414d399253b9ad34cbd2c 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -314,7 +314,7 @@ static float Font_VirtualToRealSize(float sz)
 
 static float Font_SnapTo(float val, float snapwidth)
 {
-       return rint(val / snapwidth) * snapwidth;
+       return floor(val / snapwidth + 0.5f) * snapwidth;
 }
 
 static qboolean Font_LoadFile(const char *name, int _face, ft2_font_t *font);