From f2da6da9055cf4f6156ded1e2a8c0e11a4d080ef Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 10 Sep 2012 20:18:43 +1000 Subject: [PATCH] rename font.c to fontft1.c, since it only does FT1 now --- MANIFEST | 2 +- Makefile.PL | 4 ++-- font.c => fontft1.c | 24 +++++------------------- 3 files changed, 8 insertions(+), 22 deletions(-) rename font.c => fontft1.c (98%) diff --git a/MANIFEST b/MANIFEST index bfc74c90..1db747f8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -50,7 +50,7 @@ Flines/Flines.xs Flines/Makefile.PL Flines/t/t00flines.t flip.im -font.c +fontft1.c fontfiles/dodge.ttf fontfiles/ExistenceTest.ttf generated using pfaedit fontfiles/ImUgly.ttf diff --git a/Makefile.PL b/Makefile.PL index 8513bf3c..aee608cd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -162,7 +162,7 @@ if ($^O eq 'hpux') { $OSLIBS .= ' -ldld'; } if (defined $Config{'d_dlsymun'}) { $OSDEF .= ' -DDLSYMUN'; } my @objs = qw(Imager.o context.o draw.o polygon.o image.o io.o iolayer.o - log.o gaussian.o conv.o pnm.o raw.o feat.o font.o combine.o + log.o gaussian.o conv.o pnm.o raw.o feat.o combine.o filters.o dynaload.o stackmach.o datatypes.o regmach.o trans2.o quant.o error.o convert.o map.o tags.o palimg.o maskimg.o img8.o img16.o rotate.o @@ -546,7 +546,7 @@ sub init { && !-e catfile($_[0], 'fterrors.h') }, libcheck=>sub { $_[0] eq "libttf$aext" or $_[0] eq "libttf.$lext" }, libfiles=>'-lttf', - objfiles=>'', + objfiles=>'fontft1.o', code => \&freetype1_probe, docs=>q{ Truetype fonts are scalable fonts. They can include diff --git a/font.c b/fontft1.c similarity index 98% rename from font.c rename to fontft1.c index a162f70d..7febeede 100644 --- a/font.c +++ b/fontft1.c @@ -8,26 +8,14 @@ #include #include -#ifdef HAVE_LIBT1 -#endif - /* =head1 NAME -font.c - implements font handling functions for t1 and truetype fonts +fontft1.c - Freetype 1.x font driver for Imager =head1 SYNOPSIS - i_init_fonts(); - - #ifdef HAVE_LIBT1 - fontnum = i_t1_new(path_to_pfb, path_to_afm); - i_t1_bbox(fontnum, points, "foo", 3, i_img_dim cords[BOUNDING_BOX_COUNT]); - rc = i_t1_destroy(fontnum); - #endif - - #ifdef HAVE_LIBTT handle = i_tt_new(path_to_ttf); rc = i_tt_bbox(handle, points, "foo", 3, int cords[6], utf8); i_tt_destroy(handle); @@ -36,8 +24,10 @@ font.c - implements font handling functions for t1 and truetype fonts =head1 DESCRIPTION -font.c implements font creation, rendering, bounding box functions and -more for Imager. +fontft1.c implements font creation, rendering, bounding box functions and +more for Imager using Freetype 1.x. + +In general this driver should be ignored in favour of the FT2 driver. =head1 FUNCTION REFERENCE @@ -51,8 +41,6 @@ Some of these functions are internal. /* Truetype font support */ -#ifdef HAVE_LIBTT - /* These are enabled by default when configuring Freetype 1.x I haven't a clue how to reliably detect it at compile time. @@ -1360,8 +1348,6 @@ i_tt_push_error(TT_Error rc) { #endif } -#endif /* HAVE_LIBTT */ - /* =back -- 2.30.2