* include/freetype/ftmodapi.h, include/internal/ftserv.h,
include/internal/services/svtteng.h, src/base/ftobjs.c, src/truetype/ttdriver.c: adding a new API named FT_Get_TrueType_Engine_Type to determine wether we have a patented, unpatented or unimplemented TrueType bytecode interpreter. the FT_Get_Module_Flags API was removed consequently.
This commit is contained in:
parent
44c865dfe1
commit
0b5dc4df88
12
ChangeLog
12
ChangeLog
|
@ -1,5 +1,15 @@
|
||||||
2006-02-21 David Turner <david@freetype.org>
|
2006-02-21 David Turner <david@freetype.org>
|
||||||
|
|
||||||
|
* include/freetype/ftmodapi.h, include/internal/ftserv.h,
|
||||||
|
include/internal/services/svtteng.h, src/base/ftobjs.c,
|
||||||
|
src/truetype/ttdriver.c:
|
||||||
|
|
||||||
|
adding a new API named FT_Get_TrueType_Engine_Type to determine
|
||||||
|
wether we have a patented, unpatented or unimplemented TrueType
|
||||||
|
bytecode interpreter.
|
||||||
|
|
||||||
|
the FT_Get_Module_Flags API was removed consequently.
|
||||||
|
|
||||||
* src/sfnt/sfobjs.c (sfnt_face_load): fixed silly bug that
|
* src/sfnt/sfobjs.c (sfnt_face_load): fixed silly bug that
|
||||||
prevented embedded bitmaps from being correctly listed and used
|
prevented embedded bitmaps from being correctly listed and used
|
||||||
|
|
||||||
|
@ -11,7 +21,7 @@
|
||||||
|
|
||||||
2006-02-20 David Turner <david@freetype.org>
|
2006-02-20 David Turner <david@freetype.org>
|
||||||
|
|
||||||
Support binary compatibility with the X.Org server's Xfont library.
|
Support binary compatibility with the X.Org server's Xfont library.
|
||||||
Note that this change unfortunately prevents memory optimizations
|
Note that this change unfortunately prevents memory optimizations
|
||||||
for the embedded bitmap loader.
|
for the embedded bitmap loader.
|
||||||
|
|
||||||
|
|
|
@ -448,7 +448,7 @@ FT_BEGIN_HEADER
|
||||||
/* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */
|
/* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */
|
||||||
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated. */
|
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated. */
|
||||||
/* */
|
/* */
|
||||||
#define TT_CONFIG_OPTION_UNPATENTED_HINTING
|
#define xxTT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
|
@ -84,7 +84,7 @@ FT_BEGIN_HEADER
|
||||||
typedef void
|
typedef void
|
||||||
(*FT_Module_Destructor)( FT_Module module );
|
(*FT_Module_Destructor)( FT_Module module );
|
||||||
|
|
||||||
typedef FT_Module_Interface
|
typedef FT_Module_Interface
|
||||||
(*FT_Module_Requester)( FT_Module module,
|
(*FT_Module_Requester)( FT_Module module,
|
||||||
const char* name );
|
const char* name );
|
||||||
|
|
||||||
|
@ -213,28 +213,6 @@ FT_BEGIN_HEADER
|
||||||
FT_Module module );
|
FT_Module module );
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
|
||||||
/* */
|
|
||||||
/* <Function> */
|
|
||||||
/* FT_Module_Get_Flags */
|
|
||||||
/* */
|
|
||||||
/* <Description> */
|
|
||||||
/* Gets the module flags for a given module. */
|
|
||||||
/* */
|
|
||||||
/* <Input> */
|
|
||||||
/* module :: A handle to a module object. */
|
|
||||||
/* */
|
|
||||||
/* <Output> */
|
|
||||||
/* flags :: The module's flags. */
|
|
||||||
/* */
|
|
||||||
/* <Return> */
|
|
||||||
/* FreeType error code. 0 means success. */
|
|
||||||
/* */
|
|
||||||
FT_EXPORT( FT_Error )
|
|
||||||
FT_Module_Get_Flags( FT_Module module,
|
|
||||||
FT_ULong* flags );
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Function> */
|
/* <Function> */
|
||||||
|
@ -329,6 +307,61 @@ FT_BEGIN_HEADER
|
||||||
FT_Add_Default_Modules( FT_Library library );
|
FT_Add_Default_Modules( FT_Library library );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum: FT_TrueTypeEngineType
|
||||||
|
*
|
||||||
|
* @description:
|
||||||
|
* a list of values describing which kind of truetype bytecode
|
||||||
|
* engine is implemented in a given FT_Library instance. It is used
|
||||||
|
* by the @FT_Get_TrueType_Engine_Type function
|
||||||
|
*
|
||||||
|
* @values:
|
||||||
|
* FT_TRUETYPE_ENGINE_TYPE_NONE ::
|
||||||
|
* the library doesn't implement any kind of bytecode interpreter
|
||||||
|
*
|
||||||
|
* FT_TRUETYPE_ENGINE_TYPE_UNPATENTED ::
|
||||||
|
* the library implements a bytecode interpreter that doesn't
|
||||||
|
* support the patented operations of the TrueType virtual machine.
|
||||||
|
*
|
||||||
|
* this interpreter can only be used to load certain Asian fonts
|
||||||
|
* from Dynalabs. It will produce crap output for any other font.
|
||||||
|
* see @
|
||||||
|
*
|
||||||
|
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
|
||||||
|
* the library implements a bytecode interpreter that covers
|
||||||
|
* the full instruction set of the TrueType virtual machine.
|
||||||
|
* Better check your legal department for license compliance !!
|
||||||
|
*
|
||||||
|
* @since: 2.2
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FT_TRUETYPE_ENGINE_TYPE_NONE = 0,
|
||||||
|
FT_TRUETYPE_ENGINE_TYPE_UNPATENTED,
|
||||||
|
FT_TRUETYPE_ENGINE_TYPE_PATENTED
|
||||||
|
|
||||||
|
} FT_TrueTypeEngineType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @func: FT_Get_TrueType_Engine_Type
|
||||||
|
*
|
||||||
|
* @description:
|
||||||
|
* this function returns a @FT_TrueTypeEngineType value to indicates
|
||||||
|
* which level of the TrueType virtual machine a given library instance
|
||||||
|
* supports.
|
||||||
|
*
|
||||||
|
* @input:
|
||||||
|
* library :: a library instance
|
||||||
|
*
|
||||||
|
* @return:
|
||||||
|
* a value indicating which level is supported
|
||||||
|
*
|
||||||
|
* @since: 2.2
|
||||||
|
*/
|
||||||
|
FT_EXPORT( FT_TrueTypeEngineType )
|
||||||
|
FT_Get_TrueType_Engine_Type( FT_Library library );
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -314,6 +314,7 @@ FT_BEGIN_HEADER
|
||||||
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
|
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
|
||||||
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
|
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
|
||||||
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
|
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
|
||||||
|
#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
|
@ -63,14 +63,14 @@ FT_BEGIN_HEADER
|
||||||
|
|
||||||
FT_DEFINE_SERVICE( SFNT_Table )
|
FT_DEFINE_SERVICE( SFNT_Table )
|
||||||
{
|
{
|
||||||
FT_SFNT_TableLoadFunc load_table;
|
FT_SFNT_TableLoadFunc load_table;
|
||||||
FT_SFNT_TableGetFunc get_table;
|
FT_SFNT_TableGetFunc get_table;
|
||||||
FT_SFNT_TableInfoFunc table_info;
|
FT_SFNT_TableInfoFunc table_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include FT_SERVICE_GLYPH_DICT_H
|
#include FT_SERVICE_GLYPH_DICT_H
|
||||||
#include FT_SERVICE_TT_CMAP_H
|
#include FT_SERVICE_TT_CMAP_H
|
||||||
#include FT_SERVICE_KERNING_H
|
#include FT_SERVICE_KERNING_H
|
||||||
|
#include FT_SERVICE_TRUETYPE_ENGINE_H
|
||||||
|
|
||||||
|
|
||||||
FT_BASE_DEF( FT_Pointer )
|
FT_BASE_DEF( FT_Pointer )
|
||||||
|
@ -3408,23 +3409,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* documentation is in ftmodapi.h */
|
|
||||||
|
|
||||||
FT_EXPORT_DEF( FT_Error )
|
|
||||||
FT_Module_Get_Flags( FT_Module module,
|
|
||||||
FT_ULong* flags )
|
|
||||||
{
|
|
||||||
if ( !module )
|
|
||||||
return FT_Err_Invalid_Driver_Handle;
|
|
||||||
|
|
||||||
if ( !flags )
|
|
||||||
return FT_Err_Invalid_Argument;
|
|
||||||
|
|
||||||
*flags = module->clazz->module_flags;
|
|
||||||
return FT_Err_Ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* documentation is in ftobjs.h */
|
/* documentation is in ftobjs.h */
|
||||||
|
|
||||||
FT_BASE_DEF( const void* )
|
FT_BASE_DEF( const void* )
|
||||||
|
@ -3675,6 +3659,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* documentation is in ftmodapi.h */
|
||||||
|
|
||||||
|
FT_EXPORT_DEF( FT_TrueTypeEngineType )
|
||||||
|
FT_Get_TrueType_Engine_Type( FT_Library library )
|
||||||
|
{
|
||||||
|
FT_TrueTypeEngineType result = FT_TRUETYPE_ENGINE_TYPE_NONE;
|
||||||
|
|
||||||
|
if ( library )
|
||||||
|
{
|
||||||
|
FT_Module module = FT_Get_Module( library, "truetype" );
|
||||||
|
|
||||||
|
if ( module )
|
||||||
|
{
|
||||||
|
FT_Service_TrueTypeEngine service;
|
||||||
|
|
||||||
|
service = ft_module_get_service( module, FT_SERVICE_ID_TRUETYPE_ENGINE );
|
||||||
|
if ( service )
|
||||||
|
result = service->engine_type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||||
|
|
||||||
FT_BASE_DEF( FT_Error )
|
FT_BASE_DEF( FT_Error )
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include FT_SERVICE_MULTIPLE_MASTERS_H
|
#include FT_SERVICE_MULTIPLE_MASTERS_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include FT_SERVICE_TRUETYPE_ENGINE_H
|
||||||
|
|
||||||
#include "ttdriver.h"
|
#include "ttdriver.h"
|
||||||
#include "ttgload.h"
|
#include "ttgload.h"
|
||||||
|
|
||||||
|
@ -290,6 +292,18 @@
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static const FT_Service_TrueTypeEngineRec tt_service_truetype_engine =
|
||||||
|
{
|
||||||
|
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||||
|
# ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||||
|
FT_TRUETYPE_ENGINE_TYPE_UNPATENTED
|
||||||
|
# else
|
||||||
|
FT_TRUETYPE_ENGINE_TYPE_PATENTED
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
FT_TRUETYPE_ENGINE_TYPE_NONE
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
static const FT_ServiceDescRec tt_services[] =
|
static const FT_ServiceDescRec tt_services[] =
|
||||||
{
|
{
|
||||||
|
@ -297,6 +311,7 @@
|
||||||
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
||||||
{ FT_SERVICE_ID_MULTI_MASTERS, &tt_service_gx_multi_masters },
|
{ FT_SERVICE_ID_MULTI_MASTERS, &tt_service_gx_multi_masters },
|
||||||
#endif
|
#endif
|
||||||
|
{ FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue