include/freetype/internal/internal.h: fixed header inclusion macros to use direct definitions. This is the only way to do these things in a portable way :-( The rest of the code should follow shortly though everything compiles now.. * builds/compiler/intelc.mk, builds/compiler/watcom.mk, builds/win32/detect.mk: added support for the Intel C/C++ compiler, as well as _preliminary_ (read: doesn't work !!) support for Watcom. Also added a new setup target. Type "make setup list" for a list of supported command-line compilers on Win32..VER-2-0-4-PATCH
parent
b8eca20757
commit
1003866897
80 changed files with 833 additions and 285 deletions
@ -0,0 +1,84 @@ |
||||
#
|
||||
# FreeType 2 Intel C/C++ definitions (VC++ compatibility mode)
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2000 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# compiler command line name
|
||||
#
|
||||
CC := icl
|
||||
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := /I
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := /D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := /Fl
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := /Fo
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
# Note that the Intel C/C++ compiler version 4.5 complains about
|
||||
# the use of FT_FIELD_OFFSET with "value must be arithmetic type !!"
|
||||
# this really looks like a bug in the compiler because the macro
|
||||
# _does_ compute an arithmetic value, so we disable this warning
|
||||
# with "/Qwd32" !!
|
||||
#
|
||||
ifndef CFLAGS |
||||
CFLAGS := /nologo /c /Ox /G5 /W3 /Qwd32
|
||||
endif |
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := /Qansi /Za
|
||||
|
||||
# Library linking
|
||||
#
|
||||
#CLEAN_LIBRARY =
|
||||
LINK_LIBRARY = lib /nologo /out:$@ $(OBJECTS_LIST)
|
||||
|
||||
# EOF
|
@ -0,0 +1,80 @@ |
||||
#
|
||||
# FreeType 2 Watcom-specific definitions
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2000 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
# Compiler command line name
|
||||
#
|
||||
CC := wcc386
|
||||
|
||||
# The object file extension (for standard and static libraries). This can be
|
||||
# .o, .tco, .obj, etc., depending on the platform.
|
||||
#
|
||||
O := obj
|
||||
SO := obj
|
||||
|
||||
# The library file extension (for standard and static libraries). This can
|
||||
# be .a, .lib, etc., depending on the platform.
|
||||
#
|
||||
A := lib
|
||||
SA := lib
|
||||
|
||||
|
||||
# Path inclusion flag. Some compilers use a different flag than `-I' to
|
||||
# specify an additional include path. Examples are `/i=' or `-J'.
|
||||
#
|
||||
I := -I=
|
||||
|
||||
|
||||
# C flag used to define a macro before the compilation of a given source
|
||||
# object. Usually it is `-D' like in `-DDEBUG'.
|
||||
#
|
||||
D := -D
|
||||
|
||||
|
||||
# The link flag used to specify a given library file on link. Note that
|
||||
# this is only used to compile the demo programs, not the library itself.
|
||||
#
|
||||
L := -l
|
||||
|
||||
|
||||
# Target flag.
|
||||
#
|
||||
T := -FO=
|
||||
|
||||
|
||||
# C flags
|
||||
#
|
||||
# These should concern: debug output, optimization & warnings.
|
||||
#
|
||||
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
|
||||
# ANSI compliance.
|
||||
#
|
||||
ifndef CFLAGS |
||||
CFLAGS := -zq
|
||||
endif |
||||
|
||||
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
|
||||
#
|
||||
ANSIFLAGS := -za
|
||||
|
||||
|
||||
# Library linking
|
||||
#
|
||||
ifndef CLEAN_LIBRARY |
||||
CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY)) \
|
||||
$(NO_OUTPUT)
|
||||
endif |
||||
LINK_LIBRARY = wlib -q -o = $@ $(OBJECTS_LIST)
|
||||
|
||||
# EOF
|
@ -0,0 +1,23 @@ |
||||
#
|
||||
# FreeType 2 Intel C/C++ on Win32
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2000 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
SEP := /
|
||||
include $(TOP)/builds/win32/win32-def.mk |
||||
include $(TOP)/builds/compiler/intelc.mk |
||||
|
||||
# include linking instructions
|
||||
include $(TOP)/builds/link_dos.mk |
||||
|
||||
# EOF
|
@ -0,0 +1,26 @@ |
||||
#
|
||||
# FreeType 2 configuration rules for Watcom C/C++
|
||||
#
|
||||
|
||||
|
||||
# Copyright 1996-2000 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
|
||||
|
||||
SEP := /
|
||||
ISEP := $(strip \ )
|
||||
|
||||
include $(TOP)/builds/win32/win32-def.mk |
||||
include $(TOP)/builds/compiler/watcom.mk |
||||
|
||||
# include linking instructions
|
||||
include $(TOP)/builds/link_dos.mk |
||||
|
||||
# EOF
|
||||
|
@ -0,0 +1,247 @@ |
||||
/***************************************************************************/ |
||||
/* */ |
||||
/* cfftypes.h */ |
||||
/* */ |
||||
/* Basic OpenType/CFF type definitions and interface (specification */ |
||||
/* only). */ |
||||
/* */ |
||||
/* Copyright 1996-2000 by */ |
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
||||
/* */ |
||||
/* This file is part of the FreeType project, and may only be used, */ |
||||
/* modified, and distributed under the terms of the FreeType project */ |
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
||||
/* this file you indicate that you have read the license and */ |
||||
/* understand and accept it fully. */ |
||||
/* */ |
||||
/***************************************************************************/ |
||||
|
||||
|
||||
#ifndef __CFFTYPES_H__ |
||||
#define __CFFTYPES_H__ |
||||
|
||||
#include <ft2build.h> |
||||
#include FT_FREETYPE_H |
||||
|
||||
FT_BEGIN_HEADER |
||||
|
||||
|
||||
/*************************************************************************/ |
||||
/* */ |
||||
/* <Struct> */ |
||||
/* CFF_Index */ |
||||
/* */ |
||||
/* <Description> */ |
||||
/* A structure used to model a CFF Index table. */ |
||||
/* */ |
||||
/* <Fields> */ |
||||
/* stream :: source input stream */ |
||||
/* */ |
||||
/* count :: The number of elements in the index. */ |
||||
/* */ |
||||
/* off_size :: The size in bytes of object offsets in index. */ |
||||
/* */ |
||||
/* data_offset :: The position of first data byte in the index's */ |
||||
/* bytes. */ |
||||
/* */ |
||||
/* offsets :: table of element offsets in the index */ |
||||
/* */ |
||||
/* bytes :: If the index is loaded in memory, its bytes. */ |
||||
/* */ |
||||
typedef struct CFF_Index_ |
||||
{ |
||||
FT_Stream stream; |
||||
FT_UInt count; |
||||
FT_Byte off_size; |
||||
FT_ULong data_offset; |
||||
|
||||
FT_ULong* offsets; |
||||
FT_Byte* bytes; |
||||
|
||||
} CFF_Index; |
||||
|
||||
|
||||
/* a compact CFF Charset table */ |
||||
typedef struct CFF_Charset_ |
||||
{ |
||||
FT_ULong offset; |
||||
FT_UInt size; |
||||
FT_UInt format; |
||||
FT_Byte* bytes; |
||||
|
||||
} CFF_Charset; |
||||
|
||||
/* a compact CFF Encoding table */ |
||||
typedef struct CFF_Encoding_ |
||||
{ |
||||
FT_ULong offset; |
||||
FT_UInt size; |
||||
FT_UInt format; |
||||
FT_Byte* bytes; |
||||
|
||||
} CFF_Encoding; |
||||
|
||||
|
||||
typedef struct CFF_Font_Dict_ |
||||
{ |
||||
FT_UInt version; |
||||
FT_UInt notice; |
||||
FT_UInt copyright; |
||||
FT_UInt full_name; |
||||
FT_UInt family_name; |
||||
FT_UInt weight; |
||||
FT_Bool is_fixed_pitch; |
||||
FT_Fixed italic_angle; |
||||
FT_Pos underline_position; |
||||
FT_Pos underline_thickness; |
||||
FT_Int paint_type; |
||||
FT_Int charstring_type; |
||||
FT_Matrix font_matrix; |
||||
FT_Vector font_offset; |
||||
FT_ULong unique_id; |
||||
FT_BBox font_bbox; |
||||
FT_Pos stroke_width; |
||||
FT_ULong charset_offset; |
||||
FT_ULong encoding_offset; |
||||
FT_ULong charstrings_offset; |
||||
FT_ULong private_offset; |
||||
FT_ULong private_size; |
||||
FT_Long synthetic_base; |
||||
FT_UInt embedded_postscript; |
||||
FT_UInt base_font_name; |
||||
FT_UInt postscript; |
||||
|
||||
CFF_Charset charset; |
||||
CFF_Encoding encoding; |
||||
|
||||
/* these should only be used for the top-level font dictionary */ |
||||
FT_UInt cid_registry; |
||||
FT_UInt cid_ordering; |
||||
FT_ULong cid_supplement; |
||||
|
||||
FT_Long cid_font_version; |
||||
FT_Long cid_font_revision; |
||||
FT_Long cid_font_type; |
||||
FT_Long cid_count; |
||||
FT_ULong cid_uid_base; |
||||
FT_ULong cid_fd_array_offset; |
||||
FT_ULong cid_fd_select_offset; |
||||
FT_UInt cid_font_name; |
||||
|
||||
} CFF_Font_Dict; |
||||
|
||||
|
||||
typedef struct CFF_Private_ |
||||
{ |
||||
FT_Byte num_blue_values; |
||||
FT_Byte num_other_blues; |
||||
FT_Byte num_family_blues; |
||||
FT_Byte num_family_other_blues; |
||||
|
||||
FT_Pos blue_values[14]; |
||||
FT_Pos other_blues[10]; |
||||
FT_Pos family_blues[14]; |
||||
FT_Pos family_other_blues[10]; |
||||
|
||||
FT_Fixed blue_scale; |
||||
FT_Pos blue_shift; |
||||
FT_Pos blue_fuzz; |
||||
FT_Pos standard_width; |
||||
FT_Pos standard_height; |
||||
|
||||
FT_Byte num_snap_widths; |
||||
FT_Byte num_snap_heights; |
||||
FT_Pos snap_widths[13]; |
||||
FT_Pos snap_heights[13]; |
||||
FT_Bool force_bold; |
||||
FT_Fixed force_bold_threshold; |
||||
FT_Int lenIV; |
||||
FT_Int language_group; |
||||
FT_Fixed expansion_factor; |
||||
FT_Long initial_random_seed; |
||||
FT_ULong local_subrs_offset; |
||||
FT_Pos default_width; |
||||
FT_Pos nominal_width; |
||||
|
||||
} CFF_Private; |
||||
|
||||
|
||||
typedef struct CFF_FD_Select_ |
||||
{ |
||||
FT_Byte format; |
||||
FT_UInt range_count; |
||||
|
||||
/* that's the table, taken from the file `as is' */ |
||||
FT_Byte* data; |
||||
FT_UInt data_size; |
||||
|
||||
/* small cache for format 3 only */ |
||||
FT_UInt cache_first; |
||||
FT_UInt cache_count; |
||||
FT_Byte cache_fd; |
||||
|
||||
} CFF_FD_Select; |
||||
|
||||
|
||||
/* A SubFont packs a font dict and a private dict together. They are */ |
||||
/* needed to support CID-keyed CFF fonts. */ |
||||
typedef struct CFF_SubFont_ |
||||
{ |
||||
CFF_Font_Dict font_dict; |
||||
CFF_Private private_dict; |
||||
|
||||
CFF_Index local_subrs_index; |
||||
FT_UInt num_local_subrs; |
||||
FT_Byte** local_subrs; |
||||
|
||||
} CFF_SubFont; |
||||
|
||||
|
||||
/* maximum number of sub-fonts in a CID-keyed file */ |
||||
#define CFF_MAX_CID_FONTS 16 |
||||
|
||||
|
||||
typedef struct CFF_Font_ |
||||
{ |
||||
FT_Stream stream; |
||||
FT_Memory memory; |
||||
FT_UInt num_faces; |
||||
FT_UInt num_glyphs; |
||||
|
||||
FT_Byte version_major; |
||||
FT_Byte version_minor; |
||||
FT_Byte header_size; |
||||
FT_Byte absolute_offsize; |
||||
|
||||
|
||||
CFF_Index name_index; |
||||
CFF_Index top_dict_index; |
||||
CFF_Index string_index; |
||||
CFF_Index global_subrs_index; |
||||
|
||||
/* we don't load the Encoding and CharSet tables */ |
||||
|
||||
CFF_Index charstrings_index; |
||||
CFF_Index font_dict_index; |
||||
CFF_Index private_index; |
||||
CFF_Index local_subrs_index; |
||||
|
||||
FT_String* font_name; |
||||
FT_UInt num_global_subrs; |
||||
FT_Byte** global_subrs; |
||||
|
||||
CFF_SubFont top_font; |
||||
FT_UInt num_subfonts; |
||||
CFF_SubFont* subfonts[CFF_MAX_CID_FONTS]; |
||||
|
||||
CFF_FD_Select fd_select; |
||||
|
||||
} CFF_Font; |
||||
|
||||
|
||||
FT_END_HEADER |
||||
|
||||
#endif /* __CFFTYPES_H__ */ |
||||
|
||||
|
||||
/* END */ |
Loading…
Reference in new issue