summaryrefslogtreecommitdiff
path: root/Xprint
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-03-31 07:21:41 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-03-31 07:21:41 +0000
commit4c317bbc1259fa555dc5d5278226b21c42845c0c (patch)
treebf5c3d6a0d446964a51788d1d25c2994c8c5e114 /Xprint
parent759033703ce17b20d57756206f48a7ae410a50d1 (diff)
Add full FreeType support for Xprint. (Drew Parsons)
Diffstat (limited to 'Xprint')
-rw-r--r--Xprint/Makefile.am3
-rw-r--r--Xprint/ps/Makefile.am7
-rw-r--r--Xprint/ps/psout_ftpstype3.c41
3 files changed, 14 insertions, 37 deletions
diff --git a/Xprint/Makefile.am b/Xprint/Makefile.am
index a1c636ac2..3d6a7f64c 100644
--- a/Xprint/Makefile.am
+++ b/Xprint/Makefile.am
@@ -11,7 +11,8 @@ Xprt_LDFLAGS = -L$(top_srcdir)
Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \
pcl/libpcl.la pcl-mono/libpcl.la \
../mfb/libmfb.la ../mi/libmi.la \
- ../cfb32/libcfb32.la ../cfb/libcfb.la ../Xext/libXext.la
+ ../cfb32/libcfb32.la ../cfb/libcfb.la ../Xext/libXext.la \
+ @FREETYPE_LIBS@
miinitext-wrapper.c:
echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@
diff --git a/Xprint/ps/Makefile.am b/Xprint/ps/Makefile.am
index 20f82e7b9..ecd7137b4 100644
--- a/Xprint/ps/Makefile.am
+++ b/Xprint/ps/Makefile.am
@@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libps.la
INCLUDES = -I$(top_srcdir)/Xprint -I$(top_srcdir)/cfb -I$(top_srcdir)/mfb
-AM_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
+AM_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ @FREETYPE_CFLAGS@ \
-D_XP_PRINT_SERVER_ -DPSZ=8 -DXP_PSTEXT
libps_la_SOURCES = \
@@ -35,3 +35,8 @@ EXTRA_DIST = PsFTFonts.c \
psout_ftpstype1.c \
psout_ftpstype3.c \
ttf2pt1wrap.c
+
+if XP_USE_FREETYPE
+ AM_CFLAGS += -DXP_USE_FREETYPE
+ libps_la_SOURCES += $(EXTRA_DIST)
+endif
diff --git a/Xprint/ps/psout_ftpstype3.c b/Xprint/ps/psout_ftpstype3.c
index e9782e499..fab8b5cb0 100644
--- a/Xprint/ps/psout_ftpstype3.c
+++ b/Xprint/ps/psout_ftpstype3.c
@@ -55,13 +55,6 @@ THE SOFTWARE.
#include FT_MULTIPLE_MASTERS_H
#include FT_SFNT_NAMES_H
-#define USE_FT_INTERNALS 1
-#ifdef USE_FT_INTERNALS
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include "t42types.h"
-#include FT_INTERNAL_OBJECTS_H
-#endif /* USE_FT_INTERNALS */
-
#include <X11/Xproto.h>
#include <X11/fonts/font.h>
#include <X11/fonts/fontstruct.h>
@@ -287,28 +280,6 @@ FT_Error PSType3_createOutlineGlyphs( FILE *out, struct ft2info *ti, unsigned lo
return 0;
}
-#ifdef USE_FT_INTERNALS
-static FT_BBox *
-FT_Get_PS_Font_BBox( FT_Face face )
-{
- const char *driver_name;
- FT_BBox *font_bbox = NULL;
-
- if ( face && face->driver && face->driver->root.clazz )
- {
- driver_name = face->driver->root.clazz->module_name;
- if ( ft_strcmp( driver_name, "type1" ) == 0 )
- font_bbox = &(((T1_Face)face)->type1.font_bbox);
- else if ( ft_strcmp( driver_name, "t1cid" ) == 0 )
- font_bbox = &(((CID_Face)face)->cid.font_bbox);
- else if ( ft_strcmp( driver_name, "type42" ) == 0 )
- font_bbox = &(((T42_Face)face)->type1.font_bbox);
- }
-
- return font_bbox;
-}
-#endif /* USE_FT_INTERNALS */
-
static
int PSType3_generateOutlineFont(FILE *out, const char *psfontname, struct ft2info *ti, long block_offset)
{
@@ -362,12 +333,12 @@ int PSType3_generateOutlineFont(FILE *out, const char *psfontname, struct ft2inf
}
else
{
- FT_BBox *font_bbox = FT_Get_PS_Font_BBox(ti->ttface);
- fprintf(out, "/FontBBox [%d %d %d %d] def\n",
- (int)font_bbox->xMin,
- (int)font_bbox->yMin,
- (int)font_bbox->xMax,
- (int)font_bbox->yMax);
+ fprintf(out, "/FontBBox [%ld %ld %ld %ld] def\n",
+ ti->ttface->bbox.xMin,
+ ti->ttface->bbox.yMin,
+ ti->ttface->bbox.xMax,
+ ti->ttface->bbox.yMax);
+
}
fprintf(out, "/Encoding [\n");