diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 25e0747618eb80f2de80195f36311e52173ecc9c..bbcdf0bb66b5c070086f9e59b631ae3d8cfa2abc 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -1344,7 +1344,7 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea)
 
     for (e = 0; e < nErrors; e++)
     {
-        ok(error[e].TabbedTextOutWidth == areaWidth,
+        ok(near_match(error[e].TabbedTextOutWidth, areaWidth),
             "The output text (\"%s\") width should be %d, not %d.\n",
             error[e].extent, areaWidth, error[e].TabbedTextOutWidth);
         /* The width returned by GetTextExtentPoint32() is exactly the same