* src/psaux/psaux.c src/psaux/psauxmod.c src/type1/t1driver.c: Make AFM parser optional, controlled by `T1_CONFIG_OPTION_NO_AFM'.
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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
diff --git a/ChangeLog b/ChangeLog
index da669df..6c60e5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/psaux/psaux.c src/psaux/psauxmod.c src/type1/t1driver.c: Make
+ AFM parser optional, controlled by `T1_CONFIG_OPTION_NO_AFM'.
+
2006-01-22 Werner Lemberg <wl@gnu.org>
* builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
diff --git a/src/psaux/psaux.c b/src/psaux/psaux.c
index 9dddc70..a4b9c5c 100644
--- a/src/psaux/psaux.c
+++ b/src/psaux/psaux.c
@@ -23,7 +23,11 @@
#include "psauxmod.c"
#include "t1decode.c"
#include "t1cmap.c"
+
+#ifndef T1_CONFIG_OPTION_NO_AFM
#include "afmparse.c"
+#endif
+
#include "psconv.c"
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index b69304a..bbb6c01 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -21,7 +21,10 @@
#include "psobjs.h"
#include "t1decode.h"
#include "t1cmap.h"
+
+#ifndef T1_CONFIG_OPTION_NO_AFM
#include "afmparse.h"
+#endif
FT_CALLBACK_TABLE_DEF
@@ -76,6 +79,7 @@
};
+#ifndef T1_CONFIG_OPTION_NO_AFM
FT_CALLBACK_TABLE_DEF
const AFM_Parser_FuncsRec afm_parser_funcs =
{
@@ -83,6 +87,7 @@
afm_parser_done,
afm_parser_parse
};
+#endif
FT_CALLBACK_TABLE_DEF
@@ -102,7 +107,11 @@
&ps_parser_funcs,
&t1_builder_funcs,
&t1_decoder_funcs,
+#ifndef T1_CONFIG_OPTION_NO_AFM
&afm_parser_funcs,
+#else
+ 0,
+#endif
t1_decrypt,
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 96ed45c..09be57d 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -178,10 +178,12 @@
(PS_GetFontPrivateFunc)t1_ps_get_font_private,
};
+#ifndef T1_CONFIG_OPTION_NO_AFM
static const FT_Service_KerningRec t1_service_kerning =
{
T1_Get_Track_Kerning,
};
+#endif
/*
* SERVICE LIST
@@ -194,7 +196,10 @@
{ FT_SERVICE_ID_GLYPH_DICT, &t1_service_glyph_dict },
{ FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TYPE_1 },
{ FT_SERVICE_ID_POSTSCRIPT_INFO, &t1_service_ps_info },
+
+#ifndef T1_CONFIG_OPTION_NO_AFM
{ FT_SERVICE_ID_KERNING, &t1_service_kerning },
+#endif
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
{ FT_SERVICE_ID_MULTI_MASTERS, &t1_service_multi_masters },