From f8555b5d8cdb76134175fc3260e06c8805ede867 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 3 Apr 2014 05:45:38 +0200 Subject: [PATCH] Don't require `gzip' module for `sfnt'. Reported by Preet . * src/sfnt/sfobjs.c (woff_open_font): Guard use of FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB. --- ChangeLog | 9 +++++++++ src/sfnt/sfobjs.c | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d903984b8..745718a1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2014-04-03 Werner Lemberg + + Don't require `gzip' module for `sfnt'. + + Reported by Preet . + + * src/sfnt/sfobjs.c (woff_open_font): Guard use of + FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB. + 2014-03-27 Werner Lemberg Fix Savannah bug #38235. diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index a31c77cbe..0b1760cb7 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -4,7 +4,7 @@ /* */ /* SFNT object management (base). */ /* */ -/* Copyright 1996-2008, 2010-2013 by */ +/* Copyright 1996-2008, 2010-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -661,6 +661,8 @@ } else { +#ifdef FT_CONFIG_OPTION_USE_ZLIB + /* Uncompress with zlib. */ FT_ULong output_len = table->OrigLength; @@ -675,6 +677,13 @@ error = FT_THROW( Invalid_Table ); goto Exit; } + +#else /* !FT_CONFIG_OPTION_USE_ZLIB */ + + error = FT_THROW( Unimplemented_Feature ); + goto Exit; + +#endif /* !FT_CONFIG_OPTION_USE_ZLIB */ } FT_FRAME_EXIT();