Re: freetype2 problems with cvs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 19, 2003 at 07:47:04PM -0500, Ed Sweetman wrote:
>Not sure if this is the place for bugs, in fact i really think it's 
>xpert@xxxxxxxxxxx so i'll cc it to them too.

>It might have been mentioned already but the cvs head is not up to date 
>with freetype2 2.1.7  Many XFT and freetype related source and header 
>files have #include <freetype/freetype.h> and other assorted headers 
>which is not how you use libfreetype anymore.  You're supposed to 
>#include <ft2build.h> and then use macro includes for the various 
>headers.  The new version of freetype2 also appears to have broken 
>compiling for lib/font/FreeType.  I have no idea why there is a 
>duplication of many headers in Xfree86's source tree and so far changing 
>includes to be what they should be isn't fixing the these errors with 
>expected headers missing and what not. Is nobody else seeing these errors?

Something like the attached patch should take care of most of it.
Let me know if it works.

Amongst some other complications, lib/font/FreeType has at least
one dependence on a header that isn't exported (ttobjs.h), so
building against an external version currently probably won't work
as expected.  Maybe that can be handled differently?

The patch attached should address the other parts of lib/font/FreeType.

David
-- 
David Dawes
developer/release engineer                      The XFree86 Project
www.XFree86.org/~dawes
Index: lib/font/FreeType/Imakefile
===================================================================
RCS file: /home/x-cvs/xc/lib/font/FreeType/Imakefile,v
retrieving revision 1.30
diff -u -r1.30 Imakefile
--- lib/font/FreeType/Imakefile	5 Nov 2003 16:54:28 -0000	1.30
+++ lib/font/FreeType/Imakefile	20 Nov 2003 01:59:13 -0000
@@ -10,10 +10,12 @@
 DEFINES = ServerExtraDefines StrcasecmpDefines Freetype2BuildDefines \
 	  -DXFREE86_FT2
 
+FT2SOURCEDIR = $(TOP)/extras/freetype2/src
 FT2INCS = -I$(FREETYPE2INCDIR) -I$(FREETYPE2INCDIR)/include
 
-INCLUDES = -I. -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \
-           -I$(SERVERSRC)/include $(FT2INCS) -I$(INCLUDESRC)
+INCLUDES = $(FT2INCS) -I. -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \
+           -I$(SERVERSRC)/include -I$(FT2SOURCEDIR)/truetype \
+           -I$(INCLUDESRC)
 
 SRCS = xttcap.c ftfuncs.c ftenc.c fttools.c
 OBJS = xttcap.o ftfuncs.o ftenc.o fttools.o
Index: lib/font/FreeType/ftenc.c
===================================================================
RCS file: /home/x-cvs/xc/lib/font/FreeType/ftenc.c,v
retrieving revision 1.24
diff -u -r1.24 ftenc.c
--- lib/font/FreeType/ftenc.c	19 Oct 2003 18:53:49 -0000	1.24
+++ lib/font/FreeType/ftenc.c	20 Nov 2003 02:01:41 -0000
@@ -35,12 +35,13 @@
 
 #include "fontmisc.h"
 #include "fontenc.h"
-#include "freetype/freetype.h"
-#include "freetype/ttnameid.h"
-#include "freetype/tttables.h"
-#include "freetype/t1tables.h"
-#include "freetype/ftbdf.h"
-#include "freetype/ftxf86.h"
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_IDS_H
+#include FT_TRUETYPE_TABLES_H
+#include FT_TYPE1_TABLES_H
+#include FT_BDF_H
+#include FT_XFREE86_H
 #include "ft.h"
 
 static int find_cmap(int, int, int, FT_Face, FT_CharMap *);
Index: lib/font/FreeType/ftfuncs.c
===================================================================
RCS file: /home/x-cvs/xc/lib/font/FreeType/ftfuncs.c,v
retrieving revision 1.36
diff -u -r1.36 ftfuncs.c
--- lib/font/FreeType/ftfuncs.c	2 Nov 2003 04:30:56 -0000	1.36
+++ lib/font/FreeType/ftfuncs.c	20 Nov 2003 02:01:49 -0000
@@ -42,22 +42,23 @@
 #include "fntfilst.h"
 #include "fontutil.h"
 #include "FSproto.h"
-#include "freetype/freetype.h"
-#include "freetype/ftsizes.h"
-#include "freetype/ttnameid.h"
-#include "freetype/tttables.h"
-#include "freetype/t1tables.h"
-#include "freetype/ftxf86.h"
-#include "freetype/ftbbox.h"
-#include "freetype/internal/tttypes.h"
-#include "extras/freetype2/src/truetype/ttobjs.h"
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_SIZES_H
+#include FT_TRUETYPE_IDS_H
+#include FT_TRUETYPE_TABLES_H
+#include FT_TYPE1_TABLES_H
+#include FT_XFREE86_H
+#include FT_BBOX_H
+#include FT_INTERNAL_TRUETYPE_TYPES_H
+#include "ttobjs.h"
 /*
  *  If you want to use FT_Outline_Get_CBox instead of 
  *  FT_Outline_Get_BBox, define here.
  */
 /* #define USE_GET_CBOX */
 #ifdef USE_GET_CBOX
-#include "freetype/ftoutln.h"
+#include FT_OUTLINE_H
 #endif
 
 #include "fontenc.h"
Index: lib/font/FreeType/fttools.c
===================================================================
RCS file: /home/x-cvs/xc/lib/font/FreeType/fttools.c,v
retrieving revision 1.6
diff -u -r1.6 fttools.c
--- lib/font/FreeType/fttools.c	8 Jun 2003 15:41:13 -0000	1.6
+++ lib/font/FreeType/fttools.c	20 Nov 2003 02:01:55 -0000
@@ -34,9 +34,10 @@
 #endif
 
 #include "font.h"
-#include "freetype/freetype.h"
-#include "freetype/ftsnames.h"
-#include "freetype/ttnameid.h"
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_SFNT_NAMES_H
+#include FT_TRUETYPE_IDS_H
 #include "ft.h"
 
 #ifndef LSBFirst
Index: lib/Xft/Xft.h
===================================================================
RCS file: /home/x-cvs/xc/lib/Xft/Xft.h,v
retrieving revision 1.32
diff -u -r1.32 Xft.h
--- lib/Xft/Xft.h	25 Feb 2003 21:57:53 -0000	1.32
+++ lib/Xft/Xft.h	20 Nov 2003 01:24:05 -0000
@@ -32,7 +32,8 @@
 #define XftVersion	XFT_VERSION
 
 #include <stdarg.h>
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
 #include <fontconfig/fontconfig.h>
 #include <X11/extensions/Xrender.h>
 
Index: lib/Xft/xftglyphs.c
===================================================================
RCS file: /home/x-cvs/xc/lib/Xft/xftglyphs.c,v
retrieving revision 1.23
diff -u -r1.23 xftglyphs.c
--- lib/Xft/xftglyphs.c	11 Oct 2002 17:53:02 -0000	1.23
+++ lib/Xft/xftglyphs.c	20 Nov 2003 01:24:40 -0000
@@ -26,7 +26,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include "xftint.h"
-#include <freetype/ftoutln.h>
+#include <ft2build.h>
+#include FT_OUTLINE_H
 #include <fontconfig/fcfreetype.h>
 
 static const int    filters[3][3] = {
Index: lib/Xft1/XftFreetype.h
===================================================================
RCS file: /home/x-cvs/xc/lib/Xft1/XftFreetype.h,v
retrieving revision 1.3
diff -u -r1.3 XftFreetype.h
--- lib/Xft1/XftFreetype.h	2 Mar 2002 22:09:04 -0000	1.3
+++ lib/Xft1/XftFreetype.h	20 Nov 2003 01:25:11 -0000
@@ -26,7 +26,8 @@
 #define _XFTFREETYPE_H_
 
 #include "Xft.h"
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
 
 #include <X11/Xfuncproto.h>
 #include <X11/Xosdefs.h>
Index: lib/Xft1/xftglyphs.c
===================================================================
RCS file: /home/x-cvs/xc/lib/Xft1/xftglyphs.c,v
retrieving revision 1.3
diff -u -r1.3 xftglyphs.c
--- lib/Xft1/xftglyphs.c	27 May 2003 22:26:41 -0000	1.3
+++ lib/Xft1/xftglyphs.c	20 Nov 2003 01:25:29 -0000
@@ -26,7 +26,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include "xftint.h"
-#include <freetype/ftoutln.h>
+#include <ft2build.h>
+#include FT_OUTLINE_H
 
 static const int    filters[3][3] = {
     /* red */
Index: extras/fontconfig/fontconfig/fcfreetype.h
===================================================================
RCS file: /home/x-cvs/xc/extras/fontconfig/fontconfig/fcfreetype.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fcfreetype.h
--- extras/fontconfig/fontconfig/fcfreetype.h	4 Jun 2003 02:57:42 -0000	1.1.1.1
+++ extras/fontconfig/fontconfig/fcfreetype.h	20 Nov 2003 01:30:07 -0000
@@ -24,7 +24,8 @@
 
 #ifndef _FCFREETYPE_H_
 #define _FCFREETYPE_H_
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
 
 FT_UInt
 FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4);
Index: extras/fontconfig/src/fcfreetype.c
===================================================================
RCS file: /home/x-cvs/xc/extras/fontconfig/src/fcfreetype.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fcfreetype.c
--- extras/fontconfig/src/fcfreetype.c	4 Jun 2003 02:57:52 -0000	1.1.1.1
+++ extras/fontconfig/src/fcfreetype.c	20 Nov 2003 01:32:13 -0000
@@ -26,11 +26,12 @@
 #include <stdio.h>
 #include <string.h>
 #include "fcint.h"
-#include <freetype/freetype.h>
-#include <freetype/internal/ftobjs.h>
-#include <freetype/tttables.h>
-#include <freetype/ftsnames.h>
-#include <freetype/ttnameid.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_INTERNAL_OBJECTS_H
+#include FT_TRUETYPE_TABLES_H
+#include FT_SFNT_NAMES_H
+#include FT_TRUETYPE_IDS_H
 
 /*
  * Keep Han languages separated by eliminating languages

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux