# HG changeset patch # User Jason Rumney # Date 1205195781 0 # Node ID fb1da73bc0c485f26dd4b23b03cf9c582fd17e33 # Parent ecb1c0e60608c051e70b1b4962e853680b9430bb (w32font_full_name): Use floor to round. diff -r ecb1c0e60608 -r fb1da73bc0c4 src/w32font.c --- a/src/w32font.c Mon Mar 10 21:15:28 2008 +0000 +++ b/src/w32font.c Tue Mar 11 00:36:21 2008 +0000 @@ -783,8 +783,9 @@ GetTextMetrics (dc, &w32_font->metrics); + w32_font->glyph_idx = ETO_GLYPH_INDEX; + /* Cache ASCII metrics. */ - w32_font->glyph_idx = ETO_GLYPH_INDEX; recompute_cached_metrics (dc, w32_font); SelectObject (dc, old_font); @@ -1717,8 +1718,9 @@ if (outline) { float pointsize = height * 72.0 / one_w32_display_info.resy; - /* Round to nearest half point. */ - pointsize = round (pointsize * 2) / 2; + /* Round to nearest half point. floor is used, since round is not + supported in MS library. */ + pointsize = floor (pointsize * 2 + 0.5) / 2; p += sprintf (p, "-%1.1f", pointsize); } else