some updates to make everything compile clean

This commit is contained in:
David Turner 2000-02-10 18:08:17 +00:00
parent 1a3e3d6a0d
commit 1ab77fdfff
8 changed files with 26 additions and 76 deletions

View File

@ -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
#

View File

@ -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

View File

@ -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 */

View File

@ -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++ )
{

View File

@ -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 */

View File

@ -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;
UNUSED(char_width);
UNUSED(horz_resolution);
UNUSED(vert_resolution);
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 );
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> */

View File

@ -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 */

View File

@ -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 */