Index: include/freetype/config/ftoption.h =================================================================== --- include/freetype/config/ftoption.h (revision 7) +++ include/freetype/config/ftoption.h (working copy) @@ -775,6 +775,15 @@ /* + * Define to disable the use of file stream functions and types, FILE, fopen() etc. Enables the use of + * smaller system libraries on embedded systems that have multiple system libraries, some with or without + * file stream support, in the cases where file stream support is not necessary such as memory loading + * of font files. + */ +/* #define FT_CONFIG_DISABLE_STREAM_SUPPORT */ + + + /* * This macro is defined if either unpatented or native TrueType * hinting is requested by the definitions above. */ Index: src/base/ftsystem.c =================================================================== --- src/base/ftsystem.c (revision 7) +++ src/base/ftsystem.c (working copy) @@ -137,7 +137,7 @@ /* */ /*************************************************************************/ - +#if !defined(FT_CONFIG_DISABLE_STREAM_SUPPORT) /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ @@ -266,8 +266,8 @@ return FT_Err_Ok; } +#endif // #if !defined(FT_CONFIG_DISABLE_STREAM_SUPPORT) - #ifdef FT_DEBUG_MEMORY extern FT_Int Index: src/base/ftobjs.c =================================================================== --- src/base/ftobjs.c (revision 7) +++ src/base/ftobjs.c (working copy) @@ -155,6 +155,7 @@ (const FT_Byte*)args->memory_base, args->memory_size ); } +#if !defined(FT_CONFIG_DISABLE_STREAM_SUPPORT) else if ( args->flags & FT_OPEN_PATHNAME ) { /* create a normal system stream */ @@ -170,6 +171,7 @@ FT_FREE( stream ); stream = args->stream; } +#endif else error = FT_Err_Invalid_Argument; Index: devel/ftoption.h =================================================================== --- devel/ftoption.h (revision 7) +++ devel/ftoption.h (working copy) @@ -775,6 +775,15 @@ /* + * Define to disable the use of file stream functions and types, FILE, fopen() etc. Enables the use of + * smaller system libraries on embedded systems that have multiple system libraries, some with or without + * file stream support, in the cases where file stream support is not necessary such as memory loading + * of font files. + */ +/* #define FT_CONFIG_DISABLE_STREAM_SUPPORT */ + + + /* * This macro is defined if either unpatented or native TrueType * hinting is requested by the definitions above. */