ref: cd888753c8f9eb9e2142692fd35f03d8114c3067
parent: b112fa41907710113aa63cbe3434f12f54096163
author: Werner Lemberg <[email protected]>
date: Sun May 12 11:08:57 EDT 2013
[truetype] Add framework for TrueType properties. * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H. (tt_property_set, tt_property_get): New functions, still empty. Define `tt_service_properties' service. Update `tt_services'. * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H. (TT_SERVICE_PROPERTIES_GET): New macro. (TTModulePIC): Add `tt_service_properties'.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2013-05-12 Werner Lemberg <[email protected]>
+ [truetype] Add framework for TrueType properties.
+
+ * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H.
+ (tt_property_set, tt_property_get): New functions, still empty.
+ Define `tt_service_properties' service.
+ Update `tt_services'.
+
+ * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H.
+ (TT_SERVICE_PROPERTIES_GET): New macro.
+ (TTModulePIC): Add `tt_service_properties'.
+
+2013-05-12 Werner Lemberg <[email protected]>
+
Fix Savannah bug #38967.
* src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
@@ -289,13 +302,13 @@
New macro.
* src/cff/cffdrivr.c: Include FT_SERVICE_PROPERTIES_H.
- (cff_property_set, cff_property_get): New function, still empty.
+ (cff_property_set, cff_property_get): New functions, still empty.
Define `cff_service_properties' service.
Update `cff_services'.
* src/cff/cffpic.h: Include FT_SERVICE_PROPERTIES_H.
(CFF_SERVICE_PROPERTIES_GET): New macro.
- CffModulePIC: Add `cff_service_properties'.
+ (CffModulePIC): Add `cff_service_properties'.
2013-04-03 Werner Lemberg <[email protected]>
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -29,6 +29,7 @@
#include FT_SERVICE_TRUETYPE_ENGINE_H
#include FT_SERVICE_TRUETYPE_GLYF_H
+#include FT_SERVICE_PROPERTIES_H
#include "ttdriver.h"
#include "ttgload.h"
@@ -52,6 +53,42 @@
#define FT_COMPONENT trace_ttdriver
+ /*
+ * PROPERTY SERVICE
+ *
+ */
+ static FT_Error
+ tt_property_set( FT_Module module, /* TT_Driver */
+ const char* property_name,
+ const void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ TT_Driver driver = (TT_Driver)module;
+
+
+ return error;
+ }
+
+
+ static FT_Error
+ tt_property_get( FT_Module module, /* TT_Driver */
+ const char* property_name,
+ const void* value )
+ {
+ FT_Error error = FT_Err_Ok;
+ TT_Driver driver = (TT_Driver)module;
+
+
+ return error;
+ }
+
+
+ FT_DEFINE_SERVICE_PROPERTIESREC(
+ tt_service_properties,
+ (FT_Properties_SetFunc)tt_property_set,
+ (FT_Properties_GetFunc)tt_property_get )
+
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -384,18 +421,20 @@
(TT_Glyf_GetLocationFunc)tt_face_get_location )
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_DEFINE_SERVICEDESCREC4(
+ FT_DEFINE_SERVICEDESCREC5(
tt_services,
FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE,
FT_SERVICE_ID_MULTI_MASTERS, &TT_SERVICE_GX_MULTI_MASTERS_GET,
FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
- FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET )
+ FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET,
+ FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET )
#else
- FT_DEFINE_SERVICEDESCREC3(
+ FT_DEFINE_SERVICEDESCREC4(
tt_services,
FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE,
FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
- FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET )
+ FT_SERVICE_ID_TT_GLYF, &TT_SERVICE_TRUETYPE_GLYF_GET,
+ FT_SERVICE_ID_PROPERTIES, &TT_SERVICE_PROPERTIES_GET )
#endif
@@ -457,7 +496,8 @@
#define TT_SIZE_SELECT 0
#endif
- FT_DEFINE_DRIVER( tt_driver_class,
+ FT_DEFINE_DRIVER(
+ tt_driver_class,
FT_MODULE_FONT_DRIVER |
FT_MODULE_DRIVER_SCALABLE |
--- a/src/truetype/ttpic.h
+++ b/src/truetype/ttpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for truetype module. */
/* */
-/* Copyright 2009, 2012 by */
+/* Copyright 2009, 2012, 2013 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,6 +27,7 @@
#define TT_SERVICES_GET tt_services
#define TT_SERVICE_GX_MULTI_MASTERS_GET tt_service_gx_multi_masters
#define TT_SERVICE_TRUETYPE_GLYF_GET tt_service_truetype_glyf
+#define TT_SERVICE_PROPERTIES_GET tt_service_properties
#else /* FT_CONFIG_OPTION_PIC */
@@ -33,15 +34,17 @@
#include FT_MULTIPLE_MASTERS_H
#include FT_SERVICE_MULTIPLE_MASTERS_H
#include FT_SERVICE_TRUETYPE_GLYF_H
+#include FT_SERVICE_PROPERTIES_H
typedef struct TTModulePIC_
{
- FT_ServiceDescRec* tt_services;
+ FT_ServiceDescRec* tt_services;
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- FT_Service_MultiMastersRec tt_service_gx_multi_masters;
+ FT_Service_MultiMastersRec tt_service_gx_multi_masters;
#endif
- FT_Service_TTGlyfRec tt_service_truetype_glyf;
+ FT_Service_TTGlyfRec tt_service_truetype_glyf;
+ FT_Service_PropertiesRec tt_service_properties;
} TTModulePIC;
@@ -54,6 +57,8 @@
( GET_PIC( library )->tt_service_gx_multi_masters )
#define TT_SERVICE_TRUETYPE_GLYF_GET \
( GET_PIC( library )->tt_service_truetype_glyf )
+#define TT_SERVICE_PROPERTIES_GET \
+ ( GET_PIC( library )->tt_service_properties )
/* see ttpic.c for the implementation */
@@ -66,6 +71,7 @@
#endif /* FT_CONFIG_OPTION_PIC */
/* */
+
FT_END_HEADER