* src/sfnt/sfdriver.c: Include ttsbit.h and ttpost.h only
conditionally. * src/truetype/ttdriver.c (Set_Char_Sizes, Set_Pixel_Sizes): Set `size->strike_index' only conditionally. * src/type1/t1driver.c, src/type1/t1objs.c: Include t1afm.h only conditionally. * src/winfonts/winfnt.h: Move all type definitions to... * src/include/freetype/internal/fnttypes.h: New file. * src/winfonts/winfnt.c: Use it. * include/freetype/internal/ftdebug.h: Replaced FT_CAT and FT_XCAT with a direct solution (which also satifies picky compilers).
This commit is contained in:
parent
bf8155a095
commit
f1ca234473
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
2000-11-29 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/sfnt/sfdriver.c: Include ttsbit.h and ttpost.h only
|
||||
conditionally.
|
||||
|
||||
* src/truetype/ttdriver.c (Set_Char_Sizes, Set_Pixel_Sizes): Set
|
||||
`size->strike_index' only conditionally.
|
||||
|
||||
* src/type1/t1driver.c, src/type1/t1objs.c: Include t1afm.h only
|
||||
conditionally.
|
||||
|
||||
* src/winfonts/winfnt.h: Move all type definitions to...
|
||||
* src/include/freetype/internal/fnttypes.h: New file.
|
||||
* src/winfonts/winfnt.c: Use it.
|
||||
|
||||
2000-11-29 ??? ??? <darin@eazel.com>
|
||||
|
||||
* include/freetype/internal/ftdebug.h: Replaced FT_CAT and FT_XCAT
|
||||
with a direct solution (which also satifies picky compilers).
|
||||
|
||||
2000-11-28 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
|
||||
|
||||
* src/truetype/ttobjs.c (TT_Init_Size): Fix #ifdef's to work with
|
||||
|
|
|
@ -27,17 +27,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
/* A very stupid pre-processor trick. See K&R version 2 */
|
||||
/* section A12.3 for details... */
|
||||
/* */
|
||||
/* It is also described in the section `Separate */
|
||||
/* Expansion of Macro Arguments' in the info file */
|
||||
/* `cpp.info', describing GNU cpp. */
|
||||
/* */
|
||||
#define FT_CAT( x, y ) x ## y
|
||||
#define FT_XCAT( x, y ) FT_CAT( x, y )
|
||||
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
|
||||
|
||||
|
@ -134,7 +123,7 @@
|
|||
do \
|
||||
{ \
|
||||
if ( ft_trace_levels[FT_COMPONENT] >= level ) \
|
||||
FT_XCAT( FT_Message, varformat ); \
|
||||
FT_Message varformat; \
|
||||
} while ( 0 )
|
||||
|
||||
|
||||
|
@ -205,7 +194,7 @@
|
|||
/* print a message and exit */
|
||||
FT_EXPORT( void ) FT_Panic( const char* fmt, ... );
|
||||
|
||||
#define FT_ERROR( varformat ) FT_XCAT( FT_Message, varformat )
|
||||
#define FT_ERROR( varformat ) FT_Message varformat
|
||||
|
||||
|
||||
#endif /* FT_DEBUG_LEVEL_TRACE || FT_DEBUG_LEVEL_ERROR */
|
||||
|
|
|
@ -24,20 +24,32 @@
|
|||
|
||||
#include "sfdriver.h"
|
||||
#include "ttload.h"
|
||||
#include "ttsbit.h"
|
||||
#include "ttpost.h"
|
||||
#include "ttcmap.h"
|
||||
#include "sfobjs.h"
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
|
||||
#include "ttsbit.h"
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
#include "ttpost.h"
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include <sfnt/sfdriver.h>
|
||||
#include <sfnt/ttload.h>
|
||||
#include <sfnt/ttsbit.h>
|
||||
#include <sfnt/ttpost.h>
|
||||
#include <sfnt/ttcmap.h>
|
||||
#include <sfnt/sfobjs.h>
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
|
||||
#include <sfnt/ttsbit.h>
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
||||
#include <sfnt/ttpost.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -225,7 +225,9 @@
|
|||
}
|
||||
|
||||
size->ttmetrics.valid = FALSE;
|
||||
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
|
||||
size->strike_index = 0xFFFF;
|
||||
#endif
|
||||
|
||||
return TT_Reset_Size( size );
|
||||
}
|
||||
|
@ -262,7 +264,9 @@
|
|||
/* many things have been pre-computed by the base layer */
|
||||
|
||||
size->ttmetrics.valid = FALSE;
|
||||
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
|
||||
size->strike_index = 0xFFFF;
|
||||
#endif
|
||||
|
||||
return TT_Reset_Size( size );
|
||||
}
|
||||
|
|
|
@ -21,14 +21,20 @@
|
|||
#include "t1driver.h"
|
||||
#include "t1gload.h"
|
||||
#include "t1load.h"
|
||||
|
||||
#ifndef T1_CONFIG_OPTION_NO_AFM
|
||||
#include "t1afm.h"
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include <type1/t1driver.h>
|
||||
#include <type1/t1gload.h>
|
||||
#include <type1/t1load.h>
|
||||
|
||||
#ifndef T1_CONFIG_OPTION_NO_AFM
|
||||
#include <type1/t1afm.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,13 +26,19 @@
|
|||
|
||||
#include "t1gload.h"
|
||||
#include "t1load.h"
|
||||
|
||||
#ifndef T1_CONFIG_OPTION_NO_AFM
|
||||
#include "t1afm.h"
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#include <type1/t1gload.h>
|
||||
#include <type1/t1load.h>
|
||||
|
||||
#ifndef T1_CONFIG_OPTION_NO_AFM
|
||||
#include <type1/t1afm.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <freetype/internal/ftstream.h>
|
||||
#include <freetype/internal/ftdebug.h>
|
||||
#include <freetype/internal/ftobjs.h>
|
||||
#include <freetype/internal/fnttypes.h>
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
|
|
@ -27,125 +27,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
typedef struct WinMZ_Header_
|
||||
{
|
||||
FT_UShort magic;
|
||||
/* skipped content */
|
||||
FT_UShort lfanew;
|
||||
|
||||
} WinMZ_Header;
|
||||
|
||||
|
||||
typedef struct WinNE_Header_
|
||||
{
|
||||
FT_UShort magic;
|
||||
/* skipped content */
|
||||
FT_UShort resource_tab_offset;
|
||||
FT_UShort rname_tab_offset;
|
||||
|
||||
} WinNE_Header;
|
||||
|
||||
|
||||
typedef struct WinNameInfo_
|
||||
{
|
||||
FT_UShort offset;
|
||||
FT_UShort length;
|
||||
FT_UShort flags;
|
||||
FT_UShort id;
|
||||
FT_UShort handle;
|
||||
FT_UShort usage;
|
||||
|
||||
} WinNameInfo;
|
||||
|
||||
|
||||
typedef struct WinResourceInfo_
|
||||
{
|
||||
FT_UShort type_id;
|
||||
FT_UShort count;
|
||||
|
||||
} WinResourceInfo;
|
||||
|
||||
|
||||
#define WINFNT_MZ_MAGIC 0x5A4D
|
||||
#define WINFNT_NE_MAGIC 0x454E
|
||||
|
||||
|
||||
typedef struct WinFNT_Header_
|
||||
{
|
||||
FT_UShort version;
|
||||
FT_ULong file_size;
|
||||
FT_Byte copyright[60];
|
||||
FT_UShort file_type;
|
||||
FT_UShort nominal_point_size;
|
||||
FT_UShort vertical_resolution;
|
||||
FT_UShort horizontal_resolution;
|
||||
FT_UShort ascent;
|
||||
FT_UShort internal_leading;
|
||||
FT_UShort external_leading;
|
||||
FT_Byte italic;
|
||||
FT_Byte underline;
|
||||
FT_Byte strike_out;
|
||||
FT_UShort weight;
|
||||
FT_Byte charset;
|
||||
FT_UShort pixel_width;
|
||||
FT_UShort pixel_height;
|
||||
FT_Byte pitch_and_family;
|
||||
FT_UShort avg_width;
|
||||
FT_UShort max_width;
|
||||
FT_Byte first_char;
|
||||
FT_Byte last_char;
|
||||
FT_Byte default_char;
|
||||
FT_Byte break_char;
|
||||
FT_UShort bytes_per_row;
|
||||
FT_ULong device_offset;
|
||||
FT_ULong face_name_offset;
|
||||
FT_ULong bits_pointer;
|
||||
FT_ULong bits_offset;
|
||||
FT_Byte reserved;
|
||||
FT_ULong flags;
|
||||
FT_UShort A_space;
|
||||
FT_UShort B_space;
|
||||
FT_UShort C_space;
|
||||
FT_UShort color_table_offset;
|
||||
FT_Byte reserved2[4];
|
||||
|
||||
} WinFNT_Header;
|
||||
|
||||
|
||||
typedef struct FNT_Font_
|
||||
{
|
||||
FT_ULong offset;
|
||||
FT_Int size_shift;
|
||||
|
||||
WinFNT_Header header;
|
||||
|
||||
FT_Byte* fnt_frame;
|
||||
FT_ULong fnt_size;
|
||||
|
||||
} FNT_Font;
|
||||
|
||||
|
||||
typedef struct FNT_SizeRec_
|
||||
{
|
||||
FT_SizeRec root;
|
||||
FNT_Font* font;
|
||||
|
||||
} FNT_SizeRec, *FNT_Size;
|
||||
|
||||
|
||||
typedef struct FNT_FaceRec_
|
||||
{
|
||||
FT_FaceRec root;
|
||||
|
||||
FT_UInt num_fonts;
|
||||
FNT_Font* fonts;
|
||||
|
||||
FT_CharMap charmap_handle;
|
||||
FT_CharMapRec charmap; /* a single charmap per face */
|
||||
|
||||
} FNT_FaceRec, *FNT_Face;
|
||||
|
||||
|
||||
FT_EXPORT_VAR( const FT_Driver_Class ) winfnt_driver_class;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue