Added incremental loading capability to FT_Open_Face. Not implemented for any drivers yet.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 752c532..b0c7d88 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -700,6 +700,11 @@
FT_Long face_index,
FT_Int num_params,
FT_Parameter* params,
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ FT_Incremental_Interface* incremental_interface,
+#endif
+
FT_Face* aface )
{
FT_Memory memory;
@@ -724,6 +729,9 @@
face->driver = driver;
face->memory = memory;
face->stream = stream;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ face->incremental_interface = incremental_interface;
+#endif
error = clazz->init_face( stream,
face,
@@ -868,6 +876,10 @@
FT_Int num_params = 0;
FT_Parameter* params = 0;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ FT_Incremental_Interface* incremental_interface =
+ (args->flags & ft_open_incremental) ? args->incremental_interface : 0;
+#endif
if ( args->flags & ft_open_params )
{
@@ -875,8 +887,14 @@
params = args->params;
}
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ error = open_face( driver, stream, face_index,
+ num_params, params, incremental_interface, &face );
+#else
error = open_face( driver, stream, face_index,
num_params, params, &face );
+#endif
+
if ( !error )
goto Success;
}
@@ -901,6 +919,10 @@
FT_Int num_params = 0;
FT_Parameter* params = 0;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ FT_Incremental_Interface* incremental_interface =
+ (args->flags & ft_open_incremental) ? args->incremental_interface : 0;
+#endif
driver = FT_DRIVER( cur[0] );
@@ -910,8 +932,14 @@
params = args->params;
}
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
error = open_face( driver, stream, face_index,
- num_params, params, &face );
+ num_params, params, incremental_interface, &face );
+#else
+ error = open_face( driver, stream, face_index,
+ num_params, params, &face );
+#endif
+
if ( !error )
goto Success;