aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/FreeType
diff options
context:
space:
mode:
Diffstat (limited to 'libXfont/src/FreeType')
-rw-r--r--libXfont/src/FreeType/ftenc.c2
-rw-r--r--libXfont/src/FreeType/ftfuncs.c6
-rw-r--r--libXfont/src/FreeType/fttools.c7
-rw-r--r--libXfont/src/FreeType/makefile15
4 files changed, 28 insertions, 2 deletions
diff --git a/libXfont/src/FreeType/ftenc.c b/libXfont/src/FreeType/ftenc.c
index 9e31d7529..08e206c2a 100644
--- a/libXfont/src/FreeType/ftenc.c
+++ b/libXfont/src/FreeType/ftenc.c
@@ -31,7 +31,7 @@ THE SOFTWARE.
#include <X11/fonts/fontmisc.h>
#include <X11/fonts/fontenc.h>
-#include <ft2build.h>
+#include <config/ftheader.h>
#include FT_FREETYPE_H
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TABLES_H
diff --git a/libXfont/src/FreeType/ftfuncs.c b/libXfont/src/FreeType/ftfuncs.c
index 918e3f37e..95873fa07 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;
@@ -1465,7 +1469,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;
}
diff --git a/libXfont/src/FreeType/fttools.c b/libXfont/src/FreeType/fttools.c
index bc75b7e4f..a0e34d021 100644
--- a/libXfont/src/FreeType/fttools.c
+++ b/libXfont/src/FreeType/fttools.c
@@ -40,6 +40,13 @@
#define MSBFirst 1
#endif
+#ifdef LOBYTE
+#undef LOBYTE
+#endif
+#ifdef HIBYTE
+#undef HIBYTE
+#endif
+
#define LOBYTE(s,byte) ((byte)==LSBFirst?*(char*)(s):*((char*)(s)+1))
#define HIBYTE(s,byte) ((byte)==LSBFirst?*((char*)(s)+1):*(char*)(s))
diff --git a/libXfont/src/FreeType/makefile b/libXfont/src/FreeType/makefile
new file mode 100644
index 000000000..8d4fee2b6
--- /dev/null
+++ b/libXfont/src/FreeType/makefile
@@ -0,0 +1,15 @@
+LIBRARY = libft
+
+CSRCS = \
+ ftenc.c \
+ ftfuncs.c \
+ fttools.c \
+ xttcap.c
+
+INCLUDES += $(MHMAKECONF)\freetype\include\freetype $(MHMAKECONF)\freetype\include
+
+DEFINES += strcasecmp=_stricmp
+
+INCLUDES := ../.. $(INCLUDES)
+
+