some updates to make everything compile clean
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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
diff --git a/src/psnames/rules.mk b/src/psnames/rules.mk
index b9e01b7..027c7e0 100644
--- a/src/psnames/rules.mk
+++ b/src/psnames/rules.mk
@@ -76,11 +76,9 @@ $(PSNAMES_DRV_OBJ_S): $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H) $(PSNAMES_DRV_SRC)
#
# All objects are recompiled if any of the header files is changed
#
-$(OBJ_)tt%.$O: $(PSNAMES_DIR_)tt%.c $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H)
+$(OBJ_)ps%.$O: $(PSNAMES_DIR_)ps%.c $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H)
$(PSNAMES_COMPILE) $T$@ $<
-$(OBJ_)sf%.$O: $(PSNAMES_DIR_)sf%.c $(BASE_H) $(SHARED_H) $(PSNAMES_DRV_H)
- $(PSNAMES_COMPILE) $T$@ $<
# update main driver object lists
#
diff --git a/src/truetype/ttconfig.h b/src/truetype/ttconfig.h
index eba0de3..ec454fe 100644
--- a/src/truetype/ttconfig.h
+++ b/src/truetype/ttconfig.h
@@ -37,7 +37,7 @@
/* By undefining this, you'll only compile the code necessary to load */
/* TrueType glyphs without hinting.. */
/* */
-#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
@@ -57,7 +57,7 @@
/* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */
/* embedded bitmaps in the TrueType/OpenType driver. */
/* */
-#undef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/*************************************************************************/
@@ -66,7 +66,7 @@
/* load and enumerate the glyph Postscript names in a TrueType or */
/* OpenType file. */
/* */
-#undef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/* The maximum number of sub-glyphs in a TrueType composite glyph */
#define TT_MAX_SUBGLYPHS 32
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index b27de27..85d2418 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -20,8 +20,12 @@
#include <ftsystem.h>
#include <ftcalc.h>
+#include <ttobjs.h>
#include <ttinterp.h>
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+
#define TT_MULFIX FT_MulFix
#define TT_MULDIV FT_MulDiv
@@ -7964,5 +7968,6 @@
#endif /* DEBUG_INTERPRETER */
+#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
/* END */
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index d823908..8b673b7 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -142,7 +142,7 @@
goto Exit;
/* allocate the pairs */
- if ( ALLOC( afm, sizeof(*afm ) ||
+ if ( ALLOC( afm, sizeof(*afm ) ) ||
ALLOC_ARRAY( afm->kern_pairs, count, T1_Kern_Pair ) )
goto Exit;
@@ -151,7 +151,7 @@
afm->num_pairs = count;
/* save in face object */
- ((T1_Face*)t1_face)->afm_data = afm;
+ ((T1_Face)t1_face)->afm_data = afm;
for ( p = start; p < limit-3; p++ )
{
diff --git a/src/type1/t1config.h b/src/type1/t1config.h
index 7b4119b..9767301 100644
--- a/src/type1/t1config.h
+++ b/src/type1/t1config.h
@@ -40,13 +40,13 @@
/* Define T1_CONFIG_OPTION_DISABLE_HINTER if you want to generate */
/* a driver with no hinter. This can be useful to debug the parser */
/* */
-#define T1_CONFIG_OPTION_DISABLE_HINTER
+#undef T1_CONFIG_OPTION_DISABLE_HINTER
/* Define this configuration macro if you want to prevent the */
/* compilation of "t1afm", which is in charge of reading Type1 */
/* AFM files into an existing face. Note that when set, the T1 */
/* driver will be unable to produce kerning distances.. */
/* */
-#define T1_CONFIG_OPTION_NO_AFM
+#undef T1_CONFIG_OPTION_NO_AFM
#endif /* T1CONFIG_H */
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 0f6ee54..f129d47 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -55,8 +55,8 @@
/* time). */
/* */
static
- void* Get_Interface)( FT_Driver driver,
- const FT_String* interface )
+ void* Get_Interface( FT_Driver driver,
+ const FT_String* interface )
{
if ( strcmp( (const char*)interface, "attach_file" ) == 0 )
return T1_Read_AFM;
@@ -140,35 +140,11 @@
T1_UInt horz_resolution,
T1_UInt vert_resolution )
{
- FT_Size_Metrics* metrics;
- T1_Face face;
-
- if (!size)
- return T1_Err_Invalid_Size_Handle;
-
- if ( char_width < 1*64 ) char_width = 1*64;
- if ( char_height < 1*64 ) char_height = 1*64;
-
- metrics = &size->root.metrics;
- face = (T1_Face)size->root.face;
-
- metrics->x_ppem = ( char_width * horz_resolution + 36 )/72;
- metrics->y_ppem = ( char_height * vert_resolution + 36 )/72;
-
- metrics->x_ppem = ( metrics->x_ppem + 32 ) & -64;
- metrics->y_ppem = ( metrics->y_ppem + 32 ) & -64;
-
- metrics->x_scale = FT_MulDiv( metrics->x_ppem, 0x10000,
- face->root.units_per_EM );
-
- metrics->y_scale = FT_MulDiv( metrics->y_ppem, 0x10000,
- face->root.units_per_EM );
+ UNUSED(char_width);
+ UNUSED(horz_resolution);
+ UNUSED(vert_resolution);
- metrics->x_ppem >>= 6;
- metrics->y_ppem >>= 6;
-
size->valid = FALSE;
-
return T1_Reset_Size( size );
}
@@ -203,33 +179,13 @@
T1_Int pixel_width,
T1_Int pixel_height )
{
- FT_Size_Metrics* metrics;
- T1_Face face;
-
- if (!size)
- return T1_Err_Invalid_Size_Handle;
-
- if ( pixel_width < 1 ) pixel_width = 1;
- if ( pixel_height < 1 ) pixel_height = 1;
-
- metrics = &size->root.metrics;
- face = (T1_Face)size->root.face;
-
- metrics->x_ppem = pixel_width;
- metrics->y_ppem = pixel_height;
-
- metrics->x_scale = FT_MulDiv( metrics->x_ppem * 64,
- 0x10000, face->root.units_per_EM );
-
- metrics->y_scale = FT_MulDiv( metrics->y_ppem * 64,
- 0x10000, face->root.units_per_EM );
-
- size->valid = 0;
-
+ UNUSED(pixel_width);
+ UNUSED(pixel_height);
+
+ size->valid = FALSE;
return T1_Reset_Size(size);
}
-
/*************************************************************************/
/* */
/* <Function> */
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 311145c..3798703 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -1421,11 +1421,10 @@
glyph->root.outline.n_points = 0;
glyph->root.outline.n_contours = 0;
- hinting = ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
- ( load_flags & FT_LOAD_NO_HINTING ) == 0;
-
glyph->root.format = ft_glyph_format_none;
+ hinting = 0;
+
#ifndef T1_CONFIG_OPTION_DISABLE_HINTER
/*****************************************************************/
/* */
@@ -1442,6 +1441,8 @@
/* points as well as hint/scale them correctly. */
/* */
+ hinting = (load_flags & (FT_LOAD_NO_SCALE|FT_LOAD_NO_HINTING)) == 0;
+
if ( hinting )
{
/* Pass 1 - don't record points, simply stem hints */
diff --git a/src/type1/type1.c b/src/type1/type1.c
index 2e7c80d..409494b 100644
--- a/src/type1/type1.c
+++ b/src/type1/type1.c
@@ -28,16 +28,6 @@
/***************************************************************************/
-
-#if 0
-#define FT_MAKE_OPTION_SINGLE_OBJECT
-#include <t1driver.c> /* driver interface */
-#include <t1objs.c> /* object manager */
-#include <t1load.c> /* table loader */
-#include <t1hint.c> /* hinter */
-#include <t1gload.c> /* glyph loader */
-#endif
-
#include <t1driver.c>
#include <t1objs.c>
#include <t1load.c> /* table loader */