[GRASS5] 5.7: making Freetype optional
glynn at gclements.plus.com
glynn at gclements.plus.com
Wed Nov 10 09:18:52 EST 2004
Markus Neteler wrote:
> Making Freetype support optional:
> ... to do so, should I add tons of
>
> #include "config.h"
>
> #ifdef HAVE_FT2BUILD_H
> ...
> #endif
>
> statements into the following files?
>
> cvsgrass57/display/drivers/lib
> command.c
> font_freetype.c
> Font_get.c
> Get_t_box.c
> Text.c
>
> cvsgrass57/lib/raster
> Font.c
>
> Would appreciate a recommendation how to proceed.
display/drivers/lib/Text3.c appears to be the only file which depends
directly upon FreeType. Of the functions in that file:
+ The body of drawMain() should be conditionalised upon
HAVE_FT2BUILD_H, so that the function itself is a no-op if FreeType
isn't available.
+ Other functions which require FreeType should be conditionalised
upon HAVE_FT2BUILD_H, so that the function doesn't exist if FreeType
isn't available.
+ Functions which don't need to be exported (AFAICT, everything except
soft_text_freetype(), soft_text_ext_freetype() and get_text_ext_freetype())
should be declared "static".
The drivers and raster library will support the FONT_FREETYPE and
FONT_FREETYPE_RELEASE operations regardless of whether FreeType was
enabled, except that those operations won't actually work.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list