From 0755a81759c595b915f1ead6781d2d95725aa30b Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 15 Apr 2015 05:46:26 +0000 Subject: Replaced incorrect use of abs() with floating point argument by fabs(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10707 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_font_mac.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 49d2fa11a..895eef826 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -17,6 +17,7 @@ // #include +#include /* from fl_utf.c */ extern unsigned fl_utf8toUtf16(const char* src, unsigned srclen, unsigned short* dst, unsigned dstlen); @@ -48,7 +49,7 @@ if (fl_mac_os_version >= Fl_X::CoreText_threshold) { double w; CTFontGetAdvancesForGlyphs(fontref, kCTFontHorizontalOrientation, glyph, advances, 2); w = advances[0].width; - if ( abs(advances[0].width - advances[1].width) < 1E-2 ) {//this is a fixed-width font + if ( fabs(advances[0].width - advances[1].width) < 1E-2 ) {//this is a fixed-width font // slightly rescale fixed-width fonts so the character width has an integral value CFRelease(fontref); CGFloat fsize = size / ( w/floor(w + 0.5) ); -- cgit v1.2.3