diff options
Diffstat (limited to 'libXfont/src/FreeType/ftfuncs.c')
-rw-r--r-- | libXfont/src/FreeType/ftfuncs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libXfont/src/FreeType/ftfuncs.c b/libXfont/src/FreeType/ftfuncs.c index a4969d12e..3dd8eb946 100644 --- a/libXfont/src/FreeType/ftfuncs.c +++ b/libXfont/src/FreeType/ftfuncs.c @@ -34,6 +34,7 @@ THE SOFTWARE. #include <string.h> #include <math.h> #include <ctype.h> +#include <unistd.h> #include <X11/fonts/fntfilst.h> #include <X11/fonts/fontutil.h> @@ -130,6 +131,9 @@ sfnt_get_ushort( FT_Face face, #define sfnt_get_short(f,t,o) ((FT_Short)sfnt_get_ushort((f),(t),(o))) +#ifdef _MSC_VER +#define hypot _hypot +#endif static int ftypeInitP = 0; /* is the engine initialised? */ FT_Library ftypeLibrary; @@ -1467,7 +1471,7 @@ FreeTypeRasteriseGlyph(unsigned idx, int flags, CharInfoPtr tgp, current_raster[j]|=current_buffer[jj]>>mod_dx0; j++; prev_jj++; jj++; for( ; j<bpr ; j++,prev_jj++,jj++ ){ - current_raster[j]|=current_buffer[prev_jj]<<mod_dx1; + current_raster[j]|=(current_buffer[prev_jj]<<mod_dx1)&0xff; if( bitmap->pitch <= jj ) break; current_raster[j]|=current_buffer[jj]>>mod_dx0; } |