parent
754d558893
commit
104dd41d96
18 changed files with 623 additions and 354 deletions
@ -1,140 +1,205 @@ |
||||
#ifndef __FT_SERVICE_H__ |
||||
#define __FT_SERVICE_H__ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* ftserv.h */ |
||||
/* */ |
||||
/* The FreeType services (specification only). */ |
||||
/* */ |
||||
/* Copyright 2003 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
/*************************************************************************/ |
||||
/* */ |
||||
/* Each module can export one or more `services'. Each service is */ |
||||
/* identified by a constant string and modeled by a pointer; the latter */ |
||||
/* generally corresponds to a structure containing function pointers. */ |
||||
/* */ |
||||
/* Note that a service's data cannot be a mere function pointer because */ |
||||
/* in C it is possible that function pointers might are implemented */ |
||||
/* differently from data pointers (e.g. 48 bits instead of 32). */ |
||||
/* */ |
||||
/*************************************************************************/ |
||||
|
||||
|
||||
#ifndef __FTSERV_H__ |
||||
#define __FTSERV_H__ |
||||
|
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
|
||||
/*
|
||||
* each module can export one or more 'services'. Each service is |
||||
* identified by a constant string, and modeled by a pointer, which |
||||
* generally corresponds to a structure containing function pointers. |
||||
* @macro: |
||||
* FT_FACE_FIND_SERVICE |
||||
* |
||||
* note that a service's data cannot be a mere function |
||||
* pointer. that's because in C, function pointers might be implemented |
||||
* differently than data pointers (e.g. 48 bits instead of 32) |
||||
*/ |
||||
|
||||
/* this macro is used to lookup a service from a face's driver module
|
||||
* @description: |
||||
* This macro is used to lookup a service from a face's driver module. |
||||
* |
||||
* ptr :: variable that receives the service pointer. will be NULL |
||||
* if not found |
||||
* @input: |
||||
* id :: |
||||
* A string describing the service as defined in the service's |
||||
* header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to |
||||
* `multi-masters'). |
||||
* |
||||
* id :: a string describing the service. the list of valid service |
||||
* identifiers is below |
||||
* face :: |
||||
* The source face handle. |
||||
* |
||||
* face :: the source face handle |
||||
* @output: |
||||
* ptr :: |
||||
* A variable that receives the service pointer. Will be NULL |
||||
* if not found. |
||||
*/ |
||||
#define FT_FACE_FIND_SERVICE(ptr,face,id) \ |
||||
FT_BEGIN_STMNT \
|
||||
FT_Module module = FT_MODULE(FT_FACE(face)->driver); \
|
||||
\
|
||||
(ptr) = NULL; \
|
||||
if ( module->clazz->get_interface ) \
|
||||
(ptr) = module->clazz->get_interface( module, id ); \
|
||||
FT_END_STMNT |
||||
|
||||
|
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
/***** *****/ |
||||
/***** S E R V I C E D E S C R I P T O R S *****/ |
||||
/***** *****/ |
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
#define FT_FACE_FIND_SERVICE( ptr, face, id ) \ |
||||
FT_BEGIN_STMNT \
|
||||
FT_Module module = FT_MODULE( FT_FACE(face)->driver ); \
|
||||
\
|
||||
\
|
||||
(ptr) = NULL; \
|
||||
if ( module->clazz->get_interface ) \
|
||||
(ptr) = module->clazz->get_interface( module, id ); \
|
||||
FT_END_STMNT |
||||
|
||||
|
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
/***** *****/ |
||||
/***** S E R V I C E D E S C R I P T O R S *****/ |
||||
/***** *****/ |
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
|
||||
/* the following structure is used to _describe_ a given service
|
||||
* to the library. this is useful to build simple static service lists.. |
||||
*/
|
||||
typedef struct FT_ServiceDescRec_ |
||||
/*
|
||||
* The following structure is used to _describe_ a given service |
||||
* to the library. This is useful to build simple static service lists. |
||||
*/
|
||||
typedef struct FT_ServiceDescRec_ |
||||
{ |
||||
const char* serv_id; /* service name */ |
||||
const void* serv_data; /* service pointer/data */ |
||||
|
||||
} FT_ServiceDescRec; |
||||
|
||||
typedef const FT_ServiceDescRec* FT_ServiceDesc; |
||||
typedef const FT_ServiceDescRec* FT_ServiceDesc; |
||||
|
||||
|
||||
/* parse a list of FT_ServiceDescRec descriptors and look for
|
||||
* a specific service by id. Note that the last element in the |
||||
* array must be { NULL, NULL }, and that the function should |
||||
* return NULL if the service isn't available |
||||
* |
||||
* this function can be used by modules to implement their "get_service" |
||||
* method |
||||
*/ |
||||
/*
|
||||
* Parse a list of FT_ServiceDescRec descriptors and look for |
||||
* a specific service by ID. Note that the last element in the |
||||
* array must be { NULL, NULL }, and that the function should |
||||
* return NULL if the service isn't available. |
||||
* |
||||
* This function can be used by modules to implement their |
||||
* `get_service' method. |
||||
*/ |
||||
FT_BASE( FT_Pointer ) |
||||
ft_service_list_lookup( FT_ServiceDesc service_descriptors, |
||||
const char* service_id ); |
||||
|
||||
|
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
/***** *****/ |
||||
/***** S E R V I C E S C A C H E *****/ |
||||
/***** *****/ |
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
/***** *****/ |
||||
/***** S E R V I C E S C A C H E *****/ |
||||
/***** *****/ |
||||
/*************************************************************************/ |
||||
/*************************************************************************/ |
||||
|
||||
/* this structure is used to store a cache for several often-used
|
||||
* services. It is the type of 'face->internal->services'. You |
||||
* should only use FT_FACE_LOOKUP_SERVICE to access it |
||||
* |
||||
* all fields should have the type FT_Pointer to relax compilation |
||||
* dependencies. We assume the developer isn't completely stupid |
||||
* |
||||
* |
||||
*/ |
||||
typedef struct FT_ServiceCacheRec_ |
||||
/*
|
||||
* This structure is used to store a cache for several frequently used |
||||
* services. It is the type of `face->internal->services'. You |
||||
* should only use FT_FACE_LOOKUP_SERVICE to access it. |
||||
* |
||||
* All fields should have the type FT_Pointer to relax compilation |
||||
* dependencies. We assume the developer isn't completely stupid. |
||||
*/ |
||||
typedef struct FT_ServiceCacheRec_ |
||||
{ |
||||
FT_Pointer postscript_name; |
||||
FT_Pointer multi_masters; |
||||
FT_Pointer glyph_dict; |
||||
FT_Pointer postscript_name; |
||||
FT_Pointer multi_masters; |
||||
FT_Pointer glyph_dict; |
||||
|
||||
} FT_ServiceCacheRec, *FT_ServiceCache; |
||||
|
||||
/* a magic number used within the services cache
|
||||
*/ |
||||
#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */ |
||||
|
||||
/* this macro is used to lookup a service from a face's driver module
|
||||
* using its cache. |
||||
* |
||||
* ptr :: variable receiving the service data. NULL if not available |
||||
* face :: source face handle containing the cache |
||||
* field :: field name in cache |
||||
* id :: service id |
||||
* |
||||
*/ |
||||
#define FT_FACE_LOOKUP_SERVICE(face,ptr,field,id) \ |
||||
FT_BEGIN_STMNT \
|
||||
(ptr) = FT_FACE(face)->internal->services. field ; \
|
||||
if ( (ptr) == FT_SERVICE_UNAVAILABLE ) \
|
||||
(ptr) = NULL; \
|
||||
else if ( (ptr) == NULL ) \
|
||||
{ \
|
||||
FT_FACE_FIND_SERVICE( ptr, face, id ); \
|
||||
\
|
||||
FT_FACE(face)->internal->services. field = \
|
||||
(FT_Pointer)( (ptr) != NULL \
|
||||
? (ptr) \
|
||||
: FT_SERVICE_UNAVAILABLE ); \
|
||||
} \
|
||||
FT_END_STMNT |
||||
|
||||
|
||||
/* A macro used to define new service structure types
|
||||
*/ |
||||
|
||||
#define FT_DEFINE_SERVICE( name ) \ |
||||
typedef struct FT_Service_ ## name ## Rec_ FT_Service_ ## name ## Rec; \
|
||||
typedef struct FT_Service_ ## name ## Rec_ const * FT_Service_ ## name ; \
|
||||
/*
|
||||
* A magic number used within the services cache. |
||||
*/ |
||||
#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */ |
||||
|
||||
|
||||
/*
|
||||
* @macro: |
||||
* FT_FACE_LOOKUP_SERVICE |
||||
* |
||||
* @description: |
||||
* This macro is used to lookup a service from a face's driver module |
||||
* using its cache. |
||||
* |
||||
* @input: |
||||
* face:: |
||||
* The source face handle containing the cache. |
||||
* |
||||
* field :: |
||||
* The field name in the cache. |
||||
* |
||||
* id :: |
||||
* The service ID. |
||||
* |
||||
* @output: |
||||
* ptr :: |
||||
* A variable receiving the service data. NULL if not available. |
||||
*/ |
||||
#define FT_FACE_LOOKUP_SERVICE( face, ptr, field, id ) \ |
||||
FT_BEGIN_STMNT \
|
||||
(ptr) = FT_FACE(face)->internal->services.field ; \
|
||||
if ( (ptr) == FT_SERVICE_UNAVAILABLE ) \
|
||||
(ptr) = NULL; \
|
||||
else if ( (ptr) == NULL ) \
|
||||
{ \
|
||||
FT_FACE_FIND_SERVICE( ptr, face, id ); \
|
||||
\
|
||||
FT_FACE(face)->internal->services.field = \
|
||||
(FT_Pointer)( (ptr) != NULL ? (ptr) \
|
||||
: FT_SERVICE_UNAVAILABLE ); \
|
||||
} \
|
||||
FT_END_STMNT |
||||
|
||||
|
||||
/*
|
||||
* A macro used to define new service structure types. |
||||
*/ |
||||
|
||||
#define FT_DEFINE_SERVICE( name ) \ |
||||
typedef struct FT_Service_ ## name ## Rec_ \
|
||||
FT_Service_ ## name ## Rec ; \
|
||||
typedef struct FT_Service_ ## name ## Rec_ \
|
||||
const * FT_Service_ ## name ; \
|
||||
struct FT_Service_ ## name ## Rec_ |
||||
|
||||
/* */ |
||||
/* */ |
||||
|
||||
/*
|
||||
* The header files containing the services. |
||||
*/ |
||||
|
||||
#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/multmast.h> |
||||
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/postname.h> |
||||
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/glyfdict.h> |
||||
#define FT_SERVICE_BDF_H <freetype/internal/services/bdf.h> |
||||
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/xf86name.h> |
||||
#define FT_SERVICE_SFNT_H <freetype/internal/services/sfnt.h> |
||||
|
||||
#endif /* __FT_SERVICE_H__ */ |
||||
#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h> |
||||
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h> |
||||
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h> |
||||
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h> |
||||
#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h> |
||||
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h> |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __FTSERV_H__ */ |
||||
|
||||
|
||||
/* END */ |
||||
|
@ -1,30 +0,0 @@ |
||||
#ifndef __FT_SERVICE_BDF_H__ |
||||
#define __FT_SERVICE_BDF_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
#define FT_SERVICE_ID_BDF "bdf" |
||||
|
||||
typedef FT_Error (*FT_BDF_GetCharsetIdFunc) |
||||
( FT_Face face, |
||||
const char* *acharset_encoding, |
||||
const char* *acharset_registry ); |
||||
|
||||
typedef FT_Error (*FT_BDF_GetPropertyFunc) |
||||
( FT_Face face, |
||||
const char* prop_name, |
||||
BDF_PropertyRec *aproperty ); |
||||
|
||||
FT_DEFINE_SERVICE( BDF ) |
||||
{ |
||||
FT_BDF_GetCharsetIdFunc get_charset_id; |
||||
FT_BDF_GetPropertyFunc get_property; |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __FT_SERVICE_BDF_H__ */ |
@ -1,36 +0,0 @@ |
||||
#ifndef __FT_SERVICE_GLYPH_DICT_H__ |
||||
#define __FT_SERVICE_GLYPH_DICT_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
/*
|
||||
* a service used to retrieve glyph names, as well as to find the |
||||
* index of a given glyph name in a font. |
||||
* |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" |
||||
|
||||
typedef FT_Error (*FT_GlyphDict_GetNameFunc) |
||||
( FT_Face face, |
||||
FT_UInt glyph_index, |
||||
FT_Pointer buffer, |
||||
FT_UInt buffer_max ); |
||||
|
||||
typedef FT_UInt (*FT_GlyphDict_NameIndexFunc) |
||||
( FT_Face face, |
||||
FT_String* glyph_name ); |
||||
|
||||
FT_DEFINE_SERVICE( GlyphDict ) |
||||
{ |
||||
FT_GlyphDict_GetNameFunc get_name; |
||||
FT_GlyphDict_NameIndexFunc name_index; /* optional */ |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __FT_SERVICE_GLYPH_DICT_H__ */ |
@ -1,37 +0,0 @@ |
||||
#ifndef __FT_SERVICE_MULTIPLE_MASTERS_H__ |
||||
#define __FT_SERVICE_MULTIPLE_MASTERS_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
/*
|
||||
* a service used to manage multiple-masters data in a given face |
||||
* |
||||
* see the related APIs in "ftmm.h" / FT_MULTIPLE_MASTERS_H |
||||
* |
||||
*/ |
||||
|
||||
|
||||
typedef FT_Error |
||||
(*FT_Get_MM_Func)( FT_Face face, |
||||
FT_Multi_Master* master ); |
||||
|
||||
typedef FT_Error |
||||
(*FT_Set_MM_Design_Func)( FT_Face face, |
||||
FT_UInt num_coords, |
||||
FT_Long* coords ); |
||||
|
||||
typedef FT_Error |
||||
(*FT_Set_MM_Blend_Func)( FT_Face face, |
||||
FT_UInt num_coords, |
||||
FT_Long* coords ); |
||||
|
||||
#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters" |
||||
|
||||
FT_DEFINE_SERVICE( MultiMasters ) |
||||
{ |
||||
FT_Get_MM_Func get_mm; |
||||
FT_Set_MM_Design_Func set_mm_design; |
||||
FT_Set_MM_Blend_Func set_mm_blend; |
||||
}; |
||||
|
||||
#endif /* __FT_SERVICE_MULTIPLE_MASTERS_H__ */ |
@ -1,30 +0,0 @@ |
||||
#ifndef __FT_SERVICE_POSTSCRIPT_NAME_H__ |
||||
#define __FT_SERVICE_POSTSCRIPT_NAME_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
/*
|
||||
* a trivial service used to retrieve the Postscript name of a given |
||||
* font when available. The "get_name" field should never be NULL |
||||
* |
||||
* the correponding function can return NULL to indicate that the |
||||
* Postscript name is not available. |
||||
* |
||||
* the name is owned by the face and will be destroyed with it |
||||
* |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_POSTSCRIPT_NAME "postscript-name" |
||||
|
||||
typedef const char* (*FT_PsName_GetFunc)( FT_Face face ); |
||||
|
||||
FT_DEFINE_SERVICE( PsName ) |
||||
{ |
||||
FT_PsName_GetFunc get_ps_name; |
||||
}; |
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __FT_SERVICE_POSTSCRIPT_NAME_H__ */ |
@ -1,42 +0,0 @@ |
||||
#ifndef __FT_SERVICE_SFNT_H__ |
||||
#define __FT_SERVICE_SFNT_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
#include FT_TRUETYPE_TABLES_H |
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
/*
|
||||
* SFNT table loading service |
||||
* |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_SFNT_TABLE "sfnt-table" |
||||
|
||||
/* used to implement FT_Load_Sfnt_Table()
|
||||
*/ |
||||
typedef FT_Error |
||||
(*FT_SFNT_TableLoadFunc)( FT_Face face, |
||||
FT_ULong tag, |
||||
FT_Long offset, |
||||
FT_Byte* buffer, |
||||
FT_ULong* length ); |
||||
|
||||
/* used to implement FT_Get_Sfnt_Table()
|
||||
*/ |
||||
typedef void* |
||||
(*FT_SFNT_TableGetFunc)( FT_Face face, |
||||
FT_Sfnt_Tag tag ); |
||||
|
||||
|
||||
FT_DEFINE_SERVICE( SFNT_Table ) |
||||
{ |
||||
FT_SFNT_TableLoadFunc load_table; |
||||
FT_SFNT_TableGetFunc get_table; |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __FT_SERVICE_SFNT_H__ */ |
@ -0,0 +1,57 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* svbdf.h */ |
||||
/* */ |
||||
/* The FreeType BDF services (specification). */ |
||||
/* */ |
||||
/* Copyright 2003 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
|
||||
#ifndef __SVBDF_H__ |
||||
#define __SVBDF_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
|
||||
#define FT_SERVICE_ID_BDF "bdf" |
||||
|
||||
|
||||
typedef FT_Error |
||||
(*FT_BDF_GetCharsetIdFunc)( FT_Face face, |
||||
const char* *acharset_encoding, |
||||
const char* *acharset_registry ); |
||||
|
||||
typedef FT_Error |
||||
(*FT_BDF_GetPropertyFunc)( FT_Face face, |
||||
const char* prop_name, |
||||
BDF_PropertyRec *aproperty ); |
||||
|
||||
|
||||
FT_DEFINE_SERVICE( BDF ) |
||||
{ |
||||
FT_BDF_GetCharsetIdFunc get_charset_id; |
||||
FT_BDF_GetPropertyFunc get_property; |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
|
||||
#endif /* __SVBDF_H__ */ |
||||
|
||||
|
||||
/* END */ |
@ -0,0 +1,60 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* svgldict.h */ |
||||
/* */ |
||||
/* The FreeType glyph dictionary services (specification). */ |
||||
/* */ |
||||
/* Copyright 2003 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
|
||||
#ifndef __SVGLDICT_H__ |
||||
#define __SVGLDICT_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
|
||||
/*
|
||||
* A service used to retrieve glyph names, as well as to find the |
||||
* index of a given glyph name in a font. |
||||
* |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" |
||||
|
||||
|
||||
typedef FT_Error |
||||
(*FT_GlyphDict_GetNameFunc)( FT_Face face, |
||||
FT_UInt glyph_index, |
||||
FT_Pointer buffer, |
||||
FT_UInt buffer_max ); |
||||
|
||||
typedef FT_UInt |
||||
(*FT_GlyphDict_NameIndexFunc)( FT_Face face, |
||||
FT_String* glyph_name ); |
||||
|
||||
|
||||
FT_DEFINE_SERVICE( GlyphDict ) |
||||
{ |
||||
FT_GlyphDict_GetNameFunc get_name; |
||||
FT_GlyphDict_NameIndexFunc name_index; /* optional */ |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
|
||||
#endif /* __SVGLDICT_H__ */ |
@ -0,0 +1,68 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* svmm.h */ |
||||
/* */ |
||||
/* The FreeType Multiple Masters services (specification). */ |
||||
/* */ |
||||
/* Copyright 2003 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
|
||||
#ifndef __SVMM_H__ |
||||
#define __SVMM_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
|
||||
/*
|
||||
* A service used to manage multiple-masters data in a given face. |
||||
* |
||||
* See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H). |
||||
* |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters" |
||||
|
||||
|
||||
typedef FT_Error |
||||
(*FT_Get_MM_Func)( FT_Face face, |
||||
FT_Multi_Master* master ); |
||||
|
||||
typedef FT_Error |
||||
(*FT_Set_MM_Design_Func)( FT_Face face, |
||||
FT_UInt num_coords, |
||||
FT_Long* coords ); |
||||
|
||||
typedef FT_Error |
||||
(*FT_Set_MM_Blend_Func)( FT_Face face, |
||||
FT_UInt num_coords, |
||||
FT_Long* coords ); |
||||
|
||||
|
||||
FT_DEFINE_SERVICE( MultiMasters ) |
||||
{ |
||||
FT_Get_MM_Func get_mm; |
||||
FT_Set_MM_Design_Func set_mm_design; |
||||
FT_Set_MM_Blend_Func set_mm_blend; |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __SVMM_H__ */ |
||||
|
||||
|
||||
/* END */ |
@ -0,0 +1,58 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* svpostnm.h */ |
||||
/* */ |
||||
/* The FreeType PostScript name services (specification). */ |
||||
/* */ |
||||
/* Copyright 2003 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
|
||||
#ifndef __SVPOSTNM_H__ |
||||
#define __SVPOSTNM_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
/*
|
||||
* A trivial service used to retrieve the PostScript name of a given |
||||
* font when available. The `get_name' field should never be NULL. |
||||
* |
||||
* The correponding function can return NULL to indicate that the |
||||
* PostScript name is not available. |
||||
* |
||||
* The name is owned by the face and will be destroyed with it. |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_POSTSCRIPT_NAME "postscript-name" |
||||
|
||||
|
||||
typedef const char* |
||||
(*FT_PsName_GetFunc)( FT_Face face ); |
||||
|
||||
|
||||
FT_DEFINE_SERVICE( PsName ) |
||||
{ |
||||
FT_PsName_GetFunc get_ps_name; |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
|
||||
#endif /* __SVPOSTNM_H__ */ |
||||
|
||||
|
||||
/* END */ |
@ -0,0 +1,69 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* svpostnm.h */ |
||||
/* */ |
||||
/* The FreeType PostScript name services (specification). */ |
||||
/* */ |
||||
/* Copyright 2003 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
|
||||
#ifndef __SVSFNT_H__ |
||||
#define __SVSFNT_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
#include FT_TRUETYPE_TABLES_H |
||||
|
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
|
||||
/*
|
||||
* SFNT table loading service. |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_SFNT_TABLE "sfnt-table" |
||||
|
||||
|
||||
/*
|
||||
* Used to implement FT_Load_Sfnt_Table(). |
||||
*/ |
||||
typedef FT_Error |
||||
(*FT_SFNT_TableLoadFunc)( FT_Face face, |
||||
FT_ULong tag, |
||||
FT_Long offset, |
||||
FT_Byte* buffer, |
||||
FT_ULong* length ); |
||||
|
||||
/*
|
||||
* Used to implement FT_Get_Sfnt_Table(). |
||||
*/ |
||||
typedef void* |
||||
(*FT_SFNT_TableGetFunc)( FT_Face face, |
||||
FT_Sfnt_Tag tag ); |
||||
|
||||
|
||||
FT_DEFINE_SERVICE( SFNT_Table ) |
||||
{ |
||||
FT_SFNT_TableLoadFunc load_table; |
||||
FT_SFNT_TableGetFunc get_table; |
||||
}; |
||||
|
||||
/* */ |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
|
||||
#endif /* __SVSFNT_H__ */ |
||||
|
||||
|
||||
/* END */ |
@ -0,0 +1,55 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* svxf86nm.h */ |
||||
/* */ |
||||
/* The FreeType XFree86 services (specification). */ |
||||
/* */ |
||||
/* Copyright 2003 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
|
||||
#ifndef __SVXF86NM_H__ |
||||
#define __SVXF86NM_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
|
||||
/*
|
||||
* A trivial service used to return the name of a face's font driver, |
||||
* according to the XFree86 nomenclature. Note that the service data |
||||
* is a simple constant string pointer. |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" |
||||
|
||||
#define FT_XF86_FORMAT_TRUETYPE "TrueType" |
||||
#define FT_XF86_FORMAT_TYPE_1 "Type 1" |
||||
#define FT_XF86_FORMAT_BDF "BDF" |
||||
#define FT_XF86_FORMAT_PCF "PCF" |
||||
#define FT_XF86_FORMAT_TYPE_42 "Type 42" |
||||
#define FT_XF86_FORMAT_CID "CID Type 1" |
||||
#define FT_XF86_FORMAT_CFF "CFF" |
||||
#define FT_XF86_FORMAT_PFR "PFR" |
||||
#define FT_XF86_FORMAT_WINFNT "Windows FNT" |
||||
|
||||
/* */ |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
|
||||
#endif /* __SVXF86NM_H__ */ |
||||
|
||||
|
||||
/* END */ |
@ -1,31 +0,0 @@ |
||||
#ifndef __FT_SERVICE_XF86_NAME_H__ |
||||
#define __FT_SERVICE_XF86_NAME_H__ |
||||
|
||||
#include FT_INTERNAL_SERVICE_H |
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
/*
|
||||
* a trivial service used to return the name of a face's font driver, |
||||
* according to the XFree86 nomenclature. Note that the service data |
||||
* is a simple constant string pointer |
||||
* |
||||
*/ |
||||
|
||||
#define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" |
||||
|
||||
#define FT_XF86_FORMAT_TRUETYPE "TrueType" |
||||
#define FT_XF86_FORMAT_TYPE_1 "Type 1" |
||||
#define FT_XF86_FORMAT_BDF "BDF" |
||||
#define FT_XF86_FORMAT_PCF "PCF" |
||||
#define FT_XF86_FORMAT_TYPE_42 "Type 42" |
||||
#define FT_XF86_FORMAT_CID "CID Type 1" |
||||
#define FT_XF86_FORMAT_CFF "CFF" |
||||
#define FT_XF86_FORMAT_PFR "PFR" |
||||
#define FT_XF86_FORMAT_WINFNT "Windows FNT" |
||||
|
||||
/* */ |
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __FT_SERVICE_XF86_NAME_H__ */ |
Loading…
Reference in new issue