Opened 20 years ago

Closed 20 years ago

#969 closed defect (fixed)

msGetBitmapFont and gdfont pointers on Windows

Reported by: assefa Owned by: assefa
Priority: high Milestone: 4.4 release
Component: MapServer C Library Version: 4.3
Severity: normal Keywords:
Cc:

Description

This is a problem that affects windows users :

 in msGetBitmapFont (maplabe.c), we use gdfont pointers like gdFontTiny, 
gdFontSmall, ...

 On gd version 2.0.26 and up (and probably few versions back), these pointers
do not work on windows. We need to use predefined functions like gdFontGetTiny
(), gdFontGetSmall() ... (Note that these functions are new and did not exsist 
on older version like gd-2.0.15 that I used for a long time for windows build)

 Need to find a way to set  this up in the makefiles so that we are able to 
determine which version of gd mapserver is using and do the apporiate thing in 
mapserver.

Change History (10)

comment:1 by assefa, 20 years ago

Cc: mapserver-bugs@… added
Owner: changed from sdlime to assefa
Summary: msGetBitmapFont and gdfont pointers on Windows msGetBitmapFont and gdfont pointers on Windows
Assigning it to myself.

comment:2 by sdlime, 20 years ago

Could the code on all platforms just use the functions too? Seems wiser to fix 
things to use the prefered method than sticking with outdate code. My 2 cents...

Steve

comment:3 by dmorissette, 20 years ago

Cc: steve.lime@… added
Milestone: 4.4 release
Agreed that we could/should use those functions on other platforms too. I could
easily detect those functions in the configure script and set a macro to enable
their use. 

What should the macro be called? GD_HAS_GETBITMAPFONT ?

comment:4 by assefa, 20 years ago

I can update the source code and the windows makefiles using #ifdef 
GD_HAS_GETBITMAPFONT . Would that work ?

comment:5 by dmorissette, 20 years ago

Works for me. And i'll do the configure changes after.

comment:6 by sdlime, 20 years ago

At what GD version did those functions appear? We need a fairly recent version 
of GD anyway.

Steve

comment:7 by assefa, 20 years ago

The change was intrduced in GD 2.0.22.

comment:8 by assefa, 20 years ago

I have modified maplable.c (r1.72) and windows nmake.opt. Test on windows with
gd-2.0.26

comment:9 by dmorissette, 20 years ago

Status: newassigned
I'll update the configure script and Unix makefiles now.

comment:10 by dmorissette, 20 years ago

Resolution: fixed
Status: assignedclosed
Fixed in 4.3 CVS. Updated configure with a test to detect gdFontGetTiny and set
-DGD_HAS_GETBITMAPFONTS in the compile flags if necessary.
Note: See TracTickets for help on using tickets.