Permalink
Browse files

- the Win32 font driver now uses DEFAULT_CHARSET rather than

          ANSI_CHARSET are the lfCharSet value for the LOGFONT,
          as suggested by Takumi Yamani.
        - fontfiles/ExistenceTest.{pfb,ttf} weren't marked as
          binary in the CVS repository (caused test failures if you
          built from CVS on Win32)
        - Makefile.PL should now handle INCLUDE or LIB with spaces in them
          correctly on Win32.
  • Loading branch information...
Tony Cook
Tony Cook committed Aug 8, 2004
1 parent 0ab9043 commit ea9e6c3f3c5a1474664d5407701cf736fcb39a09
Showing with 37 additions and 18 deletions.
  1. +8 −0 Changes
  2. +8 −14 Imager.xs
  3. +4 −3 Makefile.PL
  4. +15 −0 TODO
  5. +1 −0 freetyp2.c
  6. +1 −1 win32.c
View
@@ -767,6 +767,14 @@ Revision history for Perl extension Imager.
- moved some variable definitions to the right place
- the Win32 font driver bounding box function now returns the
right number of values (both thanks to Takumi Yamani)
+ - the Win32 font driver now uses DEFAULT_CHARSET rather than
+ ANSI_CHARSET are the lfCharSet value for the LOGFONT,
+ as suggested by Takumi Yamani.
+ - fontfiles/ExistenceTest.{pfb,ttf} weren't marked as
+ binary in the CVS repository (caused test failures if you
+ built from CVS on Win32)
+ - Makefile.PL should now handle INCLUDE or LIB with spaces in them
+ correctly on Win32.
=================================================================
View
@@ -412,7 +412,6 @@ static ssize_t io_reader(void *p, void *data, size_t size) {
struct cbdata *cbd = p;
ssize_t total;
char *out = data; /* so we can do pointer arithmetic */
- int i;
if (cbd->writing) {
if (write_flush(cbd) <= 0)
@@ -1085,7 +1084,6 @@ io_new_buffer(data)
char *data
PREINIT:
size_t length;
- SV* sv;
CODE:
SvPV(ST(0), length);
SvREFCNT_inc(ST(0));
@@ -1564,7 +1562,6 @@ i_convert(im, src, coeff)
int inchan;
AV *avmain;
SV **temp;
- SV *svsub;
AV *avsub;
int len;
int i, j;
@@ -2746,8 +2743,6 @@ i_writetga_wiol(im,ig, wierdpack, compress, idstring)
int compress
char* idstring
PREINIT:
- SV* sv1;
- int rc;
int idlen;
CODE:
idlen = SvCUR(ST(4));
@@ -2770,8 +2765,6 @@ i_writergb_wiol(im,ig, wierdpack, compress, idstring)
int compress
char* idstring
PREINIT:
- SV* sv1;
- int rc;
int idlen;
CODE:
idlen = SvCUR(ST(4));
@@ -2870,7 +2863,6 @@ i_transform2(sv_width,sv_height,channels,sv_ops,av_n_regs,av_c_regs,av_in_imgs)
PREINIT:
int width;
int height;
- double* parm;
struct rm_op *ops;
STRLEN ops_len;
int ops_count;
@@ -2880,8 +2872,7 @@ i_transform2(sv_width,sv_height,channels,sv_ops,av_n_regs,av_c_regs,av_in_imgs)
int c_regs_count;
int in_imgs_count;
i_img **in_imgs;
- AV* av;
- SV* sv1;
+ SV *sv1;
IV tmp;
int i;
CODE:
@@ -3152,7 +3143,6 @@ i_errors()
i_errmsg *errors;
int i;
AV *av;
- SV *ref;
SV *sv;
PPCODE:
errors = i_errors();
@@ -3292,6 +3282,10 @@ DSO_call(handle,func_index,hv)
# this is mostly for testing...
+# this function results in 'RETVAL' : unreferenced local variable
+# in VC++, and might be subtley wrong
+# the most obvious change may result in a double free so I'm leaving it
+# for now
SV *
i_get_pixel(im, x, y)
Imager::ImgRaw im
@@ -3389,7 +3383,7 @@ i_ppal(im, l, y, ...)
int y
PREINIT:
i_palidx *work;
- int count, i;
+ int i;
CODE:
if (items > 3) {
work = mymalloc(sizeof(i_palidx) * (items-3));
@@ -3618,7 +3612,7 @@ i_plin(im, l, y, ...)
int y
PREINIT:
i_color *work;
- int count, i;
+ int i;
CODE:
if (items > 3) {
work = mymalloc(sizeof(i_color) * (items-3));
@@ -3695,7 +3689,7 @@ i_plinf(im, l, y, ...)
int y
PREINIT:
i_fcolor *work;
- int count, i;
+ int i;
CODE:
if (items > 3) {
work = mymalloc(sizeof(i_fcolor) * (items-3));
View
@@ -1,4 +1,4 @@
-
+#!perl -w
use ExtUtils::MakeMaker;
use Cwd;
use Config;
@@ -50,8 +50,9 @@ for $frm(values %formats) {
$F_OBJECT .= ' ' .$frm->{objfiles};
}
-$F_INC = join(" ",map { (exists $definc{$_})?'':'-I'.$_ } @incs);
-$F_LIBS = join(" ",map { '-L'.$_ } @libs).' '.$F_LIBS;
+$F_INC = join ' ', map "-I$_", map / / ? qq{"$_"} : $_,
+ grep !exists $definc{$_}, @incs;
+$F_LIBS = join(' ',map "-L$_", map / / ? qq{"$_"} : $_, @libs) . $F_LIBS;
$OSLIBS = '';
$OSDEF = "-DOS_$^O";
View
15 TODO
@@ -112,6 +112,8 @@ New Features:
the things I expect Imager to be used for.
- http://www.develop-help.com/imager/strokes.png (.jpg for smaller version)
+- have Imager::Color{::Float}? use Graphics::ColorNames if present.
+
Clean up:
- Make sure everything is doable with the OO interface
i_flood_fill() for example.
@@ -172,3 +174,16 @@ Documentation:
- see the IRC log in design/doclayout.txt
- method index?
- concept index?
+
+Build/configure:
+- use prompt() (from ExtUtils::MakeMaker) for questions in Makefile.PL
+- use the library's mechanism's to find the library if needed, for
+ example, freetype-config for FT2
+- the freetype2 library is built as "freetype.lib" on Win32 and needs
+ to be renamed to be found by the configuration process and included
+ with -lfreetype. Try to work around that.
+- freetype2 and freetype1 tend to be installed in /usr/include/freetype2
+ and /usr/include/freetype directories, or similarly named (somedir/freetype
+ for example), instead of putting these directly into the search path
+ search for the freetype{2}?/someheader and then add the subdirectory if
+ we find the file in that directory.
View
@@ -127,6 +127,7 @@ i_ft2_new(char *name, int index) {
if (error) {
ft2_push_message(error);
i_push_error(error, "Opening face");
+ mm_log((2, "error opening face '%s': %d\n", name, error));
return NULL;
}
View
@@ -223,7 +223,7 @@ static void set_logfont(char *face, int size, LOGFONT *lf) {
memset(lf, 0, sizeof(LOGFONT));
lf->lfHeight = -size; /* character height rather than cell height */
- lf->lfCharSet = ANSI_CHARSET;
+ lf->lfCharSet = DEFAULT_CHARSET;
lf->lfOutPrecision = OUT_TT_PRECIS;
lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf->lfQuality = PROOF_QUALITY;

0 comments on commit ea9e6c3

Please sign in to comment.