diff options
| author | Manolo Gouy <Manolo> | 2015-04-15 05:46:26 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-04-15 05:46:26 +0000 |
| commit | 0755a81759c595b915f1ead6781d2d95725aa30b (patch) | |
| tree | 50531e1e10f81e1615e610e72f5dd76e2577466c /src | |
| parent | 83cfea0e3a1ab233b08ad480e8ed97ef477e3c74 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_font_mac.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 <config.h> +#include <math.h> /* 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) ); |
