diff options
author | Parth Wazurkar <parthwazurkar@gmail.com> | 2018-07-16 23:38:38 +0530 |
---|---|---|
committer | Parth Wazurkar <parthwazurkar@gmail.com> | 2018-07-20 16:49:37 +0530 |
commit | 88ca39830e0b0b0092b8076bf512e83796025796 (patch) | |
tree | 84d438fbe98036ff9cfaa5a9daa17c21f8ff2856 | |
parent | eaa830405ef8646efa2edf2e1205ec1688113700 (diff) | |
download | freetype2-88ca39830e0b0b0092b8076bf512e83796025796.tar.gz |
[gf] Create gf services.
* src/gf/gfdrivr.c: Define gf services descriptor
table and `gf_driver_requestor' function.
-rw-r--r-- | src/gf/gfdrivr.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/gf/gfdrivr.c b/src/gf/gfdrivr.c index 3bc846122..88bf6fb32 100644 --- a/src/gf/gfdrivr.c +++ b/src/gf/gfdrivr.c @@ -21,6 +21,8 @@ #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_OBJECTS_H #include FT_TRUETYPE_IDS_H + +#include FT_SERVICE_GF_H #include FT_SERVICE_FONT_FORMAT_H #include "gf.h" @@ -425,6 +427,28 @@ return error; } + /* + * + * SERVICES LIST + * + */ + + static const FT_ServiceDescRec gf_services[] = + { + { FT_SERVICE_ID_GF, NULL }, + { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_GF }, + { NULL, NULL } + }; + + FT_CALLBACK_DEF( FT_Module_Interface ) + gf_driver_requester( FT_Module module, + const char* name ) + { + FT_UNUSED( module ); + + return ft_service_list_lookup( gf_services, name ); + } + FT_CALLBACK_TABLE_DEF const FT_Driver_ClassRec gf_driver_class = @@ -442,7 +466,7 @@ NULL, /* FT_Module_Constructor module_init */ NULL, /* FT_Module_Destructor module_done */ - NULL /* FT_Module_Requester get_interface */ + gf_driver_requester /* FT_Module_Requester get_interface */ }, sizeof ( GF_FaceRec ), |