Compare commits

...

1214 Commits

Author SHA1 Message Date
David Turner 2014fd419a Removing obsolete warnings in the docs 2003-09-11 20:04:15 +00:00
David Turner 44f5c5d899 * include/freetype/config/ftoption.h: commenting out the
macro TT_CONFIG_OPTION_BYTECODE_INTERPRETER so that package
        managers that define it with additionnal compilation command line
        options (e.g. with -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER) still
        work correctly.

        Also added a note to indicate that TT_CONFIG_OPTION_UNPATENTED_HINTING
        doesn't work as advertised yet.
2003-09-02 21:14:55 +00:00
David Turner 4748730ac6 updating documentation to warn about potential binary compatibility problems 2003-09-01 21:18:03 +00:00
Werner Lemberg ce252d1294 * src/bdf/bdflib.c (_bdf_readstream): Don't use FT_MEM_COPY but
FT_MEM_MOVE.

* include/freetype/freetype.h (FT_ENCODING_SJIS, FT_ENCODING_GB2312,
FT_ENCODING_BIG5, FT_ENCODING_WANSUNG, FT_ENCODING_JOHAB): New
enumerations of FT_Encoding.  The FT_ENCODING_MS_* variants except
FT_ENCODING_MS_SYMBOL are now deprecated.
Updated all users.
* docs/CHANGES: Document it.
2003-09-01 07:06:06 +00:00
Werner Lemberg 16d73130ef * src/bdf/bdfdrivr.c (BDF_Face_Init): Accept lowercase characters
for spacing.

* src/pcf/pcfread.c (pcf_load_font), src/bdf/bdfdrivr.c
(BDF_Face_Init): Accept lowercase characters for slant and weight.
2003-08-28 10:57:05 +00:00
Werner Lemberg c279578fc0 Some clean-up. 2003-08-18 08:23:40 +00:00
David Turner 6932c2e5d5 * include/freetype/config/ftoption.h: disabling TrueType bytecode
interpreter, until the UNPATENTED_HINTING works as advertised
2003-08-17 23:03:36 +00:00
David Turner 10c4bd014c * src/autohint/ahhint.c (ah_hinter_load_glyph): fixed bug 2003-08-17 23:00:59 +00:00
David Turner 1b1f7b928d * Jamfile: adding the "refdoc" target to the Jamfile in order to
build the API Reference in "docs/reference" automatically

        * include/freetype/t1tables.h, src/cid/cidtoken.h, src/type1/t1tokens.h,
        src/type42/t42parse.c:

        re-setting the types of "italic_angle", "underline_position" and
        "underline_thickness" to their previous values (i.e. long, short and
        ushort), in order to avoid breaking binary compatibility

        * include/freetype/ttunpath.h: fixing documentation comment
2003-08-17 22:31:23 +00:00
David Turner 7ea3d3e378 * include/freetype/config/ftoption.h, devel/ftoption.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/tttypes.h,
        src/truetype/ttinterp.c, src/truetype/ttobjs.c, src/truetype/ttobjs.h:

        changed the name of TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING to
        the simpler TT_CONFIG_OPTION_UNPATENTED_HINTING

        removed the macro TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING. Instead,
        the same effect can be used by setting a debug-hook with
        FT_DEBUG_HOOK_UNPATENTED_HINTING globally with FT_Set_Debug_Hook()
2003-08-17 22:09:14 +00:00
Werner Lemberg d29d2208e1 *** empty log message *** 2003-08-16 13:17:00 +00:00
Werner Lemberg cb23fe6eee * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c
(cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Fix
previous change.
2003-08-06 17:27:14 +00:00
Werner Lemberg a38af1f5ee * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c
(cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Apply
font matrix to advance also.
* docs/CHANGES: Updated.
2003-08-06 04:40:48 +00:00
Werner Lemberg e7cd6e5fc1 * builds/unix/configure.ac (version_info): Set to 9:4:3.
* builds/unix/configure: Updated.
* docs/CHANGES, docs/VERSION.DLL: Updated.

* include/freetype/freetype.h (FT_GlyphSlot): Change 2003-06-16
also breaks binary compatibility.  Reintroduce an unsigned integer
at the old position of `flags' called `reserved'.
2003-07-26 06:08:14 +00:00
Werner Lemberg d66a56a306 * src/tools/docmaker/tohtml.py
(chapter_inter, chapter_footer): Add <li> and use special <ul>
class.
(toc_exit): Don't emit </table>.
2003-07-25 22:55:59 +00:00
Werner Lemberg 940f5abafc (code_header, code_footer): Don't change font colour directly but
use a special <pre> class.
2003-07-25 22:21:57 +00:00
Werner Lemberg e7df0f905d Make reference valid HTML 4.01 transitional.
* src/tools/docmaker/tohtml.py (html_header_1): Add doctype
and charset.
(html_header_2): Fix style elements and add some more.
Fix syntax.
(block_header, block_footer, description_header, description_footer,
marker_header, marker_footer, source_header, source_footer,
chapter_header, chapter_footer): Don't use <center>...</center> but
`align=center' table attribute.
Use double quotes around table widths given in percent.
(keyword_prefix, keyword_suffix): Don't change font colour directly
but use a new <span> class.
(section_synopsis_header, section_synopsis_footer): Don't change
colour.
(print_html_field): <tr> gets the `valign' attribute, not <table>.
(print_html_field_list): Ditto.
(index_exit): Don't use <center>...</center> but `align=center'
table attribute.
(toc_exit, section_enter): Ditto.
(block_enter): Use <h4><a>, not <a><h4>.


This change reimplements fix from 2003-05-30 without breaking
binary compatibility.

* include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
`is_fixed_pitch', `underline_position', `underline_thickness' are
reverted to be normal values.

* include/freetype/internal/psaux.h (T1_FieldType): Remove
`T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
`T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
(T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
T1_FIELD_FIXED_1000_P): Removed.
(T1_FIELD_TYPE_BOOL): Renamed to...
(T1_FIELD_BOOL): New macro.  Updated all callers.

* src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
(T42_KEYWORD_COUNT): New macro.
(t42_parse_dict): New array `keyword_flags' to mark that a value has
already been assigned to a dictionary entry.
* src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.

* src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness' are reverted to be
normal values.
* src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.

* src/psaux/psobjs.c (ps_parser_load_field): Updated.

* src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
`underline_position', `underline_thickness', `paint_type',
`stroke_width' are reverted to be normal values.
* src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
* src/type1/t1load.c (T1_FIELD_COUNT): New macro.
(parse_dict): Add parameter for keyword flags.
Record only first instance of a field.
(T1_Open_Face): New array `keyword_flags'.
2003-07-25 22:09:53 +00:00
Werner Lemberg 083aec66a5 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
* builds/unix/configure.ac (version_info): Set to 10:0:3.
* builds/unix/configure: Updated.
* builds/freetype.mk (refdoc): Fix --title.

* docs/CHANGES, docs/VERSION.DLL, README: Updated.

* src/tools/docmaker/sources.py (re_crossref): Fix regular
expression to handle trailing punctuation characters.
* src/tools/docmaker/tohtml.py (make_html_word): Updated.

* docs/release: New file.
2003-07-25 05:57:21 +00:00
Werner Lemberg 3543ad614e * include/freetype/internal/psaux.h (PS_Parser_FuncsRec): New
member function `to_bytes'.

* src/psaux/psauxmod.c (ps_parser_funcs): New member
`ps_parser_to_bytes'.
(psaux_module_class): Increase version to 0x20000L.

* src/psaux/psobjs.c (IS_T1_LINESPACE): Add \f.
(IS_T1_NULLSPACE): New macro.
(IS_T1_SPACE): Add it.
(skip_spaces, skip_alpha): New functions.
(ps_parser_skip_spaces, ps_parser_skip_alpha): Use them.
(ps_tobytes, ps_parser_to_bytes): New functions.
2003-07-24 06:16:21 +00:00
Werner Lemberg d62e64322a New file. 2003-07-09 15:24:09 +00:00
Werner Lemberg 50c1fec29e dummy files 2003-07-09 15:22:39 +00:00
Werner Lemberg 9df34623b1 Initial revision 2003-07-09 15:22:39 +00:00
Werner Lemberg a3d21b81ef * builds/freetype.mk (DOC_DIR): New variable.
(refdoc): Use *_DIR variables.
(distclean): Remove documentation files.

* builds/detect.mk (std_setup, dos_setup): Mention `make refdoc'.

* configure: Set DOC_DIR variable.

* builds/freetype.mk (refdoc): New target to build the
documentation.
(.PHONY): Updated.

* include/freetype/freetype.h: Improve documentation of FT_CharMap.
* include/freetype/ftimage,h: Fix documentation of FT_OUTLINE_FLAGS.
* include/freetype/tttables.h: Document FT_Sfnt_Tag.
2003-07-09 15:20:32 +00:00
Werner Lemberg 27a825e503 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfread.c
(pcf_load_font): Fix computation of height if PIXEL_SIZE property is
missing.
2003-07-07 07:35:15 +00:00
Werner Lemberg 5a79a46339 formatting 2003-07-05 07:46:49 +00:00
Werner Lemberg c8cbf832ee formatting, improving documentation 2003-07-03 13:56:28 +00:00
Werner Lemberg 3d6ad172a8 * src/cache/ftcsbits.c (ftc_sbit_node_compare): Only add `size' if
there is no error.  Reported by Knut St. Osmundsen
<bird-freetype@anduin.net>.
2003-07-02 15:03:36 +00:00
Werner Lemberg a9c7e677de A new try to synchronize bitmap font access.
include/freetype/freetype.h (FT_Bitmap_Size): `height' is now
defined to return the baseline-to-baseline distance.  This was
already the value returned by the BDF and PCF drivers.

The `width' field now gives the average width.  I wasn't able to
find something better.  It should be taken as informative only.

New fields `size', `x_ppem', and `y_ppem'.

* src/pcf/pcfread.c (pcf_load_font): Updated to properly fill
FT_Bitmap_Size.
Do proper rounding and conversion from 72.27 to 72 points.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Updated to properly fill
FT_Bitmap_Size.
Do proper rounding and conversion from 72.27 to 72 points.

* src/sfnt/sfobjs.c (sfnt_load_face): Updated to properly fill
FT_Bitmap_Size.

* src/winfonts/winfnt.c (FNT_Face_Init): Updated to properly fill
FT_Bitmap_Size.

Redesigning the FNT driver to return multiple faces, not multiple
strikes.  At least one font (app850.fon from WinME) contains
different FNT charmaps for its subfonts.  Consequently, the previous
design of having multiple bitmap strikes in a single font face fails
since we have only one charmap per face.

* include/freetype/internal/fnttypes.h (FNT_Size_Rec): Removed.
(FNT_FaceRec): Remove `num_fonts' field and replace `fonts' with
`font'.

* src/base/ftwinfnt.c (FT_Get_WinFNT_Header): Updated.

* src/winfonts/winfnt.c (fnt_font_load): Don't set pixel_width equal
to pixel_height.
(fnt_face_done_fonts): Removed.
(fnt_face_get_dll_fonts): Renamed to...
(fnt_face_get_dll_font): This.  Add second function argument to
select face index.
Updated to load just one subfont.
(fnt_font_done, FNT_Face_Done): Updated.
(FNT_Face_Init): Handle `face_index'.
Updated.
(FNT_Size_Set_Pixels): Simplified; similar to BDF and PCF, the
bitmap width is now ignored.
(FNT_Load_Glyph): Updated.
Fix glyph index computation.
(winfnt_driver_class): Updated.
2003-07-01 07:28:55 +00:00
Owen Taylor 655b059764 2003-06-25 Owen Taylor <otaylor@redhat.com>
* src/sfnt/ttload.c (tt_face_load_hdmx): Don't assign
        num_records until we actually decide to load the table,
        otherwise, we'll segfault in tt_face_free_hdmx.
2003-06-30 13:08:58 +00:00
Werner Lemberg 6455780524 * src/cff/cffdrivr.c (cff_get_glyph_name): Protect agains zero
glyph name pointer.  Reported by Mikey Anbary <manbary@vizrt.com>.
2003-06-25 06:13:36 +00:00
Werner Lemberg 1d5cb2c4d2 * src/tools/glnames.py: Updated to AGL 2.0.
* src/psnames/pstables.h: Regenerated.


* include/freetype/cache/ftcglyph.h, include/freetype/ttnameid.h,
src/base/ftcalc.c, src/base/fttrigon.c, src/cff/cffgload.c,
src/otlayout/otlgsub.c, src/pshinter/pshrec.c,
src/psnames/psmodule.c, src/sfnt/sfobjs.c, src/truetype/ttdriver.c:
Decorate constants with `U' and `L' if appropriate.

* include/freetype/ftmoderr.h: Updated to include recent module
additions.

* src/pshinter/pshnterr.h (FT_ERR_BASE): Define as
`FT_Mod_Err_PShinter'.
* src/type42/t42error.h (FT_ERR_BASE): Define as
`FT_Mod_Err_Type42'.

* src/pshinter/pshrec.h (PS_HINTS_MAGIC): Removed.  Not used.


* include/freetype/config/ftconfig.h [__MWERKS__]: Define FT_LONG64
and FT_INT64.
2003-06-23 19:26:53 +00:00
Werner Lemberg 5049b3fcec *** empty log message *** 2003-06-22 15:34:38 +00:00
Werner Lemberg 949bca5584 * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in
computation of glyph_index.
(FNT_Size_Set_Pixels): To find a strike, first check pixel_height
only, then try to find a better hit by comparing pixel_width also.
Without this fix it isn't possible to access all strikes.
Also compute metrics.max_advance to be in sync with other bitmap
drivers.

* src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
(FT_Set_Pixel_Size): Assign value to `metrics' after validation of
arguments.


Synchronize computation of height and width for bitmap strikes.  The
`width' field in the FT_Bitmap_Size structure is now only useful to
enumerate different strikes.  The `max_advance' field of the
FT_Size_Metrics structure should be used to get the (maximum) width
of a strike.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.

* src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.

* src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single
argument to function.

* src/psnames/psmodule.c (ps_unicode_value): Handle `.' after
`uniXXXX' and `uXXXX[X[X]]'.


* src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/.
* src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c:
s/FT_Err_/FTC_Err_/.
* src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/.
* src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/.
* src/psaux/t1cmap.c: Include psauxerr.h.
s/FT_Err_/PSaux_Err_/.
* src/pshinter/pshnterr.h: New file.
* src/pshinter/rules.mk: Updated.
* src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h.
s/FT_Err_/PSH_Err_/.
* src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c:
s/FT_Err_/PFR_Err_/.
* src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/.
* src/truetype/ttgload.c: s/FT_Err_/TT_Err_/.
* src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define
FT_ERR_PREFIX and FT_ERR_BASE.
s/FT_Err_/Gzip_Err_/.
2003-06-22 15:33:53 +00:00
Werner Lemberg ad6e67f069 * src/cff/cffload (cff_encoding_load): `nleft' must be FT_UInt,
otherwise adding 1 might wrap the result.
2003-06-20 07:50:13 +00:00
Werner Lemberg 8048e39c0b * src/psnames/psmodule.c (ps_unicode_value): Add support to
recognize `uXXXX[X[X]]' glyph names.
Don't handle glyph names starting with `uni' which have more than
four digits.
2003-06-20 07:33:20 +00:00
Werner Lemberg c2452e76f1 updated 2003-06-18 07:06:54 +00:00
Werner Lemberg 8575434b1c * include/freetype/freetype.h (FT_Open_Flags): Replaced with
#defines for the constants.
(FT_Open_Args): Change type of `flags' to FT_UInt.
(FT_GlyphSlot): Move `flags' to FT_Slot_Internal.

* include/freetype/ftimage.h (FT_Outline_Flags, FT_Raster_Flag):
Replaced with #defines for the constants.

* include/freetype/internal/ftobjs.h (FT_Slot_Internal): New
field `flags' (from FT_GlyphSlot).
Updated all affected source files.
(FT_GLYPH_OWN_BITMAP): New macro (from ftgloadr.h).

* include/freetype/internal/ftgloadr.h (FT_GLYPH_OWN_BITMAP): Moved
to ftobjs.h.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Use dummy
FT_GlyphSlot_Internal object.
2003-06-18 06:59:57 +00:00
Werner Lemberg 7ee7894a82 * builds/compiler/gcc.mk, builds/compiler/gcc-dev.mk (CFLAGS):
Add -fno-strict-aliasing to get rid of zillion warnings from gcc
version 3.3.
2003-06-17 22:50:09 +00:00
Werner Lemberg e847caa318 * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.

* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.

* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.

* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 10:42:27 +00:00
Werner Lemberg 0975287689 Minor documentation typos. 2003-06-14 21:39:17 +00:00
Werner Lemberg 29f8e35516 * src/pfr/pfrobjs.c (pfr_slot_load): Apply font matrix.
* src/cid/cidload.c: Remove parse_font_bbox code (already enclosed
with #if 0 ... #endif).

* src/type1/t1tokens.h: Handle /FontName.
* src/type1/t1load.c (parse_font_name): Removed.
Remove parse_font_bbox code (already enclosed with #if 0 ...
#endif).

* src/type42/t42parse.c (t42_parse_font_name): Removed.
Remove t42_parse_font_bbox code (already enclosed with #if 0 ...
#endif).
(t42_keywords): Handle /FontName with T1_FIELD_KEY.
2003-06-14 07:40:09 +00:00
Werner Lemberg 142d6f35a9 * builds/dos/detect.mk: Test not only for `Dos' but for `DOS' also.
* builds/dos/dos-emx.mk, builds/compiler/emx.mk: New files for
EMX gcc compiler.
* builds/dos/detect.mk: Add target `emx'.

* builds/compiler/watcom.mk (LINK_LIBRARY): GNU Make for DOS doesn't
like a trailing semicolon; add a dummy command.
2003-06-13 07:38:22 +00:00
Werner Lemberg 8934eb0135 * include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_KEY.
(T1_FIELD_KEY): New macro.
* src/psaux/psobjs.c (ps_parser_load_field): Handle
T1_FIELD_TYPE_KEY.

* src/cid/cidtoken.h: Use T1_FIELD_KEY for /CIDFontName.


* src/cache/ftlru.c (FT_LruList_Remove_Selection): Decrease
number of nodes.
(FT_LruList_Lookup): Fix assertion for out-of-memory case.
2003-06-12 13:14:15 +00:00
Werner Lemberg 3064272c4c * src/cid/cidload.c (cid_decrypt): Removed.
(cid_read_subrs): Use t1_decrypt from psaux module.
* src/cid/cidload.h: Updated.
* src/cid/cidgload.c (cid_load_glyph): Use t1_decrypt from psaux
module.
2003-06-12 07:11:05 +00:00
Werner Lemberg e398340da1 * src/cid/cidobjs.c: Apply change 2003-05-31 from <Ron.Dev@gmx.de>.
Compute style flags.
Fix computation of root->height.
* src/cid/cidtoken.h: Handle FontBBox.
* src/cid/cidload.c (cid_load_keyword): Handle
T1_FIELD_LOCATION_BBOX.
(parse_font_bbox): Commented out.
(cid_field_record): Comment out element for parsing FontBBox.

* src/type42/t42parse.c (t42_parse_font_bbox): Commented out.
(t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with
T1_FIELD_CALLBACK.
(t42_parse_font_bbox): Commented out.
(t42_load_keyword): Handle T1_FIELD_LOCATION_BBOX.
* src/type42/t42objs.c (T42_Face_Init): Apply change 2003-05-31
from <Ron.Dev@gmx.de>.
2003-06-12 04:59:07 +00:00
Werner Lemberg edb31ca7fa * src/truetype/ttinterp.c (SetSuperRound) <0x30>: Follow Apple's
TrueType specification.
(Ins_MDRP, Ins_MIRP): Fix single width cut-in test.
2003-06-10 10:54:33 +00:00
Werner Lemberg 4e9526d6ca * src/gzip/ftgzip.c: (inflate_mask): Replaced with...
(NO_INFLATE_MASK): This.
* src/gzip/infutil.h: Declare `inflate_mask' conditionally by
NO_INFLATE_MASK.
2003-06-09 20:55:04 +00:00
Werner Lemberg 02b2fa64ef * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Handle Z_STREAM_END
correctly.

* src/pshinter/pshglob.c (psh_globals_new): Change calculation of
dim->stdw.count to avoid compiler problem.

* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Move the block
variables to the beginning of the function to avoid compiler
problems.
Add casts necessary for 16bit compilers.

* src/pfr/rules.mk (PFR_DRV_SRC): Add pfrsbit.c.
(PFR_DRV_H): Add pfrtypes.h.

* include/freetype/config/ftconfig.h: s/__MWKS__/__MWERKS__/.

* src/pfr/pfrsbit.c (pfr_bitwriter_init): Change type of third
argument to FT_Bool.
(pfr_lookup_bitmap_data): Change type of third and fourth argument
to FT_UInt.  Updated caller.
(pfr_load_bitmap_bits): Change type of fourth argument to FT_Bool.
2003-06-09 15:54:18 +00:00
Werner Lemberg 0f19a8b5ad Completely revised FreeType's make management.
. In all makefiles `/' is used as the path separator.  The
  conversion to the real path separators is done as late as
  possible using $(subst ...).

. $(HOSTSEP) no longer exists.  Now, $(SEP) gives the path separator
  for the operating system, and the new $(COMPILER_SEP) the path
  separator for the compiler tools.

. $(BUILD) has been renamed to $(BUILD_DIR).  In general, all
  directory variables end with `_DIR'.  The variants ending in `_'
  (like `BASE_' have been removed).

The following ChangeLog entries only describe changes which are
not related to the redesign.

* builds/beos/beos-def.mk (BUILD_DIR): Fix typo.
* builds/compiler/watcom.mk (LINK_LIBRARY): Fix linker call to avoid
overlong arguments as suggested by J. Ali Harlow
<ali@avrc.city.ac.uk>.
* builds/dos/dos-wat.mk: New file.
* builds/freetype.mk (FREETYPE_H): Include header files from the
`devel' subdirectory.

* builds/os2/os2-dev.mk, builds/unix/unixddef.mk,
builds/unix/unixddef.mk, builds/win32/w32-bccd.mk,
builds/win32/w32-dev.mk (BUILD_DIR): Fix path.

* builds/unix/configure.ac, builds/unic/configure: Updated.
* builds/unix/unix-def.in (DISTCLEAN): Add `freetype2.pc'.


* devel/ftoption.h: Updated.
2003-06-09 04:46:30 +00:00
Werner Lemberg 8abb0dacf8 *** empty log message *** 2003-06-08 03:53:39 +00:00
Werner Lemberg a2a1a66dce * src/base/ftmac.c (FT_New_Face_From_SFNT): s/rlen/sfnt_size/ to
make it compile.

* include/freetype/internal/psaux.h, src/truetype/ttgload.h:
s/index/idx/ to fix compiler warnings.

* src/sfnt/ttcmap0.c (tt_face_build_cmaps): Use more `volatile' to
fix compiler warning.

* src/gzip/ftgzip.c (BUILDFIXED): Removed.
* src/gzip/inftrees.c (inflate_trees_fixed) [!BUILDFIXED]: Use
FT_UNUSED to remove compiler warning.
2003-06-07 05:13:22 +00:00
Werner Lemberg 63ce99a09a * include/freetype/ftstroker.h: Renamed to...
* include/freetype/ftstroke.h: This.

* src/base/ftstroker.c: Renamed to...
* src/base/ftstroke.c: This.

* include/freetype/config/ftheader.h (FT_STROKER_H): Updated.

* src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk:
Updated.

* src/pcf/pcfdriver.c: Renamed to...
* src/pcf/pcfdrivr.c: This.
* src/pcf/pcfdriver.h: Renamed to...
* src/pcf/pcfdrivr.h: This.

* src/pcf/Jamfile, src/pcf/rules.mk: Updated.
2003-06-07 04:02:21 +00:00
Werner Lemberg 1f6cbfd6bb * src/base/ftmac.c (file_spec_from_path) [TARGET_API_MAC_CARBON]:
Add `#if !defined(__MWERKS__)'.
2003-06-06 12:47:59 +00:00
Werner Lemberg 31d783b1d0 * include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P.
(T1_FIELD_FIXED_1000, T1_FIELD_FIXED_1000_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle
T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P.

* src/cff/cffparse.c (cff_kind_fixed_thousand): New enumeration.
(CFF_FIELD_FIXED_1000): New macro.
(cff_parser_run): Handle cff_kind_fixed_thousand.
* src/cff/cfftoken.h: Use CFF_FIELD_FIXED_1000 for blue_scale.
* src/cff/cffload (cff_subfont_load): Fix default values of
expansion_factor and blue_scale.

* src/cif/cidtoken.h, src/type1/t1tokens.h: Use T1_FIELD_FIXED_1000
for blue_scale.

* src/pshinter/pshglob.c (psh_globals_new): Fix default value of
blue_scale.
2003-06-06 05:07:53 +00:00
Werner Lemberg 3c63bf28eb * include/freetype/internal/ftdriver.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/psaux.h, src/cid/cidgload.c,
src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h,
src/pshinter/pshrec.c, src/pshinter/pshalgo.c,
src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c,
src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c,
src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c,
src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c,
src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h:
Many casts and slight argument type changes to make it work with
a 16bit compiler.
2003-06-05 04:31:05 +00:00
Werner Lemberg 0dbd265838 * include/freetype/config/ftoption.h: Defining
TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING by default is a bad idea
since some fonts (e.g. Arial) produce worse results than without
hinting.  Reverted.
2003-06-05 04:28:17 +00:00
Werner Lemberg 124d333441 * src/truetype/ttgload.c (load_truetype_glyph)
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Call
FT_GlyphLoader_CheckPoints before adding phantom points.  This fixes
a segfault bug with fonts (e.g. htst3.ttf) which have nested
subglyphs more than one level deep.  Reported by Anthony Fok.

* include/freetype/config/ftoption.h: Define
TT_CONFIG_OPTION_BYTECODE_INTERPRETER,
TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, and
TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING to make it the new
default.
2003-06-04 07:59:58 +00:00
Werner Lemberg 1c52479642 * src/truetype/ttinterp.c (Free_Project, CUR_Func_freeProj):
Removed.  Unused.
Updated all callers.
2003-06-03 15:03:16 +00:00
Werner Lemberg 375da610c4 * src/autohint/ahhint.c (ah_hinter_hint_edges): Removed. Just a
wrapper for ah_hint_edges.
(ah_hint_edges): Renamed to...
(ah_hinter_hint_edges): This.

* src/base/ftobjs.c (FT_Set_Hint_Flags): Removed.  Unused.

* include/freetype/internal/ftobjs.h (FT_Face_InternalRec),
include/freetype/internal/psaux.h (T1_DecoderRec),
src/cff/cffgload.h (CFF_Builder): Remove `hint_flags' field.
Unused.

* src/cff/cffgload.c (cff_builder_init): Updated.
(cff_decoder_parse_charstrings) <cff_op_endchar>: Call hinter->apply
with decoder->hint_mode instead of builder->hint_flags.
* src/psaux/t1decode.c (t1_decoder_init): Updated.

* src/base/ftstroker.c (ft_stroke_border_export): s/index/idx/.

* src/sfnt/sfobjs.c (sfnt_load_face): Commented out code which
increased root->height by 15% if the line gap was zero.  There exist
fonts (containing e.g. form drawing characters) which intentionally
have a zero line gap value.
2003-06-03 11:51:43 +00:00
Werner Lemberg 7df5ed770f * src/cff/cffobjs.c (cff_face_init): Use symbolic names for
Adobe specific encoding IDs (there was a wrong EID value for custom
encoding).

* src/cff/cffcmap.h (CFF_CMapStdRec): Remove `count'.
* src/cff/cffcmap.c (cff_cmap_encoding_init,
cff_cmap_encoding_done): Updated.
(cff_cmap_encoding_char_index, cff_cmap_encoding_char_next): Use
256 as limit for character code.
2003-06-02 21:58:05 +00:00
Werner Lemberg 34700b54ba * src/winfonts/winfnt.c (FNT_Load_Glyph): Revert change from
2003-03-20.
2003-06-02 07:24:33 +00:00
Werner Lemberg 802be20783 * include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.
* src/type1/t1objs.c (T1_Face_Init): Improve algorithm for guessing
the font style by ignoring spaces and hyphens.

* builds/unix/freetype2.in: Fix `Version' field.
2003-06-01 21:30:04 +00:00
Werner Lemberg e7d4fea866 Avoid overwriting of numeric font dictionary entries for synthetic
fonts. Additionally, some entries were handled as `integer' instead
of `number'.

* include/freetype/internal/psaux.h (T1_FieldType): Add
T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
T1_FIELD_TYPE_FIXED_P.
(T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
* src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.

* include/freetype/internal/cfftypes.h (CFF_FontRecDict),
src/cff/cfftoken.h: Change type of underline_position and
underline_thickness to FT_Fixed.
* src/cff/cffload.c (cff_subfont_load): Fix default values of
underline_position and underline_thickness.
* src/cff/cffobjs.c (cff_face_init): Set underline_position
and underline_thickness in `root'.

* include/freetype/internal/t1types.h (T1_Font): Change point_type
and stroke_width to pointers.
* include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
is_fixed_pitch, underline_position, and underline_thickness to
pointers.
* src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers.  Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type1/t1objs.c (T1_Face_Done): Updated.
(T1_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.

* src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers.  Change
the type of the latter two to `fixed'.
Change type of stroke_width to `fixed'.
* src/cid/cidobjs.c (cid_face_done): Updated.
(cid_face_init): Updated.
Fix assignment of underline_position and underline_thickness.

* src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
underline_position, and underline_thickness to pointers.  Change the
type of the latter two to `fixed'.
Change type of stroke_width to `fixed' and make it a pointer.
Change paint_type to pointer.
* src/type42/t42objs.c (T42_Face_Init): Updated.
Fix assignment of underline_position and underline_thickness.
(T42_Face_Done): Updated.

* src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
* src/pshinter/pshglob.c, src/pshinter/pshglob.h
(psh_globals_set_scale): Make it a local function.

* test/gview.c: Fix remaming ps3->ps typo.
Formatting.
2003-05-30 09:12:50 +00:00
Werner Lemberg 9484a94d7d * src/pshinter/pshalgo1.[ch], src/pshinter/pshalgo2.[ch]: Removed.
* src/pshinter/pshalgo.h: Removed.

* src/pshinter/pshalgo3.[ch]: Renamed to...
* src/pshinter/pshalgo.[ch]: New files.
s/PSH3/PSH/.
s/psh3/psh/.
s/ps3/ps/.

* src/pshinter/pshrec.c, src/pshinter/pshinter.c: Updated.
* src/pshinter/rules.mk, src/pshinter/Jamfile: Updated

* src/pshinter/pshglob.[ch] (psh_dimension_snap_width): Commented
out.

* tests/gview.c: Remove code for pshalgo1 and pshalgo2.
Updated.
2003-05-28 22:42:41 +00:00
Werner Lemberg 134fecabc7 * vms_make.com: Reworked support for shareable images on VMS. The
first version was kind of a hack; the current implementation of the
procedure to extract the required symbols is much cleaner.

Reworked creation of MMS files, avoiding a number of temporary files
which were created in the previous version.

Further work on creating descrip.mms files on the fly.

* builds/vms/descrip.mms, src/autohint/descrip.mms,
src/type1/descrip.mms: Removed.
2003-05-28 06:27:26 +00:00
Werner Lemberg de1b6e1452 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Activate code for
handling `origin'.
2003-05-28 06:10:57 +00:00
Werner Lemberg 71d5b74f85 * src/pshinter/pshalgo3.c (psh3_glyph_compute_extrema): Skip
contours with only a single point to avoid segfault.

* src/autohint/ahtypes.h (AH_OPTION_NO_STRONG_INTERPOLATION):
Removed since unused.
2003-05-28 05:52:05 +00:00
Werner Lemberg 834dd30508 * src/gzip/ftgzip.c (ft_gzip_fil_io): Revert change from yesterday;
it has already been fixed differently.

* src/truetype/ttinterp.c (DO_SFVTL): Add missing braces around
if-clause.
2003-05-21 21:47:25 +00:00
Werner Lemberg 22d661dd95 * include/freetype/config/ftstdlib.h (ft_strcat): New wrapper macro
for strcat.

* src/base/ftmac.c (create_lwfn_name): s/isupper/ft_isupper/.
(parse_font): s/memcpy/ft_memcpy/.
(is_dfont) [TARGET_API_MAC_CARBON]: s/memcmp/ft_memcmp/.
* src/base/ftobjs.c (load_mac_face) [FT_MACINTOSH]:
s/strlen/ft_strlen/.
s/strcat/ft_strcat/.
s/strcpy/ft_strcpy/.
* src/gzip/zutil.h: s/memset/ft_memset/.
s/memcmp/ft_memcmp/.

* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
(PCF_Face_Init): Test for charset registry case-insensitively.

* t1load.c (parse_blend_axis_types): Fix compiler warning.

* descrip.mms: Removed.  Now created by...

* vms_make.com: New file.
2003-05-21 07:39:42 +00:00
Werner Lemberg 1766aa47c3 * t1load.c (parse_blend_axis_types): Fix compiler warning.
* src/gzip/ftgzip.c (ft_gzip_file_io): Avoid zero value of `delta'
to prevent infinite loop.

* docs/VERSION.DLL: Provide better autoconf snippet to check
FreeType version.

* src/base/ftobjs.c (open_face): Free `internal' not
`face->internal' in case of error to avoid possible segfault.

* src/pshinter/pshalgo3.c (ps3_hints_apply): Check whether we
actually have an outline.
2003-05-20 22:06:38 +00:00
Werner Lemberg 5a95127a5c * src/pshinter/pshalgo3.c (ps3_hints_apply): Try to optimize
y_scale so that the top of non-capital letters is aligned on a pixel
boundary whenever possible.

* src/autohint/ahhint.c (ah_hint_edges): Make sure that lowercase
m's maintain their symmetry.
2003-05-20 05:01:49 +00:00
Werner Lemberg ca4ed22d21 * src/autohint/ahhint.c (ah_hinter_load_glyph): Oops! David's
patch from yesterday has been resolved already in a different
way.  Reverted.
2003-05-20 04:32:54 +00:00
Werner Lemberg 94ed132e5a * src/autohint/ahhint.c (ah_hinter_load_glyph): Don't scale
y_scale locally but face->size->metrics.y_scale.
2003-05-19 21:42:08 +00:00
Werner Lemberg c38306a7f7 Add comment to #ifdef section in #ifndef. 2003-05-19 20:34:42 +00:00
Werner Lemberg 0e6bdd9606 * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Select proper start
value for `hi' to avoid infinite loop.
2003-05-19 12:45:28 +00:00
Werner Lemberg 9e47f21909 * src/raster/ftraster.c (Insert_Y_Turn): Fix overflow test.
* include/freetype/config/ftoption.h [FT_CONFIG_OPTION_MAC_FONTS]:
New macro.
* src/base/ftobjs.c: Use it to control mac font support on non-mac
platforms.

Implement partial support of Mac fonts on non-Mac platforms.

* src/base/ftobjs.c (memory_stream_close, new_memory_stream,
open_face_from_buffer, Mac_Read_POST_Resource,
Mac_Read_sfnt_Resource, IsMacResource, IsMacBinary, load_mac_face)
[!FT_MACINTOSH]: New functions.
(FT_Open_Face) [!FT_MACINTOSH]: Use load_mac_face.

* src/base/ftobjs.c (FT_Load_Glyph): Scale linear advance width only
if FT_FACE_FLAG_SCALABLE is set (otherwise we have a division by
zero since FNT and friends don't define `face->units_per_EM').
2003-05-18 22:40:11 +00:00
Werner Lemberg 6d2bb49e1e * src/base/fttrigon.c (FT_Vector_Rotate): Avoid rounding errors
for small values.

* src/autohint/ahtypes.h (AH_PointRec): Remove unused `in_angle'
and `out_angle' fields.
2003-05-17 12:07:45 +00:00
Werner Lemberg de465e40c3 * src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also.
* include/freetype/freetype.h: Fix typo in comment
(FT_HAS_FIXED_SIZES).
2003-05-15 06:44:09 +00:00
Werner Lemberg 8a32f50abd * builds/unix/aclocal.m4: Comment out definition of
`allow_undefined_flag' for Darwin 1.3.
* builds/unix/configure.ac: Add option --with-old-mac-fonts.
* builds/unix/ltmain.sh: Fix version numbering for Darwin 1.3.
* builds/unix/configure: Regenerated.

* include/freetype/config/ftconfig.h: Fix conditions for defining
`FT_MACINTOSH'.
* src/base/ftbase.c: Include `ftmac.c' conditionally.
* src/base/ftmac.c: Handle __GNUC__.
2003-05-11 07:12:26 +00:00
Werner Lemberg a8e38093c9 * src/cid/cidload.c (is_alpha): Removed.
(cid_parse_dict): Use `cid_parser_skip_alpha' instead of `is_alpha'.

* src/autohint/ahoptim.c, src/autohint/ahoptim.h: Obsolete, removed.
2003-05-07 10:39:45 +00:00
Werner Lemberg 70b09d4b58 * src/autohint/ahglyph.c (ah_setup_uv): Exchange `for' loop and
`switch' statement to make it run faster.
(ah_outline_compute_segments): Reset `segment->score' and
`segment->link'.
(ah_outline_link_segments): Provide alternative code which does
the same but runs much faster.
Handle major direction also.
(ah_outline_compute_edges): Scale `edge_distance_threshold' down
after rounding instead of scaling comparison value in loop.

* src/autohint/ahhint.c (ah_hinter_align_stong_points): Provide
alternative code which runs faster.
Handle `before->scale == 0'.

* src/autohint/ahtypes.h (AH_SegmentRec): Move some fields down.
(AH_EdgeRec): Move some fields in structure.
New field `scale'.

* src/sfnt/ttcmap0.c (tt_cmap4_char_next): Use binary search.
2003-05-07 10:21:13 +00:00
Werner Lemberg c3122677c9 * src/autohint/ahoptim.c (LOG): Renamed to...
(AH_OPTIM_LOG): This.
(AH_Dump_Springs): Fix log message format.

* src/autohint/ahhint.c (ah_hint_edges_3): Renamed to...
(ah_hint_edges): This.
2003-05-03 20:13:48 +00:00
Werner Lemberg 1d40ea2e65 Minor improvements. 2003-05-03 04:47:02 +00:00
Werner Lemberg 2728e4452d * src/bdf/bdfdrivr.c (BDF_Set_Pixel_Size): Initialize `max_advance'. 2003-05-02 18:52:17 +00:00
Werner Lemberg 08ba57b25c * src/autohint/ahglyph.c (ah_test_extrema): Renamed to...
(ah_test_extremum): This.
2003-05-02 15:16:13 +00:00
Werner Lemberg fada2c9ead Minor cleanups. 2003-04-29 13:23:47 +00:00
Werner Lemberg a9903f8a16 * builds/unix/configure.ac: Generate `freetype.pc' from
`freetype.in'.
* builds/unix/configure: Regenerated.
* builds/unix/install.mk (install, uninstall): Handle `freetype.pc'.

* builds/unix/freetype2.in: New file.  Contains building information
for the `pkg-config' package.
2003-04-28 09:43:32 +00:00
Werner Lemberg d8425fb3ae * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for
`glyph_index'.
2003-04-28 08:51:07 +00:00
Graham Asher e7d0c9bae3 Added comment for checkin of unpatented hinting system. 2003-04-25 11:43:07 +00:00
Graham Asher 4850f66c4b Added the unpatented hinting system, which is compiled only if
TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined
in ftoption.h
2003-04-25 11:40:46 +00:00
Graham Asher d643b7d5af If unpatented hinting is compiled the TrueType face object acquires a
new element, "FT_Bool unpatented_hinting".
2003-04-25 11:36:44 +00:00
Graham Asher 7ea970ba5b Added configuration macros (not defined, but in comments) for the
unpatented hinting system.
2003-04-25 11:34:18 +00:00
Graham Asher db287c9764 Added macro FT_UNPATENTED_H to use when including new header
ttunpat.h.
2003-04-25 11:32:39 +00:00
Graham Asher 8ffb4a164d Added header file ttunpat.h defining
FT_PARAM_TAG_UNPATENTED_HINTING.
2003-04-25 11:30:07 +00:00
Werner Lemberg ead81ae2d4 * src/bdf/bdflib.c (hash_bucket, hash_lookup): Use `const' for first
argument.
(bdf_get_font_property): Use `const' for third argument.
Updated all callers.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Set pixel width and height
similar to the PCF driver.
* src/bdf/bdf.h (_hashnode): Use `const' for `key'.
Updated.

* src/gzip/ftgzip.c: C++ doesn't like that the array `inflate_mask'
is declared twice.  It is perhaps better to modify the zlip source
files directly instead of this hack.
(zcalloc, zfree, ft_gzip_stream_close, ft_gzip_stream_io): Add casts
to make build with g++ successful.
2003-04-25 05:35:04 +00:00
David Turner 748c8b30af * src/pcf/pcfread.c (pcf_load_font): fixed the computation of
face->num_glyphs, this required increase the value by 1 to respect
        the convention that gindex 0 always corresponds to the "missing
        glyph".
2003-04-24 21:12:18 +00:00
Werner Lemberg 9e7f643ae3 * builds/unix/unix-cc.in (CFLAGS): Add @CPPFLAGS@. 2003-04-24 06:07:20 +00:00
Werner Lemberg fdb514c6ca * builds/unix/freetype-config.in (cflags): Emit FreeType 2's include
files first.  Otherwise there are conflicts with FreeType 1
installed simultaneously.
2003-04-24 05:45:59 +00:00
Werner Lemberg c23ce7dbcf Fixing bugs reported by Nelson Beebe.
* src/base/ftstroker.c (FT_Stroker_ParseOutline): Remove unused
variable `in_path'.

* src/base/ftobjs (ft_glyphslot_set_bitmap): Change type of
second argument to `FT_Byte*'.
* include/freetype/internal/ftobjs.h: Updated.

* src/bdf/bdflib.c (_bdf_readstream): Remove unused variable `res'.
(_bdf_parse_glyphs): Remove unused variable `next'.
Mark `call_data' as unused.

* src/cache/ftlru.c (FT_LruList_Lookup): Remove unused variable
`plast'.

* src/pcf/pcfread.c (pcf_seek_to_table_type): Slight recoding to
actually use `error'.
(pcf_load_font): Remove unused variable `avgw'.

* src/pfr/pfrobjs.c (pfr_face_get_kerning): Change return type
to `void'.
Mark `error' as unused.
* src/pfr/pfrobjs.h: Updated.
* src/pfr/pfrdrivr.c (pfr_get_kerning): Updated.

* src/sfnt/ttload.c (sfnt_dir_check): Remove unused variable
`format_tag'.

* src/sfnt/ttcmap0.c (tt_cmap6_validate, tt_cmap10_validate): Remove
unused variable `start'.
(tt_cmap10_char_next): Remove unused variable `result'

* src/sfnt/sfobjs.c (tt_face_get_name): Mark `error' as unused.

* src/sfnt/sfdriver.c (get_sfnt_postscript_name): Mark `error' as
unused.

* src/type1/t1objs.c (T1_Face_Init): Remove unused variable
`pshinter'.

* src/type1/t1gload.c (T1_Load_Glyph): Use `glyph_data_loaded'
only for FT_CONFIG_OPTION_INCREMENTAL.
2003-04-23 19:48:24 +00:00
Werner Lemberg 15dd049a40 * src/sfnt/ttcmap0.c (tt_cmap4_validate): Provide a weak variant
of the glyph ID bounding check if FT_VALIDATE_TIGHT is not active.
Without this change, many CJK fonts from Dynalab are rejected.
2003-04-23 18:21:48 +00:00
Werner Lemberg dae373bcbb * src/base/ftbdf.c (FT_Get_BDF_Property): Check for valid
`get_interface'.
2003-04-23 18:14:51 +00:00
Werner Lemberg a3d2d66a02 * src/base/ftmac.c (parse_fond): Fix handling of style names. 2003-04-23 18:10:19 +00:00
Werner Lemberg 2320c78466 Cleanups. 2003-04-23 15:50:27 +00:00
Werner Lemberg ac9f43cd1e Cleanups. 2003-04-23 15:34:52 +00:00
Werner Lemberg 3e13e4934e Cleanups. 2003-04-23 15:17:43 +00:00
Werner Lemberg 17de481806 Cleanups. 2003-04-23 14:32:58 +00:00
Werner Lemberg 0a10851fa8 * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist
instead of FT_Uint for `len'.

Cleanups.
2003-04-23 14:14:06 +00:00
Werner Lemberg 6c15a66c0f Cleanups. 2003-04-23 13:17:40 +00:00
Werner Lemberg 285fd87f46 * src/gzip/ftgzip.c (zcalloc) [!FT_CONFIG_OPTION_SYSTEM_ZLIB]:
Convert K&R format to modern C usage.
(FT_Stream_OpenGzip): Use long constant.

Cleanups.
2003-04-23 07:13:54 +00:00
Werner Lemberg 3f8c17392a Cleanups. 2003-04-23 06:47:12 +00:00
Werner Lemberg e7c8842c0f * src/cache/ftccache.c (ftc_cache_lookup): Remove shadow declaration
of `manager'.
2003-04-23 06:36:46 +00:00
Werner Lemberg bb9c1cee57 Cleanups. 2003-04-23 06:32:41 +00:00
Werner Lemberg b53b6862bc Cleanups. 2003-04-23 06:07:27 +00:00
Werner Lemberg 74675ec796 Cleanups; adding some copyrights; formatting. 2003-04-23 05:38:13 +00:00
Werner Lemberg 33829f219b Cleanups. 2003-04-22 07:49:24 +00:00
Werner Lemberg 08c6a02f48 Cleanups. 2003-04-22 06:53:24 +00:00
Werner Lemberg 2adb617c1a Cleanups. 2003-04-22 05:51:31 +00:00
Werner Lemberg 9b8f0d8367 Small documentation improvements. 2003-04-21 20:39:42 +00:00
Werner Lemberg beb06395ff * doc/INSTALL.UNX: Cleaned up.
Other minor fixes/beautifying/formatting.
2003-04-21 13:30:27 +00:00
David Turner 2ff2bd8e2c * src/base/ftmac.c (open_face_from_buffer): removed a double-free bug that
had nasty consequences when trying to open an "invalid" font on a Mac.
2003-04-09 07:03:38 +00:00
David Turner 7b80b45160 * src/bdf/bdfdrivr.h, src/pcf/pcf.h: changed FT_Short to FT_UShort in
order to be able to access more than 32768 glyphs in fonts
2003-04-09 06:55:57 +00:00
David Turner 2471dd134d * src/type1/t1load.c (T1_Open_Face): fixed the code to make it handle
special cases where a font only contains a ".notdef" glyph (happens in
   PDF-embedded fonts !!). Otherwise, FT_Panic was called !
2003-04-03 15:52:59 +00:00
David Turner 520f7b3d06 * README: udpated
* README.UNX: removed (now replaced by docs/INSTALL.UNX)

   * src/pshinter/pshalgo3.c: the hinter now performs as in 2.1.3 and
   will ignore stem quantization only when FT_LOAD_TARGET_SMOOTH is used

   * src/base/ftobjs.c: changed the default computations to include rounding
   in all cases, this is required to provide accurate kerning data when
   native TrueType hinting is enabled.

   * src/type1/t1load.c: the Type 1 loader now accepts more general names
   according to the Postscript spec (the previous one was too restrictive)
2003-03-27 21:35:44 +00:00
David Turner 389a365b09 * src/autohint/ahglyph.h, src/autohint/ahglyph.c, src/autohint/ahglobal.c,
src/autohint/ahhint.c: fixed blue-scale problem

    * src/cache/ftccache.c: fixed small bug that could crash the cache
    in rare circumstances (mostly with broken fonts)
2003-03-20 20:58:57 +00:00
David Turner 956884724d * docs/*: serious rewriting of the documentation
* include/freetype/internal/ftobjs.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c,
    src/pcf/pcfdriver.c, src/pfr/pfrsbit.c, src/sfnt/ttsbit.c,
    src/type42/t42objs.c, src/winfonts/winfnt.c: introduced three new functions
    to deal with glyph bitmaps within FT_GlyphSlot objects. these are:

      ft_glyphslot_free_bitmap
      ft_glyphslot_alloc_bitmap
      ft_glyphslot_set_bitmap

    these are much more convenient to use than managing the FT_GLYPH_OWN_BITMAP
    flag manually. the font drivers have been modified to use them as well.

    * src/cache/ftlru.c: fixed an invalid assertion check
2003-03-20 07:04:40 +00:00
David Turner 8a4f0e3d73 * src/truetyoe/ttdriver.c (Set_Char_Sizes): fixed a small rounding bug.
Actually, it seems that previous versions of FreeType didn't perform
    TrueType rounding exactly as appropriate.
2003-03-15 13:29:49 +00:00
David Turner 1ef648350e trying to fix TrueType rendering glitches 2003-03-14 07:31:35 +00:00
David Turner ad1ceca2a5 * src/base/ftdbgmem.c, docs/DEBUG.TXT: added new environment variables
to control memory debugging with FreeType. See the description of
    "FT2_DEBUG_MEMORY", "FT2_ALLOC_TOTAL_MAX" and "FT2_ALLOC_COUNT_MAX"
    in DEBUG.TXT

    * src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcsbits.c,
    ftlru.c: fixed the cache sub-system to correctly deal with out-of-memory
    conditions.

    * src/pfr/pfrobjs.c, src/pfr/pfrsbits.c: fixing compiler warnings and a
    small memory leak

    * src/psaux/psobjs.c (t1_reallocate_table): fixed a bug (memory leak) that
    only happened when trying to resize an array would end in an OOM.

    * src/smooth/ftgrays.c: removed compiler warnings / volatile bug

    * src/truetype/ttobjs.c: removed segmentation fault that happened in
    tight memory environments.
2003-03-13 21:07:51 +00:00
David Turner 7a50e76417 * src/gzip/ftgzip.c (ft_gzip_file_done): fixed memory leak, the ZLib
stream was not properly finalized
2003-02-28 08:32:46 +00:00
David Turner 7e6b31ea44 adding development directory 2003-02-25 21:45:29 +00:00
David Turner bc904309d3 reduce compiler warnings 2003-02-25 21:44:11 +00:00
David Turner 361565c6d1 reduce compiler warnings 2003-02-25 21:31:25 +00:00
David Turner 0ba973dadf * src/cache/ftccmap.c: the cmap cache now supports UCS-4 charmaps
when available in Asian fonts

    * src/sfnt/ttload.c, src/base/ftobjs.c: changed "asian" to "Asian" in
    comments

    * src/truetype/ttdriver.c (Set_Char_Sizes): fixed a rounding bug when
    computing the scale factors for a given character size in points with
    resolution.
2003-02-25 20:37:50 +00:00
David Turner fd37c4b8ac * src/gzip/ftgzip.c: fixed a bug that caused FreeType to loop endlessly
when trying to read certain compressed gzip files. The following test
    could be used to reveal the bug:

       touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz


    * src/pfr/pfrobjs.c, src/pfr/pfrload.c, src/pfr/pfrtypes.h: several
    fixes to the PFR font driver:

      - the list of available embedded bitmaps was not correctly set
        in the root FT_FaceRec structure describing the face

      - the glyph loader always tried to load the outlines when
        FT_LOAD_SBITS_ONLY was specified

      - the table loaded now scans for *undocumented* elements of a
        physical font's auxiliary data record, this is necessary to
        retrieve the "real" family and style names.

        NOTE THAT THIS CHANGES THE FAMILY NAME OF MANY PFR FONTS !!
2003-02-25 19:20:12 +00:00
David Turner 21493df9bd * src/autohint/ahhint.c: disabled the advance width "correction" which
seemed to provide more trouble than benefits..
2003-02-18 22:36:04 +00:00
David Turner 7946aa6f7b * src/truetype/ttdriver.c, src/truetype/ttobjs.h, src/truetype/ttobjs.c,
src/truetype/ttinterp.c, src/base/ftobjs.c: fixing the slight distortion
    problem that occured due to the latest auto-hinter changes
2003-02-18 22:25:22 +00:00
Graham Asher 343761601d Updated changelog: change to incremental interface. 2003-02-13 17:56:45 +00:00
Graham Asher 09495b4acf The incremental interface now passes the old metrics when asking for
replacement metrics so that they can be modified, not just replaced.
For example, CFF fonts need this.
2003-02-13 17:49:27 +00:00
David Turner 9f26ba72e7 * docs/CHANGES, docs/VERSION.DLL, docs/TODO: updating documentation for
the 2.1.4 release

    * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
    updating the project file for 2.1.4
2003-01-31 10:12:40 +00:00
David Turner 7ca3b5e304 various improvements for 2.1.4. see ChangeLog, I've got problems with
copy & paste on my desktop !!
2003-01-30 23:24:18 +00:00
David Turner 06fa55c892 improvements to the Postscript hinter 2003-01-30 14:57:38 +00:00
David Turner fa12012a5d updated documentation for 2.1.4 2003-01-24 08:30:36 +00:00
David Turner fb2bcfc594 * src/sfnt/ttload.c (sfnt_dir_check): relaxed the "head" table size
verification to accept a few broken fonts who pad the size incorrectly
    (the table should be padded, but its "size" field shouldn't per se
     the spec)
2003-01-22 22:53:55 +00:00
David Turner 4a1cdf133b * src/autohint/ahhint.c: small fix to the stem width optimisation 2003-01-22 22:47:04 +00:00
David Turner f041e82c89 * include/freetype/ftbdf.h, include/freetype/internal/bdftypes.h,
src/base/ftbdf.c, src/bdf/bdfdrivr.c, src/pcf/pcfdrivr.c,
    src/pcf/pcfread.h:

      adding a new API, named FT_Get_BDF_Property to retrieve the BDF
      properties of a given PCF or BDF font
2003-01-22 22:45:28 +00:00
Werner Lemberg c54198f04d * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
--copy' from libtool 1.4.3.
* builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
automake 1.7.1.
* builds/unix/configure: Regenerated with autoconf 2.54.
* builds/unix/config.guess, builds/unix/config.sub: Updated from
`config' CVS module at subversions.gnu.org.
* builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
`automake' CVS module at subversions.gnu.org.
2003-01-18 16:39:18 +00:00
David Turner 1d1043b175 adding missing source file 2003-01-17 08:40:32 +00:00
David Turner 3277549456 * include/freetype/freetype.h: fixed documentation for FT_Size_Metrics 2003-01-15 23:43:17 +00:00
David Turner 994bd48baa * include/freetype/freetype.h: fixed documentation for FT_Size_Metrics 2003-01-15 23:02:47 +00:00
David Turner ebb0b2d9c5 * src/gzip/ftgzip.c: bugfix: couldn't read certain gzip-ed font files 2003-01-15 23:01:02 +00:00
David Turner f5d472025b * include/freetype/config/ftheader.h, include/freetype/internal/fnttypes.h,
include/freetype/ftwinfnt.h, src/base/winfnt.c, src/winfonts/winfnt.c,
    src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms:

      added a Windows .FNT specific API (mostly for Wine). Also fixed a nasty
      bug in the header loader which would cause invalid memory overwrites
2003-01-15 22:48:27 +00:00
Graham Asher e75d4cc6be Noted addition of 'const' to the first argument to FT_Matrix_Multiply. 2003-01-14 16:00:32 +00:00
Graham Asher e8936f1f38 Added 'const' to the first argument to FT_Matrix_Multiply. 2003-01-14 15:53:33 +00:00
Graham Asher a2b8e0b479 noted latest change to ttload.c 2003-01-13 10:27:35 +00:00
Graham Asher 4c157cd023 TrueType typefaces lacking hmtx (horizontal metrics) tables are tolerated if the
incremental interface system is enabaled and an incremental interface
has been specified. This is necessary to support some typefaces passed
from GhostScript.
2003-01-13 10:20:08 +00:00
David Turner 7f0c4e9cc2 2003-01-11 David Chester <davidchester@qmx.net>
* include/freetype/config/ftoption.h, src/autohint/ahglobal.h,
        src/autohint/ahglobal.c, src/autohint/ahglyph.c,
        src/autohint/ahtypes.h:

          included David Chester's patches to the auto-hinter in order to
          slightly improve the output. Note that everything is controlled
          through the new FT_CONFIG_OPTION_CHESTER_HINTS defined at the
          end of "ftoption.h", there are also individual FT_CONFIG_CHESTER_XXX
          macros to control individual "features".

          Note that all improvements are enabled by default, but can be
          tweaked for optimization and testing purpose. The configuration
          macros will most likely disappear in the short future.

2003-01-11  David Turner  <david@freetype.org>

        * include/freetype/internal/fnttypes.h: fixed a structure field
        definition to avoid memory overwrites
2003-01-12 18:26:10 +00:00
David Turner 0fb0820fee * src/winfonts/winfnt.c: read 16 bytes into "reserved2", not "reserved" 2003-01-08 10:06:19 +00:00
David Turner 3f21842edc * src/truetype/ttgload.c: fixing the TrueType loader to handle invalid
composites correctly by limiting the recursion depth
2003-01-08 09:59:17 +00:00
David Turner 467e5d3e1e * src/autohint/ahtypes.h, src/autohint/ahhint.c, src/pshinter/pshalgo3.h,
src/pshinter/pshalgo3.c: implemented the FT_RENDER_MODE_LIGHT hinting
        mode in the auto and postscript hinters
2003-01-08 09:52:32 +00:00
David Turner bd23b2d9c7 * src/base/ftobjs.c (find_unicode_charmap): fixed the error code
returned when the font doesn't contain a Unicode charmap. This
        allows FT2 to load "symbol.ttf" and a few others correctly since
        the last release
2003-01-08 09:28:34 +00:00
David Turner a081e61ed5 * Jamrules, Jamfile, Jamfile.in, src/*/Jamfile: small changes to
support the compilation of FreeType 2 as part of larger projects with
        their own configuration options (only with Jam)
2003-01-08 09:10:53 +00:00
David Turner ad13f8270e * src/base/ftstroker.c: probably the last bug-fixes to the stroker,
the API is likely to change however.

        * src/base/fttrigon.c (FT_Angle_Diff): fixing function, it returned
        invalid values for large negative angle differences (resulting in
        incorrect stroker computations, among other things)

        * src/cache/ftccache.c (ftc_node_unlink): removing incorrect
        assertion, and changing code to avoid hash table size contraction

        * src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms:
        adding "ftstroker.obj" to default build, as optional component
2003-01-07 22:54:02 +00:00
David Turner c0cec09b11 updated builds/unix/configure by running autoconf 2002-12-26 21:49:40 +00:00
David Turner 3456045399 * src/gzip/adler32.c, src/gzip/infblock.c, src/gzip/inflate.c,
src/gzip/inftrees.c, src/gzip/zconf.h, src/gzip/zlib.h,
        src/gzip/zutil.h: updates to allow compilation without compiler
        warnings with LCC-Win32

        * include/freetype/freetype.h, docs/VERSION.DLL,
        builds/unix/configure.ac: updates for the upcoming 2.1.4 release
2002-12-26 20:51:04 +00:00
David Turner 61fe2101d9 * src/gzip/adler32.c, src/gzip/infblock.c, src/gzip/inflate.c,
src/gzip/inftrees.c, src/gzip/zconf.h, src/gzip/zlib.h,
        src/gzip/zutil.h: updates to allow compilation without compiler
        warnings with LCC-Win32

        * include/freetype/freetype.h, docs/VERSION.DLL,
        builds/unix/configure.ac: updates for the upcoming 2.1.4 release
2002-12-26 20:50:39 +00:00
David Turner 3303db53d4 * builds/unix/configure.ac, builds/unix/unix-cc.in,
builds/unix/unix-def.in: small fix to configure sub-system on Unix
        to allow other programs to correctly link with zlib when needed
2002-12-23 22:40:21 +00:00
David Turner 8116907221 * src/winfonts/winfnt.c: included George Williams' fix to support
version 2 fonts correctly
2002-12-18 22:53:12 +00:00
David Turner 9169587378 * src/base/ftobjs.c (find_unicode_charmap): added some comments to
better explain what's happening there

        * src/base/ftobjs.c (open_face): included Graham Asher's fix to
        prevent faces without Unicode charmaps from loading
2002-12-18 22:43:07 +00:00
David Turner 40587b66f7 2002-12-16 David Turner <david@freetype.org>
* docs/VERSION.DLL: updating document to better explain the differences between
        the three version numbers being used on Unix, as well as provide the AutoConf
        fragment provided by Lars Clausen

        * src/smooth/ftgrays.c (gray_render_conic): fixed small bug that
        prevented bezier arcs with negative vertical coordinates to be rendered
        appropriately


2002-11-27  Vincent Caron <v.caron@zerodeux.net>

        * builds/unix/unix-def.in, builds/unix/freetype-config.in,
        builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c:
        adding support for system zlib installations when available on the
        target platform (Unix only)
2002-12-16 21:51:24 +00:00
Antoine Leca 7c53c0a766 * src/base/ftobjs.c: modified the logic to get Unicode charmaps.
Now it loads UCS-4 charmaps when there is one.
* src/base/ftobjs.c (find_unicode_charmap): new function.
* src/base/ftobjs.c (open_face): refer to the above one.
* src/base/ftobjs.c (FT_Select_Charmap): idem.
2002-12-03 00:39:16 +00:00
Antoine Leca 6814b3a993 update of the script codes, according to the TAGS.txt file as distributed on Microsoft site.
This is preliminary, should be modified anyway.
2002-12-03 00:37:10 +00:00
Antoine Leca 45e31802ca Correct the name of the controlling macro (was __FTXF86_H__ ...) 2002-11-29 12:56:49 +00:00
David Turner 53bb57b55d * src/cff/cffload.c (cff_charser_load): modified charset loader to
accept pre-defined charsets, even when the font contains fewer glyphs.
        also enforced more checks to ensure that we never overflow the
        character codes array in the encoding.
2002-11-23 16:41:23 +00:00
David Turner 799af8843a * src/cff/cffload.c (cff_charser_load): modified charset loader to
accept pre-defined charsets, even when the font contains fewer glyphs
2002-11-23 15:53:57 +00:00
Antoine Leca 8793127865 Updated according to the recent OpenType from Microsoft 2002-11-15 20:05:58 +00:00
David Turner ec8736da9e updating documentation & changes 2002-11-13 23:28:08 +00:00
David Turner 282e665f71 fixed a small bug in the sbit cache that caused problems with embedded bitmaps 2002-11-07 09:46:43 +00:00
David Turner 100317c335 * src/otlayout/otlayout.h, src/otlyaout/otlconf.h,
src/otlayout/otlgsub.c, src/otlayout/otlgsub.h, src/otlayout/otlparse.c,
        src/otlayout/otlparse.h, src/otlayout/otlutils.h:

          updating the OpenType Layout code, adding support fot the first
          GSUB lookups. Nothing that really compiles for now though

        * src/autohint/ahhint.c: disabled serif stem width quantization. It
        produces slightly better shapes though this is not distinguishable
        with many fonts.
2002-11-07 01:36:29 +00:00
David Turner 6c99355440 2002-11-05 David Turner <david@freetype.org>
* include/freetype/config/ftoption.h, src/gzip/ftgzip.c: added
        support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify
        the use of system-wide zlib.

        Note that this macro, as well as FT_CONFIG_OPTION_BYTECODE_INTERPRETER,
        is not #undef-ed anymore. This allows the build system to define them
        depending on the configuration (typically by adding -D flags at
        compile time).

        * src/sfnt/ttcmap0.c (tt_face_build_cmaps): removed compiler warnings
        in optimized mode relative to the "volatile" local variables. This was
        not a compiler bug after all, but the fact that a pointer to a volatile
        variable is not the same than a volatile pointer to a variable :-)

        the fix was to change  "volatile FT_Byte*  p"
        into                   "FT_Byte* volatile  p"

        * src/pfr/pfrload.c, src/pfr/pfrdrivr.c, src/gzip/inftrees.c: removed
        compiler warnings in optimized modes

        * src/gzip/*.[hc]: modified our ZLib copy in order to prevent exporting
        any zlib function names outside of the component. This prevents linking
        problems on some platforms, when applications want to link FreeType
        _and_ ZLib together.


2002-11-05  Juliusz  <jch@pps.jussieu.fr>

        * src/psaux/psobjs.c (ps_table_add): modified increment loop in
        order to implement exponential behaviour
2002-11-06 22:32:54 +00:00
David Turner 02ea1e569c * include/freetype/ftgzip.h, src/gzip/ftgzip.c:
adding support for gzip compressed streams !!

        * src/pcf/pcfdriver.c: adding automatic support for gzip-compressed
        PCF files
2002-10-31 22:19:27 +00:00
David Turner 081eef595a * include/freetype/internal/internal.h, include/freetype/ftpfr.h,
src/base/ftpfr.c, src/base/Jamfile, src/descrip.mms, src/rules.mk,
        src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfsobjs.h:

        added PFR-specific public API. Fixed the kerning retrievel routine
        (it returned invalid values when the outline and metrics resolution
        differ)

        * src/base/ftsynth.c: fixed the synthetic emboldener. at last.

        * src/base/ftobjs.c: small internal fix to better support
        bitmap-based font formats
2002-10-31 08:30:19 +00:00
Werner Lemberg 6b37302d08 * include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro.
(FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG.
2002-10-25 12:22:31 +00:00
Werner Lemberg 5d506cf3c7 Fix header comment. 2002-10-24 21:37:02 +00:00
Werner Lemberg fa17b90650 * include/freetype/freetype.h (FT_Encoding): Fix entry for latin-2. 2002-10-23 09:24:23 +00:00
Werner Lemberg ad46b8892f Formatting; adding file headers. 2002-10-07 10:12:43 +00:00
Werner Lemberg fe2ad2d755 * include/freetype/freetype.h (FT_Open_Face): Use `const' for `args'
(suggested by Graham).
* src/base/ftobjs.c (FT_Open_Face): Updated.
(ft_input_stream_new): Ditto.
2002-10-07 09:15:20 +00:00
David Turner fc520e232b * docs/CHANGES: updating 2002-10-05 15:00:36 +00:00
David Turner 6550e01be3 * src/pfr/pfrsbit.h, src/pfr/pfrsbit.c, src/pfr/pfrload.c,
src/pfr/pfrgload.c, src/pfr/pfrobjs.c, src/pfr/pfrtypes.h,
        Jamfile, src/base/ftobjs.c: adding support for embedded bitmaps to
        the PFR driver, and rewriting its kerning loader / handler to use all
        kerning pairs in a physical font (and not just the first item).

        * src/tools/docmaker/content.py, src/tools/docmaker/sources.py,
        src/tools/docmaker/tohtml.py: fixing a few nasty bugs

        * src/sfnt/ttcmap0.c: the validator for format 4 sub-tables is
        now capable of dealing with invalid "length" fields at the start
        of the sub-table. This allows fonts like "mg______.ttf" (i.e.
        Marriage) to return accurate charmaps.
2002-10-05 14:57:03 +00:00
Werner Lemberg 91878e734b * src/smooth/ftgrays.c (SUBPIXELS): Add cast to `TPos'.
Update all callers.
(TRUNC): Add cast to `TCoord'.
Update all callers.
(TRaster): Use `TPos' for min_ex, max_ex, min_ey, max_ey, and
last_ey.
Update all casts.
(gray_render_line): Fix casts for `p' and `first'.
2002-10-05 06:57:53 +00:00
Werner Lemberg 7d10cbd3cd * src/bdf/bdflib.c (bdf_load_font): Allocate the _bdf_parse_t
structure with FT_ALLOC instead of using the stack.
2002-10-02 17:04:58 +00:00
Werner Lemberg 901933beda * src/include/freetype/internal/tttypes.h (num_sbit_strikes,
num_sbit_scales): Use `FT_ULong'.
* src/sfnt/sfobjs.c (sfnt_load_face): Updated accordingly.
* src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Ditto.
(find_sbit_image): Remove cast.
* src/raster/ftrend1.c (ft_raster1_render): Fix cast.

* src/sfnt/ttload.c (tt_face_load_names): Use cast.
* src/sfnt/ttcmap.c (code_to_next2): Use long constant.
(code_to_index4): Use cast.
(code_to_index8_12): Fix cast.
* src/sfnt/ttcmap0.c (tt_cmap4_char_next, tt_cmap8_char_index,
tt_cmap12_char_index): Use cast for `result'.
(tt_face_build_cmaps): Use cast.
* src/sfnt/sfobjs.c (tt_name_entry_ascii_from_ucs4): Use cast for
`code'.
(sfnt_load_face): Use FT_Int32 for `flags'.

* src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
gray_compute_cbox, gray_convert_glyph, gray_raster_reset): Add casts
to `TCoord' and `int'.
More 16bit fixes.
s/FT_Pos/TPos/.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Add casts.
2002-09-28 16:40:57 +00:00
Werner Lemberg 6f708265ca formatting 2002-09-27 18:17:17 +00:00
Werner Lemberg ab219bb297 * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,
tt_face_get_ps_name): Replace switch statement with if clauses to
make it more portable.

* src/cff/cffobjs.c (cff_face_init): Ditto.

* include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for
`module_size'.
* include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for
`glyph_size'.

* src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to
`FT_Render_Mode'.
(FT_Render_Glyph_Internal): Change third parameter to
`FT_Render_Mode'.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter
to `FT_Render_Mode'.

* src/raster/ftrend1.c (ft_raster1_render): Change third parameter
to `FT_Render_Mode'.
* src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Ditto.
(ft_smooth_render_generic): Change third and fifth parameter to
`FT_Render_Mode'.

* include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
include/freetype/ftglyph.h: Updated.

* src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c
(PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load),
src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c
(T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change
fourth parameter to `FT_Int32'.

* src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters
and declare them as unused.

* src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'.

* src/psnames/psnames.h (PS_Unicode_Value_Func): Change return
value to FT_UInt32.
* src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table):
Updated accordingly.

* src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'.
(cff_get_glyph_name): Use cast for result of ft_strlen.
* src/cff/cffparse.c (cff_parse_real): User cast for assigning
`exp'.
* src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for
some local variables.
(cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some
switch statements.
(cff_font_load): Use cast in call to CFF_Load_FD_Select.
* src/cff/cffobjs.c (cff_size_init): Use more casts.
(cff_face_init): Use FT_Int32 for `flags'.
* src/cff/cffgload.c (cff_operator_seac): Use cast for assigning
`adx' and `ady'.
(cff_decoder_parse_charstrings): Use FT_ULong for third parameter.
Use more casts.
* src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'.

* src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'.
* src/cid/cidgload.c (cid_load_glyph): Add missing cast for
`cid_get_offset'.

* src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use
cast for `num_points'.
(t1_decoder_init): Use cast for assigning `decoder->num_glyphs'.

* src/base/ftdebug.c (ft_debug_init): Use FT_Int.
* include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use
`FT_Int32' for fourth parameter.
* src/base/ftobjs.c (open_face): Use cast for calling
clazz->init_face.

* src/raster/ftraster.c (Set_High_Precision): Use `1' instead of
`1L'.
(Finalize_Profile_Table, Line_Up, ft_black_init): Use casts.
* src/raster/ftrend1.c (ft_raster1_render): Ditto.

* src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long
constant.

* builds/amiga/include/freetype/config/ftmodule.h: Updated.
2002-09-27 11:09:23 +00:00
David Turner 179ee65bac updating documentation 2002-09-25 00:10:27 +00:00
David Turner cdc82b4a8a 2002-09-25 David Turner <david@freetype.org>
* src/autohint/ahtypes.h: disabling metrics hinting in the auto-hinter.
        this produces much better anti-aliased text

2002-09-25  Anthony Fok  <anthony@thizlinux.com>

        * src/sfnt/ttcmap0.c: added support for opens___.ttf (it contains
        a charmap that uses offset=0xFFFFU instead of 0x0000 to indicate a
        missing glyph)
2002-09-24 23:39:58 +00:00
Werner Lemberg 065b261496 * src/truetype/ttdriver.c (Load_Glyph): Fourth parameter must be
FT_Int32.
* src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph):
Ditto.
2002-09-21 18:43:10 +00:00
Werner Lemberg d02e984ed9 More 16bit fixes.
* src/autohint/ahglobal.c (sort_values): Use FT_Pos for `swap'.
(ah_hinter_compute_widths): Use FT_Pos for `dist'.
Use AH_MAX_WIDTHS.
* src/autohint/ahglyph.c (ah_outline_scale_blue_edges): Use FT_Pos
for `delta'.
(ah_outline_compute_edges): Replace some ints with FT_Int and
FT_Pos.
(ah_test_extrema): Clean up code.
(ah_get_orientation): Use 4 FT_Int variables instead of FT_BBox to
hold indices.
* src/autohint/ahtypes.h (AH_SegmentRec): Change type of `score'
to FT_Pos.
2002-09-21 08:33:27 +00:00
Werner Lemberg 97dc77493c * builds/unix/config.guess, builds/unix/config.sub: Updated to
recent versions.
2002-09-20 15:45:43 +00:00
David Turner 384b21a899 * src/base/ftobjs.c (FT_Library_Version): bugfix 2002-09-18 23:18:36 +00:00
Werner Lemberg bf4f7c4e60 Formatting, minor doc fixes. 2002-09-18 11:32:12 +00:00
David Turner 7db74b3f85 updating docs/CHANGES 2002-09-18 07:53:22 +00:00
David Turner 6035828d83 * include/freetype/freetype.h, include/freetype/ftimage.h,
include/freetype/ftstroker.h, include/freetype/ftsysio.h,
        include/freetype/ftsysmem.h, include/freetype/ttnameid.h:
        updating the in-source documentation

        * src/tools/docmaker/tohtml.py: updating the HTML formatter in the
        DocMaker tool

        * src/tools/docmaker.py: removing obsolete file
2002-09-17 22:57:29 +00:00
Werner Lemberg 25bf13fe3e More 16bit fixes.
* src/psaux/psobjs.c (reallocate_t1_table): Use FT_Long for
second parameter.
2002-09-17 13:56:44 +00:00
Werner Lemberg 2110a7d0f7 16bit fixes from Wolfgang Domrse.
* src/type1/t1parse.h (T1_ParserRec): Change type of `base_len'
and `private_len' to FT_Long.
* src/type1/t1parse.c (T1_Get_Private_Dict): Remove cast for
`private_len'.
* src/type1/t1load.c: Use FT_Int cast for most calls of T1_ToInt.
Use FT_PtrDist where appropriate.
(parse_encoding): Use FT_Long for `count' and `n'.
(read_binary_data): Use FT_Long* for second parameter.
* src/type1/t1afm.c (afm_atoindex): Use FT_PtrDist.

* src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused label.
* src/pshinter/pshalgo3.c (psh3_hint_align): Remove unused variable.
2002-09-17 12:39:19 +00:00
Werner Lemberg 39d98e133b * src/type1/t1parse.h (T1_ParserRec): Change type of `base_len'
and `private_len' to FT_Long.

* src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused label.
* src/pshinter/pshalgo3.c (psh3_hint_align): Remove unused variable.
2002-09-17 07:31:17 +00:00
Werner Lemberg 1313646d65 Making ftgrays.c compile stand-alone again.
* include/freetype/ftimage.h: Include ft2build.h only if _STANDALONE_
isn't defined.
* src/smooth/ftgrays.c [_STANDALONE_]: Define ft_memset,
FT_BEGIN_HEADER, FT_END_HEADER.
(FT_MEM_ZERO): Define.
(TRaster) [GRAYS_USE_GAMMA]: Use `unsigned char' instead of FT_Byte.
(gray_render_span, gray_init_gamma): Don't use `FT_UInt'.
Don't cast with `FT_Byte'.
(grays_init_gamma): Don't use `FT_UInt'.

* src/base/ftinit.c (FT_Add_Default_Modules): Improve error message.
* src/pcf/pcfdriver.c (PCF_Face_Done): Improve tracing message.
* include/freetype/config/ftoption.h (FT_MAX_MODULES): Increased
to 32.
2002-09-16 06:15:31 +00:00
David Turner 9bd0e4e8c3 cosmetic + typo fixes 2002-09-11 06:13:09 +00:00
Werner Lemberg ae13a79327 * builds/unix/configure.ac (version_info): Set to 9:2:3.
* builds/unix/configure: Regenerated.
* docs/VERSION.DLL: Updated.
2002-09-10 15:17:32 +00:00
David Turner 8bea7d263b * src/cache/ftccache.i: fixed a bug that prevented compilation in
debug mode of template instantiation

        * src/cff/cffparse.c: fixed the CFF table loader. It didn't accept
        empty arrays, and this prevented the loading of certain fonts.

        * src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.c: adding fix to
        prevent seg fault when hints are provided in an empty glyph !!

        * include/freetype/ftimage.h: removed incorrect "zft_" definitions
        and updated constants documentation comments

        * include/freetype/freetype.h (FT_FaceRec): updating documentation
        comment. The "descender" value is always *negative*, not positive !
2002-09-09 23:45:29 +00:00
David Turner 2e22c90f78 * src/smooth/ftsmooth.c, src/base/ftobjs.c,
include/freetype/config/ftmodule.h: updated to correctly support
        sub-pixel rendering

        * include/freetype/cache/ftcimage.h, include/freetype/cache/ftcsbits.h,
        src/cache/ftcimage.c, src/cache/ftcsbit.c: updated to support sub-pixel
        rendering correctly. Definition of FTC_ImageTypeRec that replaces the
        obsolete FTC_ImageDesc, and has slightly different fields. The
        image type is now determined directly by "load_flags" values.

        * src/autohint/ahtypes.h, src/autohint/ahhint.c,
        src/pshinter/pshalgo3.c, src/pshinter/pshalgo3.h: various enhancements
        to the automatic and Postscript hinters !! and sub-pixel hinting now
        works correctly (see demo programs)
2002-09-08 21:29:11 +00:00
Werner Lemberg d6f74d3b66 * src/cid/cidobjs.c (CID_Size_Init): Renamed to...
(cid_size_init): This.
* src/psaux/psobjs.c (T1_Builder_Add_Point1): Renamed to...
(t1_builder_add_point1): This.

Updated all affected code.

* src/pshinter/pshalgo3.c (psh3_hint_align): Fix compiler warnings.
* src/type1/t1gload.c (T1_Compute_Max_Advance): Ditto.

Formatting, minor doc fixes.
2002-09-05 15:10:54 +00:00
David Turner 98b3d453f4 * include/freetype/freetype.h: corrected the definition of
ft_encoding_symbol to be FT_ENCODING_MS_SYMBOL (instead of
    the erroneous FT_ENCODING_SYMBOL)

    * builds/unix/unix-def.in: added "datadir" definition
    (thanks to Anthony Fok)
2002-09-04 19:58:47 +00:00
David Turner df5bc9e1e7 * README, docs/CHANGES: updating for the 2.1.3 release 2002-08-29 23:18:56 +00:00
David Turner b40b8d6eda * src/pshinter/pshalgo.c: slight modification to the Postscript hinter
to slightly increase the contrast of smooth hinting. This is very similar
    to what the auto-hinter does when it comes to stem width computations.
    However, it produces better results with well-hinted fonts..
2002-08-29 22:50:17 +00:00
David Turner 71afa750bf updating sources to support the new FT_LOAD_TARGET_ constants
to support target-specific hinting
2002-08-27 22:34:20 +00:00
David Turner b16ccfc5a7 * massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical
    transformations of the sources:

      - trying to convert all enums and constants to CAPITALIZED_STYLE, with
        #define definitions like

          #define  my_old_constants   MY_NEW_CONSTANT

      - big, big update of the documentation comments

    * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
    include/freetype/ftimage.h: adding support for LCD-optimized rendering
    though the new constants/enums:

      FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
      FT_PIXEL_MODE_LCD,  FT_PIXEL_MODE_LCD_V

    this is still work in progress, don't expect everything to work correctly
    though most of the features have been implemented.

    * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
    targets:

      FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
      FT_LOAD_TARGET_MONO   :: monochrome bitmaps
      FT_LOAD_TARGET_LCD    :: horizontal RGB/BGR decimated hinting & rendering
      FT_LOAD_TARGET_LCD_V  :: vertical RGB/BGR decimated hinting & rendering

    note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
    behaviour of the font engine is _unchanged_.
2002-08-27 20:20:29 +00:00
Werner Lemberg 76b5a0f039 * docs/VERSION.DLL: New file. 2002-08-27 16:51:02 +00:00
Graham Asher fa86624708 Noted latest changes to CFF sources. 2002-08-23 10:24:19 +00:00
Graham Asher 2bf4825234 Simplified the incremental loading system for CFF fonts and fixed
a problem with the handling of the deprecated version of the Type 2
endchar command, that emulates Type 1 'seac'.
This version now works with the GhostScript-to-FreeType bridge
currently under development.
2002-08-23 10:08:38 +00:00
David Turner 2a54188114 * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c,
src/bdf/bdfdrivr.c: removed compiler warnings
2002-08-22 20:35:36 +00:00
Werner Lemberg be1c47c417 Formatting. 2002-08-22 08:49:42 +00:00
Werner Lemberg b6cdf566df * src/pshinter/pshalgo3.c (psh3_glyph_compute_inflections,
psh3_glyph_compute_extrema, psh3_hint_table_find_strong_point): Fix
compiler warnings and resolve shadowing of local variables.
2002-08-22 06:04:32 +00:00
David Turner 0ca0d9773e * src/pshinter/pshalgo3.c, src/base/ftobjs.c, src/base/ftobject.c,
src/autohint/ahglyph.c, include/freetype/freetype.h: fixing typos
        and removing compiler warnings
2002-08-21 22:06:41 +00:00
David Turner ee18cba61b * include/freetype/freetype.h, src/base/ftobjs.c: changing the type
of the "load_flags" parameter of FT_Load_Glyph and FT_Load_Char from
        "FT_Int" to "FT_Int32", this in order to support more options.

        this should only break binary and/or source compatibility on
        16-bit platforms (Atari?)
2002-08-21 21:39:28 +00:00
David Turner 1b8d70a362 * src/tools/docmaker/docmaker.py, src/tools/docmaker/utils.py,
src/tools/docmaker/tohtml.py: updating the DocMaker tool
2002-08-21 21:36:26 +00:00
David Turner 7afd3d6b6f * src/pshinter/pshalgo3.c, src/autohint/ahangles.c,
src/autohint/ahangles.h, src/autohint/ahglyph.c, src/autohint/ahhint.c,
        src/autohint/ahtypes.h: the automatic and Postscript hinter now
        automatically detect inflection points in glyph outlines and treats
        them specially. This is very useful to prevent nasty effect like the
        disappearing diagonals of "S" and "s" in many, many fonts..
2002-08-21 21:34:59 +00:00
Werner Lemberg 8cb11c96f0 * src/truetype/ttgload.c (TT_Get_Metrics): Add guard for k = 0. 2002-08-21 17:36:20 +00:00
David Turner fab5018b69 - removal of compiler warnings
- slight improvements to the Postscript hinter
2002-08-19 06:06:44 +00:00
Werner Lemberg 0e36c31d73 * builds/unix/install.mk (install, uninstall): Add $(DESTDIR) to
make life easier for package maintainers.
2002-08-19 02:25:43 +00:00
Werner Lemberg 4eb2427c04 * src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of
horiBearingX.
* src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of
horiBearingY.
2002-08-18 22:02:03 +00:00
Werner Lemberg 2179bf347c Adding some comments. 2002-08-18 07:15:52 +00:00
Werner Lemberg b4816762c3 Add support for Apple composite glyphs.
* include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED): New macro.

* src/truetype/ttgload.c (OVERLAP_COMPOUND, SCALED_COMPONENT_OFFSET,
UNSCALED_COMPONENT_OFFSET): New macros for additional OpenType
glyph loading flags.
(load_truetype_glyph): Implement it.
2002-08-16 12:46:52 +00:00
Werner Lemberg 88ef7593f4 * src/cff/cffgload.c (cff_free_glyph_data),
src/cff/cffload.c (cff_font_load): Use FT_UNUSED.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Initialize `error'.
* src/sfnt/sfobjs.c (SFNT_Load_Face): Fix compiler warning.
2002-08-15 23:07:18 +00:00
Graham Asher d9cb9eac7c Fixed compiler warnings about unreferenced formal parameters when
FT_CONFIG_OPTION_INCREMENTAL is not defined.
2002-08-15 12:58:21 +00:00
Graham Asher c39c3eed31 Noted latest changes to incremental font lolading system. 2002-08-15 12:24:21 +00:00
Graham Asher dfe94fa353 Corrected incremental interface implementation to suit the new system. 2002-08-15 12:15:08 +00:00
Graham Asher 40a72ccbf3 Implemented incremental loading for the CFF driver. 2002-08-15 12:10:48 +00:00
Werner Lemberg cbfc97910e Some formatting.
* src/cff/cffcmap.c: Remove compiler warnings.
* src/cache/ftccache.c, src/cache/ftccache.i,
src/pfr/pfrload.c, src/pfr/pfrgload.c: s/index/idx/.
* src/cff/cffload.c: s/select/fdselect/.
* src/raster/ftraster.c: s/wait/waiting/.
2002-08-06 21:47:40 +00:00
Graham Asher ef8bd8336a Commented latest change to t1load.c. 2002-08-01 16:20:06 +00:00
Graham Asher 2d54c604c7 T1_Open_Face now tolerates a face with no charstrings if there is
an incremental loading interface. This is essential if incremental
loading of Type 1 fonts supplied by PostScript is to work.
2002-08-01 16:16:16 +00:00
Graham Asher 72aebdeecb Added note about latest changes to incremental interface. 2002-08-01 15:36:50 +00:00
Graham Asher 25875e7f6d Modified incremental loading interface to be closer to David Turner's
preferences. The header freetype.h is not now affected, the interface is
specified via an FT_Parameter, the pointer to the interface is hidden in an
internal part of the face record, and all the definitions are in ftincrem.h.
2002-08-01 15:29:17 +00:00
David Turner 5ea78be3a5 * src/tools/docmaker/*: adding new (more advanced) version of
the DocMaker tool. Python with regular expressions rocks..
2002-07-30 18:49:52 +00:00
David Turner 1ff88d285d * include/freetype/ftincrem.h: adding new experimental header file
to demonstrate a "cleaner" API to support incremental font loading.
        comments appreciated...
2002-07-30 18:42:29 +00:00
Werner Lemberg 5e6cd65d5f s/ft_memset/FT_MEM_SET/.
s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.
2002-07-28 05:05:24 +00:00
Werner Lemberg eb812c6c72 * src/sfnt/ttload.c (sfnt_dir_check): Make it work with TTCs. 2002-07-27 22:51:28 +00:00
Werner Lemberg 51476b553a * src/pshinter/pshalgo3.c (psh3_hint_table_record,
psh3_hint_table_init, psh3_hint_table_activate_mask): Fix error
message.

Formatting.
2002-07-26 14:52:29 +00:00
Werner Lemberg c5f6cd72f6 Fixing ChangeLog entries.
Some formatting.

* src/truetype/ttgload.c (load_truetype_glyph)
[FT_CONFIG_OPTION_INCREMENTAL]: s/memset/ft_memset/.

* src/autohint/ahhint.c (ah_hint_edges_3): Fix compiler warning.
* src/cff/cffload.c (cff_encoding_load): Remove `memory' variable.
* src/cff/cffcmap.c (cff_cmap_encoding_init): Remove `psnames'
variable.
* src/truetype/ttgload.c (load_truetype_glyph): Remove statement
without effect.
* src/truetype/ttdriver (Get_Char_Index, Get_Next_Char): Removed.
2002-07-26 09:09:10 +00:00
Graham Asher 2ed0ddbca8 Changed some tabs to spaces in changelog. 2002-07-25 09:21:54 +00:00
Graham Asher 58ac8536f8 Fixed silly date error in change log. 2002-07-25 09:20:19 +00:00
Graham Asher 99022957ac Added missing log entry for incremental font loading changes made
on 18th July 2002.
2002-07-25 09:17:46 +00:00
Graham Asher 4794b0a511 logged latest change to ttobjs.c 2002-07-24 18:38:45 +00:00
Graham Asher eb1b83dd9e FIX for bug reported by Sven Neumann [sven@gimp.org] on the FreeType
development forum: "If FT_CONFIG_OPTION_INCREMENTAL is undefined
(this is the default), the TrueType loader crashes in line 852 of
src/truetype/ttgload.c when it tries to access face->glyph_locations.".
2002-07-24 13:58:21 +00:00
Graham Asher b05492404d More work on supporting fonts passed from GhostScript:
sfnt_dir_check now ignores the tables 'glyx' and 'locx' which are hacked-out
versions of 'glyf' and 'loca' in some PostScript Type 42 fonts, and will
generally be invalid.
2002-07-19 11:40:51 +00:00
Graham Asher 48c0188aa1 Added support for incrementally loaded Type 1 faces. 2002-07-18 16:57:43 +00:00
Graham Asher e975b6fd90 Changes to support incremental Type 42 fonts: assume a font has glyphs if it
has an incremental interface object.
2002-07-18 16:38:07 +00:00
Graham Asher 3849f2388a Added the incremental loading system for the CID driver.
Tested using my own unit test code.
2002-07-18 16:25:57 +00:00
Graham Asher 4c7d53a3f4 Added the incremental loading system for the TrueType driver.
Tested using my own unit test code.
2002-07-18 15:59:23 +00:00
Graham Asher 75aafd36f3 Added incremental loading capability to FT_Open_Face.
Not implemented for any drivers yet.
2002-07-18 15:04:29 +00:00
Graham Asher 80471f8259 FT_CONFIG_OPTION_INCREMENTAL is now used to compile
incremental loading stuff conditionally.
2002-07-18 15:03:11 +00:00
Graham Asher 776b0ffc32 Added a new configuration macro, FT_CONFIG_OPTION_INCREMENTAL,
to enable incremental face loading. By default it is not defined.
2002-07-18 15:02:08 +00:00
Graham Asher b68af36750 Added types and structures to support incremental typeface loading. 2002-07-18 14:05:19 +00:00
David Turner feb854fd8a * src/sfnt/ttload.c (TT_Load_SFNT_Header): fixed a recent bug that prevented
OpenType fonts to be recognized by FreeType
2002-07-17 22:51:06 +00:00
David Turner ceef1e4e05 * include/freetype/config/ftoption.h, include/freetype/internal/tttypes.h,
src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffobjs.c,
    src/pcf/pcfdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
    src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c,
    src/type42/t42objs.c, src/winfonts/winfnt.c: code cleanup,
    FT_CONFIG_OPTION_USE_CMAPS is now the default
2002-07-17 21:52:20 +00:00
David Turner bd65ed97aa * include/freetype/config/ftoption.h, include/freetype/internal/tttypes.h,
src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffobjs.c,
    src/pcf/pcfdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
    src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c,
    src/type42/t42objs.c, src/winfonts/winfnt.c: code cleanup,
    FT_CONFIG_OPTION_USE_CMAPS is now the default
2002-07-17 21:14:23 +00:00
David Turner 33847031d3 * include/freetype/cache/ftccache.h, src/cache/ftccache.i,
src/cache/ftccache.c: cleaning up the cache sub-system code, linear
    hashing is now the default
2002-07-17 20:56:48 +00:00
David Turner 6d1a81a940 small fix 2002-07-11 23:55:18 +00:00
David Turner 60b8b532c7 small fix 2002-07-11 23:51:44 +00:00
David Turner 0f20eb2e5d * src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttdriver.c: changing
the SFNT loader to check for SFNT-based font files differently. We now
    ignore the range "helper" fields and check the "head" table's magic
    number instead.
2002-07-11 23:41:14 +00:00
David Turner 2ade80c8e9 updatinf the object sub-system and dynamic hash table implementations 2002-07-11 16:27:16 +00:00
David Turner 7f12a7fba2 * include/freetype/t1tables.h, include/freetype/internal/psaux.h,
src/psaux/psobjs.c, src/type1/t1load.c, src/type1/t1tokens.h:
    fixing a bug in the Type 1 loader that prevented valid font bounding
    boxes to be loaded from multiple master fonts.
2002-07-11 11:26:21 +00:00
David Turner ca6ddd42ee * src/cff/cffobjs.c: small fix to select the Unicode charmap by default
when needed
2002-07-10 17:10:21 +00:00
David Turner a5b3516610 * src/cff/cffobjs.c: small fix to allow OpenType fonts to support Adobe
charmaps when needed.
2002-07-10 16:58:10 +00:00
David Turner b0cea53b7a * src/cff/cffcmap.c, src/cff/cffcmap.h, Jamfile, rules.mk: new files added
to support charmaps for CFF fonts

    * src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
    src/cff/cffobjs.h, src/cff/cffparse.c, src/cffparse.h, src/cff/cffgload.c,
    src/cff/cffgload.h: adding support for CFF charmaps, reformatting the
    sources, and removing some bugs in the Encoding and Charset loaders
2002-07-10 16:52:06 +00:00
David Turner 268c63835d * src/pshinter/pshglob.c: fixed a bug that prevented the hinter from using
correct standard width and height values. resulting in hinting bugs with
    certain fonts (e.g. Utopia)
2002-07-09 16:49:12 +00:00
David Turner 038ca644a3 * src/pshinter/pshglob.h, src/pshinter/pshglob.c: adding support for
blue fuzz
2002-07-08 23:13:25 +00:00
David Turner e2903b7f80 * src/base/ftglyph.c (FT_Glyph_To_Bitmap): added code to return succesfully
when the function is called with a bitmap glyph (the previous code simply
    returned with an error)
2002-07-08 23:05:14 +00:00
David Turner 218867e4d8 * docs/DEBUG.TXT: adding debugging support documentation
* src/base/ftdebug.c (ft_debug_init), builds/win32/ftdebug.c
    (ft_debug_init), builds/amiga/src/ftdebug.c (ft_debug_init): changed the
    syntax of the FT2_DEBUG environment variable  used to control debugging
    output (i.e. logging and error messages). It must now look like:

       any:6 memory:4 io:3   or
       any:6,memory:4,io:3   or
       any:6;memory:4;io:3
2002-07-08 23:02:32 +00:00
David Turner 32e50721bd * include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
    freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
    src/cff/cffgload.c, src/pshinter/pshalgo1.h, src/pshinter/pshalgo1.c,
    src/pshinter/pshalgo2.h, src/pshinter/pshalgo2.c, src/pshinter/pshalgo3.h,
    src/pshinter/pshalgo3.c: Adding support for hinter-specific bit flags,
    and the new FT_Set_Hint_Flags high-level API
2002-07-08 22:26:11 +00:00
David Turner cb818320b8 * src/pfr/pfrobjs.c (pfr_slot_load): fixed a small bug that returned
incorrect advances when the outline resolution was different from the
    metrics resolution

    * src/autohint/ahhint.c: removing compiler warnings

    * src/autohint/ahglyph.c: slight improvements to the serif detection
    code. More work is needed though..
2002-07-05 15:54:26 +00:00
David Turner e32a9be04b 2002-07-03 David Turner <david@freetype.org>
* src/autohint/ahglobal.c, src/autohint/ahtypes.h, src/autohint/ahhint.c:
    small improvements to the automatic hinter. un-even stem-widths have now
    disappeared and everything looks much better, even if there are still
    issues with serifed fonts.
2002-07-04 22:48:12 +00:00
David Turner f9334dae32 adding Owen Taylor's patches to the Postscript hinter for testing 2002-07-03 21:00:26 +00:00
David Turner 9a08f7054d where, if a glyph has more than hint mask, the second mask
gets applied to points that should have been covered by the
first mask.
2002-07-01 21:57:36 +00:00
David Turner 83d138a8e4 adding path stroker 2002-07-01 21:54:30 +00:00
David Turner 3a2d0118b8 * include/freetype/ftstroker.h, src/base/ftstroker.c, src/base/Jamfile:
adding path stroker component (work in progress)
2002-07-01 21:53:54 +00:00
David Turner 0f1af443cf formatting 2002-07-01 21:52:49 +00:00
David Turner bd52a2eabe * src/sfnt/ttcmap0.c: fixing the cmap 8 and 12 parsing routines 2002-07-01 21:50:12 +00:00
David Turner 5e5f6cebf3 * include/freetype/fttrigon.h, src/base/fttrigon.c: adding
FT_Vector_From_Polar and FT_Angle_Diff to the trigonometric functions
2002-07-01 21:35:17 +00:00
David Turner 2b47da133a * include/freetype/internal/ftobject.h: updating the object sub-system
definitions (still experimental)
2002-07-01 21:34:07 +00:00
David Turner 4302b4a7dd * include/freetype/ftsynth.h, src/base/ftsynth.c: rewriting the automatic
style synthesis functions, now renamed to FT_GlyphSlot_Oblique and
    FT_GlyphSlot_Embolden
2002-07-01 21:33:48 +00:00
David Turner a9e94e7b47 * include/freetype/internal/ftobject.h: updating the object sub-system
definitions (still experimental)

    * src/base/fthash.c (ft_hash_remove): fixing a small reallocation bug

    * include/freetype/fttrigon.h, src/base/fttrigon.c: adding
    FT_Vector_From_Polar and FT_Angle_Diff to the trigonometric functions

    * include/freetype/ftstroker.h, src/base/ftstroker.c: adding path stroker
    component (work in progress)
2002-06-26 23:45:21 +00:00
David Turner b2186bc2ba adding path stroker component (first steps) 2002-06-26 22:05:05 +00:00
David Turner 4b55574b89 * src/truetype/ttgload.c (TT_Load_Composite_Glyph),
src/base/ftoutln.c (FT_Vector_Transform): fixed Werner's latest
        fix. FT_Vector_Transform wasn't buggy, the TrueType composite loader
        was...
2002-06-26 20:30:37 +00:00
Werner Lemberg 666a663c76 Added release info. 2002-06-26 11:26:59 +00:00
Werner Lemberg bf03e761c3 Minor fixes and grammatical corrections/additions. 2002-06-26 05:58:24 +00:00
Werner Lemberg 086c27a3cf * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3. 2002-06-25 21:37:30 +00:00
David Turner c79b8cacdc documentation updates for 2.1.2 2002-06-23 10:57:31 +00:00
Werner Lemberg 60308d3400 Minor fixes. Formatting. 2002-06-22 13:35:41 +00:00
David Turner ff16618cc9 * include/freetype/internal/t42types.h, src/base/fttype1.c,
src/type42/t42objs.h: removed duplicate definition of T42_FaceRec
2002-06-22 10:07:24 +00:00
David Turner ad6568afe9 * src/pfr/pfrgload.c (pfr_glyph_load_compound): fixing a small composite
glyph loader bug that caused accents to be misplaced in a number of
    glyphs..
2002-06-22 09:36:53 +00:00
David Turner 21d5e8e715 preparing for the 2.1.2 release 2002-06-21 07:42:50 +00:00
David Turner 1c8902d036 * README, docs/CHANGES: preparing for the 2.1.2 release 2002-06-21 07:42:02 +00:00
David Turner 2b55098f1e * src/pfr/pfrobjs.h, src/pfr/pfrobjs.c, src/pfr/pfrload.c,
src/pfr/pfrtypes.h: adding Kerning support to the PFR driver
2002-06-21 07:33:23 +00:00
Werner Lemberg dd5436fbb2 * src/base/fttype1.c: Include FT_INTERNAL_TYPE42_TYPES_H.
(t1_face_check_cast): Removed.
(FT_Get_PS_Font_Info): Make it work with CID and Type 42 drivers
also.

* src/type42/t42parse.c (t42_parse_sfnts): Fix compiler warning.
2002-06-20 21:03:48 +00:00
Werner Lemberg 7395da84dd * src/base/ftoutln.c (FT_Vector_Transform): Fix serious typo
(xy <-> yx).
* src/truetype/ttgload.c (load_truetype_glyph): Replace `|' with
`||' to make code easier to read.
2002-06-20 10:57:04 +00:00
Werner Lemberg 5d52c90501 * src/type42/t42objs.c (t42_check_size_change): Removed.
(T42_Size_SetChars, T42_Size_SetPixels): Use FT_Activate_Size
instead.
(T42_GlyphSlot_Load): Remove call to t42_check_size_change.
2002-06-19 19:43:15 +00:00
Werner Lemberg d594a7012b * src/psaux/t1cmap.c (t1_cmap_custom_char_index,
t1_cmap_custom_char_next): Fix index computation -- indices start
with 0 and not with cmap->first.

Provide default charmaps.

* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
(PCF_Face_Init), src/pfr/pfrobjs.c (pfr_face_init),
src/type1/t1objs (T1_Face_Init), src/winfonts/winfnt.c
(FNT_Face_Init): Implement it.
2002-06-19 15:57:55 +00:00
Werner Lemberg 73ffc7a0ea * src/pfr/pfrobjs.c (pfr_face_init): Fix typo. 2002-06-18 20:30:13 +00:00
Leonard Rosenthol 27067c41c0 Added note about VC++ project update 2002-06-18 16:53:39 +00:00
Leonard Rosenthol 0dedbac8ef Added the PFR module 2002-06-18 16:51:23 +00:00
Werner Lemberg 44e1262f1b Install freetype2.m4.
* builds/unix/install.mk (install, uninstall): Handle it.

Fix glyph indices for PFR driver.

* src/pfr/pfrcmap.c (pfr_cmap_char_index, pfr_cmap_char_next):
Increase return value by 1.
* src/pfr/pfrobjs.c (pfr_slot_load): Decrease index by 1.
2002-06-17 08:01:32 +00:00
Werner Lemberg 4c1c87af69 Fix glyph indices to make index zero always the undefined glyph.
* src/bdf/bdfdrivr.c (bdf_cmap_init): Don't decrease
cmap->num_encodings.
(bdf_cmap_char_index, bdf_cmap_char_next, BDF_Get_Char_Index):
Increase result by 1 for normal cases.
(BDF_Glyph_Load): Decrease index by 1.

* src/pcf/pcfdriver.c (pcf_cmap_char_index, pcf_cmap_char_next,
PCF_Char_Get_Index): Increase result by 1 for normal cases.
(PCF_Glyph_Load): Decrease index by 1.
* src/pcf/pcfread.c (pcf_get_encodings): Don't decrease j for
allocating `encoding'.

* src/base/ftobjs.c (FT_Load_Glyph, FT_Get_Glyph_Name): Fix
bounding tests.
2002-06-16 01:14:16 +00:00
Werner Lemberg ec6a0a1612 Add new cmap support to BDF driver
* src/bdf/bdfdrivr.c (BDF_CMapRec) [FT_CONFIG_OPTION_USE_CMAPS]:
New structure.
(bdf_cmap_init, bdf_cmap_done, bdf_cmap_char_index,
bdf_cmap_char_next) [FT_CONFIG_OPTION_USE_CMAPS]: New functions.
(BDF_Get_Char_Index) [!FT_CONFIG_OPTION_USE_CMAPS]: Use only
conditionally.
(BDF_Face_Init): Handle `AVERAGE_WIDTH' and `POINT_SIZE' keywords.
Implement new cmap handling.
(bdf_driver_class): Updated.
2002-06-14 08:54:02 +00:00
Werner Lemberg 2f3bdf9158 * Makefile, configure, */*.mk, builds/unix/unix-def.in,
docs/CHANGES, docs/INSTALL: s/TOP/TOP_DIR/.
2002-06-14 08:09:25 +00:00
Werner Lemberg 96be66c86f Typo. 2002-06-12 18:40:30 +00:00
Werner Lemberg 5e8f5b4068 * src/bdf/bdflib.c: s/FT_Short/short/ for consistency. 2002-06-12 08:43:58 +00:00
David Turner 78a6c64069 * builds/win32/ftdebug.c: added a missing #endif
* src/sfnt/ttload.c, src/bdf/bdflib.c: removing compiler warnings

        * src/type42/t42objs.c: removed the bug that prevented un-hinted
        outlines to be loaded
2002-06-11 20:35:58 +00:00
Werner Lemberg fb571201e7 Minor fixes. 2002-06-11 06:53:15 +00:00
David Turner 6e09a971b5 * include/freetype/internal/ftobjs.h, src/autohint/ahglyph.c,
src/base/ftobjs.c, src/objs/fttype1.c, src/sfnt/ttcmap0.c,
    src/smooth/ftgrays.c: changed uses of "setjmp" and "longjmp"
    to "ft_setjmp" and "ft_lonjmp". Removed direct references to
    <stdio.h> and <setjmp.h> when appropriate, to eventually replace
    them with a FT_CONFIG_STANDARD_LIBRARY_H. Useful for the XFree86
    Font Server backend based on FT2.
2002-06-10 23:03:35 +00:00
David Turner dd7573e087 * src/pcf/pcfdriver.c (pcf_cmap_char_next): fixed a bug that caused
the function to return invalid values.
2002-06-10 22:41:57 +00:00
Werner Lemberg 97a91951c3 New file. 2002-06-08 14:23:50 +00:00
David Turner 361c4dc153 fixed a typo in "src/cache/ftccache.i"
fixed a nasty bug in "src/cache/ftccache.c" (ftc_node_hash_unlink)
2002-06-08 13:51:18 +00:00
David Turner 426b4aa8ba - removing a typo in ftccache.i that prevented it from compiling correctly
- fixed the infamous bug that caused the cache to crash with large fonts.
  the hash table buckets array wasn't shrinked correctly during cache
  flushes..
2002-06-08 13:48:41 +00:00
Werner Lemberg 57127f73b9 * src/cache/ftccache.i (GEN_CACHE_LOOKUP): Move declaration of
`family' and `hash' up to make it compilable with g++.
2002-06-08 12:50:18 +00:00
Werner Lemberg 6bd6cbead3 * builds/amiga/smakefile, builds/amiga/makefile: Updated. 2002-06-08 12:33:57 +00:00
Werner Lemberg c5fcfdf651 * src/cache/ftccache.c (ftc_node_hash_unlink, ftc_node_hash_link)
[FTC_CACHE_USE_LINEAR_HASHING]: Fix returned error code.
Fix debugging messages.

* src/type42/t42error.h: New file.
* src/type42/t42drivr.c, src/type42/t42objs.c,
src/type42/t42parse.c: Use t42 error codes.
* src/type42/rules.mk: Updated.

* src/base/ftnames.c: Include FT_INTERNAL_STREAM_H.

Formatting, adding copyright messages.
2002-06-08 06:47:18 +00:00
David Turner f7eaf21d8d adding template cache lookup routine 2002-06-08 01:06:31 +00:00
David Turner 441dba8fe9 commit last fixes and optimisations to the cache manager.
The performance of cache hits has increased between 20 and 50% !!
2002-06-08 01:05:56 +00:00
David Turner 59c5aa5e7d debugging new cache hash table implementation 2002-06-07 22:09:20 +00:00
David Turner 7b53ba57a4 * include/freetype/cache/ftccache.h, src/cache/ftccache.c,
src/cache/ftccache.i, src/cache/ftcsbits.c: adding various
          experimental optimisations to the cache manager

        * src/type42/t42parse.c: removing duplicate function
2002-06-07 20:07:44 +00:00
David Turner cf67f6f707 * src/base/ftobjs.c (FT_Render_Glyph_Internal): changed definition
from FT_EXPORT_DEF to FT_BASE_DEF
2002-06-07 07:24:55 +00:00
David Turner 2ef2d507c2 * src/type42/t42drivr.c, src/type42/t42drivr.h, src/type42/t42parse.c,
src/type42/t42parse.h, src/type42/t42objs.h, src/type42/t42objs.c,
          src/type42/type42.c:

            updated the Type42 driver by splitting it into several files since
            it makes the code easier to read and maintain. Also fixed the bug
            that prevented the correct display of fonts with "ftview"
2002-06-07 07:23:06 +00:00
Werner Lemberg 48426ab477 Add 8bpp support.
* src/bdf/bdflib.c (_bdf_parse_start): Handle 8bpp.
* src/bdf/bdfdrivr.c (BDF_Glyph_Load): Ditto.
* src/bdf/README: Updated.
2002-06-03 20:01:23 +00:00
Werner Lemberg 153ba3f903 * src/pfr/pfrload.c (pfr_phy_font_done): Free `blue_values' array. 2002-06-02 12:11:48 +00:00
Werner Lemberg e4decd8385 * src/bdf/bdflib.c (_bdf_readstream): Allocate `buf' dynamically.
(_bdf_parse_glyphs): Use correct size for allocating
`font->unencoded'.
(bdf_load_font): Free array conditionally.
Return proper error code in case of failure.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Make it more robust against
unusual fonts.
2002-05-30 19:29:41 +00:00
Werner Lemberg 226e85462e * src/bdf/descrip.mms, src/type42/descrip.mms: New files.
* descrip.mms (all): Updated.

* src/bdf/bdflib.c (_bdf_parse_glyphs): Fix typo which prevented
compilation.
* src/pshglob.c (psh_blues_scale_zones): Fix compiler warning.
2002-05-30 19:22:14 +00:00
David Turner a2490050cc * docs/CHANGES: updating file for upcoming release (2.1.1)
* src/bdf/bdflib.c: removing compiler warnings
2002-05-28 23:40:37 +00:00
Werner Lemberg b4d3441b44 * builds/amiga/makefile, builds/amiga/smakefile,
amiga/include/freetype/config/ftmodule.h: Updated to include
support for BDF and Type42 drivers.

* docs/modules.txt: Updated.

* src/bdf/bdflib.c (_bdf_parse_glyphs): Replace floating point math
with calls to `FT_MulDiv'.
2002-05-28 22:38:05 +00:00
David Turner 2359a38374 * include/freetype/ftxf86.h, src/base/ftxf86.c: added a new API named
FT_Get_X11_Font_Format to return an X11-compatible string describing the
    font format of a given face. This was put in a new optional base source
    file, corresponding to a new public header (named FT_XFREE86_H since
    this function should only be used within the XFree86 font server IMO).

    * include/freetype/config/ftheader.h: adding FT_XFREE86_H, though it's
    not documented yet.

    * include/freetype/t1tables.h, src/base/fttype1.c: adding two new APIs
    named "FT_Get_PS_Font_Info" and "FT_Has_PS_Glyph_Names". This required
    a new optional source in 'src/base' named "fttype1.c"

    * src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: updating
    build control files for the new files "ftxf86.c" and "fttype1.c" in
    src/base
2002-05-28 22:07:49 +00:00
David Turner 0cb062ae96 formatting 2002-05-28 21:41:29 +00:00
David Turner 8a489ece90 * src/pshinter/pshglob.c (psh_blues_scale_zones): fixed a bug that
prevented family blue zones substitution from hapenning correctly
2002-05-28 20:29:12 +00:00
David Turner 44c8f9b6c4 * include/freetype/ftbdf.h: adding documentation comments for the
API reference describing the new function FT_Get_BDF_Charset_ID.
2002-05-28 20:14:28 +00:00
Werner Lemberg aa9b8506c4 * src/base/ftnames.c (FT_Get_Sfnt_Name): Don't use FT_STREAM_READ_AT
but FT_STREAM_READ.
Declare `stream' variable.
2002-05-28 06:03:10 +00:00
David Turner c9d2024e0e * include/freetype/internal/tttypes.h, src/sfnt/ttload.c,
src/sfnt/sfobjs.c, src/sfnt/sfdriver.c, src/base/ftnames.c:
        fixing the SFNT name table loader to support various buggy fonts.
        it now ignores empty name entries, entries with invalid pointer
        offsets and certain fonts containing tables with broken "storageOffset"
        fields.

        name strings are now loaded on demand, which reduces the memory
        requirements for a given FT_Face tremendously (for example, the
        name table of Arial.ttf is about 10Kb and contains 70 names !!)

        finally, this is a _quick_ fix. The whole name table loader and
        interface will be rewritten in a much more cleanly way shortly,
        once CSEH have been introduced in the sources.
2002-05-27 23:52:01 +00:00
Werner Lemberg 76a047f544 Fix comment. 2002-05-27 13:02:37 +00:00
Werner Lemberg 2523267c59 * builds/unix/ft-munmap.m4: New file, extracted FT_MUNMAP_DECL and
FT_MUNMAP_PARAM from aclocal.m4 into here, so aclocal.m4 can be
rebuilt from sources.  Set macro serial to 1, and use third argument
to AC_DEFINE for our two custom symbols, so ftconfig.in could one day
be rebuilt with autoheader (not recommended now, ftconfig.in is a
custom source file)
2002-05-24 22:05:43 +00:00
Werner Lemberg 7cd606a68d * include/freetype/config/ftheader.h (FT_BEZIER_H): Removed.
(FT_BDF_H): New macro for accessing `ftbdf.h'.

* src/type42/t42drivr.c (hexval): Fix typo.
2002-05-22 05:41:06 +00:00
Werner Lemberg 4ea7621019 * src/psaux/psobjs.c (T1Radix): New function.
(t1_toint): Use it to handle numbers in radix format.

* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Add dummy
for undocumented, obsolete opcode 15.
2002-05-22 04:53:25 +00:00
David Turner b3971ae105 * src/bdf/bdflic.c: removed compiler warning, and changed all tables
to the "static const" storage specifier (instead of simply 'static')

        * src/type42/t32drivr.c, src/bdf/bdfdrivr.c:
          removing compiler warnings
2002-05-21 21:17:43 +00:00
David Turner 33ea194266 * src/type42/t32drivr.c: removing compiler warnings 2002-05-21 20:57:36 +00:00
David Turner 75aafb5021 * include/freetype/internal/ftbdf.h, src/base/ftbdf.c,
src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk:

          Adding a new API called "FT_Get_BDF_Charset_ID" to retrieve
          BDF-specific strings from a face. This is much cleaner
          than accessing the internal types "BDF_Public_Face" defined in
          FT_INTERNAL_BDF_TYPES_H
2002-05-21 20:50:53 +00:00
Werner Lemberg 1b547d80d6 * src/bdf/README: Mention Microsoft's SBIT tool.
* src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c,
src/winfonts/winfnt.c, src/type42/t42drivr.c, src/bdf/bdfdrivr.c
[FT_CONFIG_OPTION_DYNAMIC_DRIVERS]: Completely removed.  It has
been never used.
2002-05-21 20:22:59 +00:00
Werner Lemberg a4540bb98a * src/type42/t42drivr.c: s/T42_ENCODING_TYPE_/T1_ENCODING_TYPE_/.
(parse_font_matrix): Remove unnecessary code.
(parse_sfnts): Initialize some variables.
(t42_driver_class) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Use
ft_module_driver_has_hinter conditionally.
Moved some type 42 specific structure definitions to...
* include/freetype/internal/t42types.h: New file.
* include/freetype/internal/internal.h (FT_INTERNAL_T42_TYPES_H):
New macro.

* include/freetype/cache/ftcsbits.h (FTC_SBit): Added a new field
`num_grays' for specifying the number of used gray levels.
* src/cache/ftcsbits.c (ftc_sbit_node_load): Initialize it.

Adding a driver for BDF fonts written by Francesco Zappa Nardelli
<Francesco.Zappa.Nardelli@ens.fr>.  Heavily modified by me to
better adapt it to FreeType, removing unneeded stuff.  Additionally,
it now supports Mark Leisher's BDF extension for anti-aliased
bitmap glyphs with 2 and 4 bpp.

* src/bdf/*: New driver.
* include/freetype/internal/bdftypes.h: New file.
* include/freetype/internal/fttrace.h: Added BDF driver components.
* include/freetype/fterrdef.h: Added error codes for BDF driver.
* include/freetype/config/ftmodule.h, src/Jamfile: Updated.
* include/freetype/internal/internal.h (FT_INTERNAL_BDF_TYPES_H):
New macro.

* include/freetype/config/ftstdlib.h (ft_sprintf): New alias for
sprintf.

* include/freetype/internal/fttrace.h: Added Type 42 driver
component.
* src/type42/t42drivr.c: Use it.

* include/freetype/internal/internal.h (FT_INTERNAL_PCF_TYPES_H):
New macro.
2002-05-21 14:13:01 +00:00
David Turner 6795f1e2b3 adding BDF driver 2002-05-18 12:03:43 +00:00
Werner Lemberg 35164d7036 * src/type42/Jamfile: New file. 2002-05-17 12:10:04 +00:00
Werner Lemberg daeb2bc82d Adding a driver for Type42 fonts written by Roberto Alameda
<ojancano@geekmail.de>.

* src/type42/*: New driver.
* include/freetype/config/ftmodule.h, src/Jamfile: Updated.
* include/freetype/config/ftstdlib.h (ft_xdigit, ft_memcmp,
ft_atoi): New aliases for xdigit, memcmp, and atoi, respectively.
2002-05-15 06:18:24 +00:00
Werner Lemberg 2569232f40 Import of type42 driver 2002-05-15 06:16:57 +00:00
Werner Lemberg dc6751296e Initial revision 2002-05-15 06:16:57 +00:00
Werner Lemberg 056ecd0e5d * src/sfnt/ttload.c (TT_LookUp_Table): Protect against tables
with a zero length value.

* builds/beos/beos.mk: Include `link-std.mk'.

* src/type1/t1load.h (T1_Loader): Renamed to...
(T1_LoaderRec): This.
(T1_Loader): Now pointer to T1_LoaderRec.
* src/type1/t1load.c: Updated.

* include/freetype/internal/t1types.h, src/type1/t1load.c,
src/type1/t1objs.c:
s/T1_ENCODING_TYPE_EXPORT/T1_ENCODING_TYPE_EXPERT/.
2002-05-12 19:59:17 +00:00
Werner Lemberg 829b16ecb2 * README: Add a note regarding libttf vs. libfreetype. 2002-05-05 22:24:44 +00:00
Werner Lemberg e3ab2e383a FreeType 2 can now be built in an external directory with the
configure script also.

* builds/freetype.mk (INCLUDES): Add `OBJ_DIR'.

* builds/unix/detect.mk (have_mk): New variable to test for
external build.
(unix-def.mk): Defined according to value of `have_mk'.
* builds/unix/unix.mk (have_mk): New variable to test for
external build.
Select include paths for unix-def.mk and unix-cc.mk according
to value of `have_mk'.
* builds/unix/unix-def.in (OBJ_BUILD): New variable.
(DISTCLEAN): Use it.
* builds/unix/unix-cc.in (LIBTOOL): Define default value only
if not yet defined.
* builds/unix/install.mk (install): Use `OBJ_BUILD' for installing
freetype-config.

* configure: Don't depend on bash features.
(ft2_dir, abs_curr_dir, abs_ft2_dir): New variables (code
partially taken from Autoconf).
Build a dummy Makefile if not building in source tree.

* docs/INSTALL: Document it.
2002-05-05 10:57:06 +00:00
Werner Lemberg 43284a0697 formatting 2002-05-05 07:40:16 +00:00
David Turner c9484caf7a * src/truetype/ttgload.c (TT_Load_Glyph): finally fixing the last
bug that prevented FreeType 2.x and FreeType 1.x to produce
          bit-by-bit identical monochrome glyph bitmaps with native TrueType
          hinting. The culprit was a single-bit flag that wasn't set
          correctly by the TrueType glyph loader !!

        * src/otlayout/otlayout.h,
          src/otlayout/otlbase.c,
          src/otlayout/otlbase.h,
          src/otlayout/otlconf.h,
          src/otlayout/otlgdef.c,
          src/otlayout/otlgdef.h,
          src/otlayout/otlgpos.c,
          src/otlayout/otlgpos.h,
          src/otlayout/otlgsub.c,
          src/otlayout/otlgsub.h,
          src/otlayout/otljstf.c,
          src/otlayout/otljstf.h,
          src/otlayout/otltable.c,
          src/otlayout/otltable.h,
          src/otlayout/otltags.h:

            adding OpenType Layout source files. Module is still incomplete
2002-05-04 18:02:59 +00:00
Werner Lemberg 75e6d1ce91 * src/sfnt/ttcmap0.c (tt_cmap4_char_index): Fix serious typo
(0xFFFU -> 0xFFFFU).

* docs/INSTALL: Fix URL of makepp.

formatting
2002-05-02 06:50:58 +00:00
David Turner 3faaa46429 removed compiler warning 2002-05-01 08:48:35 +00:00
David Turner 8ff18d7f74 * include/freetype/internal/fthash.h, src/base/fthash.c:
adding a generic implementation of dynamic hash tables using
          linear algorithm (to get rid of 'stalls' during resizes). This
          will be used in the future in at least three parts of the
          library: the cache sub-system, the object sub-system and
          the memory debugger.

        * include/freetype/internal/ftcore.h: added this header file to
          group all new definitions related to exception handling and
          memory management. It's very likely that this file will disappear
          or be renamed in the future..

        * include/freetype/internal/ftobject.h, include/freetype/ftsysmem.h:
          adding comments to better explain the object sub-system as well
          as the new memory manager interface.
2002-05-01 08:46:56 +00:00
David Turner f031ffd3bc * include/freetype/config/ftstdlib.h: adding an alias for the
'exit' function. This will be used in the near future to panic
          in case of un-expected exception (which shouldn't happen in
          theory, but as everyone knows, shit happens :-) )
2002-05-01 08:43:00 +00:00
David Turner 277e62fba6 * src/sfnt/sfobjs.c (tt_face_get_name): fixing a bug that
caused FreeType to crash when certain broken fonts (e.g.
          "hya6gb.ttf") were opened.

        * src/sfnt/ttload.c (TT_Load_Names): applied a small work-around to
          manage fonts containing a broken name table (e.g. "hya6gb.ttf")

        * src/sfnt/ttcmap0.c (tt_cmap4_validate):
          fixed over-restrictive validation test. the charmap validator
          now accepts overlapping ranges in format 4 charmaps.

        * src/sfnt/ttcmap0.c (tt_cmap4_char_index):
          switched to a binary search algorithm. Certain fonts contain
          more than 170 distinct segments !!
2002-05-01 08:40:53 +00:00
David Turner ecf173d422 * src/sfnt/ttcmap0.c (tt_cmap4_validate):
fixed over-restrictive validation test. the charmap validator
          now accepts overlapping ranges in format 4 charmaps.

        * src/sfnt/ttcmap0.c (tt_cmap4_char_index):
          switched to a binary search algorithm. Certain fonts contain
          more than 170 distinct segments !!
2002-05-01 08:40:32 +00:00
David Turner 4afc52152b * src/sfnt/ttload.c (TT_Load_Names): applied a small work-around to
manage fonts containing a broken name table (e.g. "hya6gb.ttf")
2002-05-01 08:38:08 +00:00
David Turner 9e0ad41a8f * src/sfnt/sfobjs.c (tt_face_get_name): fixing a bug that
caused FreeType to crash when certain broken fonts (like
          "hya6gb.ttf") were opened.
2002-05-01 08:36:12 +00:00
Werner Lemberg 26d737a8a5 * src/base/ftmac.c (p2c_str): Removed.
(file_spec_from_path) [TARGET_API_MAC_CARBON]: Added support for
OS X.
(is_dfont) [TARGET_API_MAC_CARBON]: Define only for OS X.
Handle `nameLen' <= 6 also.
(parse_fond): Remove unused variable `name_table'.
Use functionality of old p2c_str directly.
Add safety checks.
(read_lwfn): Initialize `size_p'.
Check for size_p == NULL.
(new_memory_stream, open_face_from_buffer): Updated to FreeType 2.1.
(FT_New_Face_From_LWFN): Remove unused variable `memory'.
Remove some dead code.
(FT_New_Face_From_SFNT): Remove unused variable `stream'.
(FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Define only for
OS X.
(FT_New_Face_From_FOND): Remove unused variable `error'.
(ResourceForkSize): New function.
(FT_New_Face): Use it.
Handle empty resource forks.
Conditionalize some code for OS X.
Add code to call normal loader as a fallback.

Some more variable renames to avoid troubles on the Mac.

* src/raster/ftraster.c:
s/Unknown|Ascending|Descending|Flat/\1_State/.
* src/smooth/ftgrays.c: s/TScan/TCoord/.

Other changes for the Mac.

* include/freetype/config/ftconfig.h: Define FT_MACINTOSH for
Mac platforms.
* src/base/ftobjs.c: s/macintosh/FT_MACINTOSH/.

* src/raster/ftrend1.c (ft_raster1_render): Make `pitch' always
an even number.
2002-04-30 14:26:49 +00:00
Werner Lemberg b5127306ad `interface' is reserved on the Mac.
* include/freetype/ftoutln.h, include/freetype/internal/sfnt.h,
src/base/ftoutln.c: s/interface/func_interface/.
* src/base/ftbbox.c (FT_Outline_Get_BBox):
s/interface/bbox_interface/.
* src/cff/cffdrivr.c: s/interface/module_interface/.
* src/cff/cffload.c, src/cff/cffload.h:
s/interface/psnames_interface/.
* src/cid/cidriver.c: s/interface/cid_interface/.
* src/sfnt/sfdriver.c: s/interface/module_interface/.
* src/smooth/ftgrays.c: s/interface/func_interface/.
* src/truetype/ttdriver.c: s/interface/tt_interface/.
* src/type1/t1driver.c: s/interface/t1_interface/.
2002-04-30 06:37:52 +00:00
Werner Lemberg c2c5cfe024 * descrip.mms (all): Add pfr driver. 2002-04-29 12:59:32 +00:00
Werner Lemberg c5d0f4051e * src/pcf/pcfdriver.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_CMAPS]:
`root' -> `face->root'.
* src/sfnt/ttcmap0.c (TT_Build_CMaps) [!FT_CONFIG_OPTION_USE_CMAPS]:
Removed.
* src/sfnt/ttcmap0.c: Declare TT_Build_CMaps only for
FT_CONFIG_OPTION_USE_CMAPS.
2002-04-28 12:25:31 +00:00
Werner Lemberg 8a050caa68 * src/pfr/pfrerror.h: New file.
* include/freetype/ftmoderr.h: Add PFR error codes.
* src/pfr/pfrgload.c: Include pfrerror.h.
Use PCF error codes.
(pfr_extra_item_load_stem_snaps): Fix debug message.
* src/pfr/pfrgload.c: Include pfrerror.h.
Use PCF error codes.
(pfr_extra_item_load_bitmap_info, pfr_glyph_load_simple,
pfr_glyph_load_compound): Fix debug message.
* src/pfr/pfrobjs.c: Include pfrerror.h.
Use PCF error codes.
(pfr_face_init): Return PFR_Err_Unknown_File_Format.
* src/pfr/rules.mk (PFR_DRV_H): Include pfrerror.h.
2002-04-28 10:25:55 +00:00
Werner Lemberg 3a037af810 * src/cache/ftccache.c (ftc_cache_lookup),
src/cache/ftccmap.c (ftc_cmap_family_init),
src/cache/ftcmanag.c (ftc_family_table_alloc),
src/cache/ftcsbits.c (FTC_SBit_Cache_Lookup): Use FTC_Err_*.
src/cache/ftcimage.c (FTC_Image_Cache_Lookup): Use FTC_Err_*.
(FTC_ImageCache_Lookup): Fix handling of invalid arguments.
2002-04-28 02:48:20 +00:00
David Turner ee69c14dbd adding experimental (alpha) exception support code + system code 2002-04-25 21:42:59 +00:00
Werner Lemberg 2001b14e5a * builds/unix/configure.ac: Set `version_info' to 9:1:3 (FT2
version 2.0.9 has 9:0:3).
* builds/unix/configure: Regenerated (using autoconf 2.53).
2002-04-22 16:50:27 +00:00
Werner Lemberg 8cc1319c54 * src/pfr/pfrload.c (pfr_extra_items_farse): Fix debug message.
(pfr_phy_font_load): s/size/Size/ for local variable to avoid
compiler warning.
* src/pfr/pfrobjs.c (pfr_face_init): Fix debug message.
(pfr_slot_load): Remove redundant local variable.

adding copyrights, formatting
2002-04-20 05:38:33 +00:00
David Turner 596ba53283 * src/type1/t1gload.h, src/type1/t1gload.c: fixed incorrect
parameter sign-ness in callback function

        * include/freetype/config/ftmodule.h,
          include/freetype/internal/fttrace.h,
          src/Jamfile, src/pfr/*:

          adding a PFR font driver to the FreeType sources. Not that it
          doesn't support embedded bitmaps or kerning tables for now..


        * include/freetype/internal/ftmemory.h: adding the FT_MEM_ZERO
          and FT_ZERO macros

        * include/freetype/internal/ftstream.h: adding the FT_NEXT_OFF3,
          FT_NEXT_UOFF3, FT_NEXT_OFF3_LE and FT_NEXT_UOFF3_LE to parse
          in-memory 24-bit integers.
2002-04-19 15:13:47 +00:00
Werner Lemberg b97e32c7ad *** empty log message *** 2002-04-18 14:27:21 +00:00
Werner Lemberg bbf539d46e formatting 2002-04-18 14:26:29 +00:00
David Turner 38748e42fe * src/base/ftobjs.c, builds/win32/ftdebug.c,
builds/amiga/src/base/ftdebug.c :

            2.1.0 couldn't be linked against applications in Win32 and
            Amiga builds due to changes to "src/base/ftdebug.c" that
            were not properly propagated to "builds/win32" and
            "builds/amiga"..

            this has been fixed. We'll probably make 2.1.1 real
            soon now..


        * include/freetype/internal/ftobject.h,
          include/freetype/internal/ftexcept.h,
          include/freetype/ftsysmem.h,
          include/freetype/ftsysio.h,
          src/base/ftsysmem.c,
          src/base/ftsysio.c:

            adding new experimental files for 2.1.1 (or 2.1.2)
2002-04-18 10:07:26 +00:00
David Turner d833d4c12d adding new experimental header files 2002-04-17 22:54:02 +00:00
Werner Lemberg 0b12544efd formatting 2002-04-17 22:42:13 +00:00
David Turner 0387c220a1 fixing typo preventing compilation in non-debugging modes 2002-04-17 11:32:10 +00:00
David Turner de23a2670c fixed max advance width computation within T1 driver 2002-04-17 09:37:59 +00:00
Werner Lemberg 567caf08f3 * src/pcf/pcfread (pcf_get_accell): Fix parsing of accelerator
tables.
2002-04-16 13:39:17 +00:00
David Turner 7d6784e0c7 changing options for release 2002-04-15 17:49:45 +00:00
Werner Lemberg 058b50a6d7 formatting 2002-04-15 13:37:29 +00:00
David Turner ce5cd09e3d removed compiler warning 2002-04-15 12:05:02 +00:00
David Turner 3144d1e818 preparing 2.1.0 release 2002-04-15 12:01:10 +00:00
Werner Lemberg be60044eb1 * src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid
compiler warning.

formatting/fixing ChangeLog
2002-04-14 00:54:32 +00:00
David Turner 7bfce366c4 * builds/unix/ftconfig.in, builds/vms/ftconfig.h: Oops, forgot to
update these files too
2002-04-12 10:19:15 +00:00
David Turner 4ef3ec7caa * README.UNX: updated the Unix-specific quick-compilation guide to
warn about the GNU Make requirement at compile time..

        * include/freetype/config/ftstdlib.h,
          include/freetype/config/ftconfig.h,
          include/freetype/config/ftheader.h,
          include/freetype/internal/ftmemory.h,
          include/freetype/internal/ftobjs.h,

          src/autohint/ahoptim.c,

          src/base/ftdbgmem.c, src/base/ftdebug.c,
          src/base/ftmac.c,    src/base/ftobjs.c,
          src/base/ftsystem.c,

          src/cache/ftcimage.c, src/cache/ftcsbits.c,

          src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,

          src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,

          src/pcf/pcfdriver.c, src/pcf/pcfread.c,

          src/psaux/t1cmap.c, src/psaux/t1decode.c,

          src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
          src/pshinter/pshrec.c,

          src/psnames/psmodule.c,

          src/raster/ftraster.c,

          src/sfnt/sfdriver.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,

          src/smooth/ftgrays.c,

          src/type1/t1afm.c,  src/type1/t1driver.c, src/type1/t1gload.c,
          src/type1/t1load.c, src/type1/t1objs.c,   src/type1/t1parse.c:

            added the new configuration file "ftstdlib.h" used to define
            aliases for all ISO C library functions used by the engine
            (e.g. strlen, qsort, setjmp, etc...)

            this eases the porting of FreeType 2 to exotic environments like
            XFree86 modules/extensions..

            also removed many #include <string.h>, #include <stdlib.h>, etc...
            from the engine's sources where they're not needed..
2002-04-12 09:31:48 +00:00
Werner Lemberg cdec219228 minor fixes 2002-04-11 19:55:58 +00:00
David Turner 13e0b90c46 * docs/FTL.txt: updated license text to provide a preffered disclaimer
and adjust copyright dates/extents
2002-04-11 15:17:16 +00:00
David Turner 44be9acbe6 * README, docs/CHANGES, Jamfile.in: updating for the 2.1.0 release 2002-04-11 14:21:16 +00:00
David Turner 242c529fee * src/smooth/ftgrays.c (gray_hline): very minor optimization. :-) 2002-04-11 10:34:19 +00:00
Werner Lemberg de757dd175 Fixes from the stable branch:
* include/freetype/config/ftoption.h (FT_CONFIG_OPTION_OLD_CALCS):
Removed.
[FT_CONFIG_OPTION_OLD_CALCS]: Removed.
* include/freetype/internal/ftcalc.h, src/base/ftcalc.c
[FT_CONFIG_OPTION_OLD_CALCS]: Removed.

* src/base/fttrigon.c (FT_Vector_Length): Change algorithm to match
output of FreeType 1.

* src/pshinter/pshglob.c (psh_globals_scale_widths): Fixed a small
bug that created un-even stem widths when hinting Postscript fonts.

formatting, updating copyright
2002-04-02 14:50:31 +00:00
Werner Lemberg a1c0779c23 * src/type1/t1driver.c, src/type1/t1parse.c: 16bit fixes.
formatting, copyright updates
2002-04-01 22:01:46 +00:00
Werner Lemberg 546305fd3c * src/truetype/ttgload.c: 16bit fixes.
(TT_Load_Simple_Glyph): Improve debug messages.
(load_truetype_glyph): Remove dead code.
* src/truetype/ttinterp.c: 16bit fixes.
* src/truetype/ttobjs.c: Ditto.

* include/freetype/ftsnames.h, include/freetype/internal/sfnt.h,
src/cff/cffload.h, src/psaux/psobjs.h, src/truetype/ttinterp.[ch],
src/sfnt/ttpost.h: s/index/idx/.

formatting, copyright updates.
2002-04-01 14:25:28 +00:00
Werner Lemberg 4cf900afa3 * src/sfnt/ttcmap.c: 16bit fixes (0xFFFF -> 0xFFFFU).
* src/sfnt/ttcmap0.c: 16bit fixes.
(TT_Build_CMaps): Simplify debug messages.
(tt_cmap12_char_next): Fix offset.
* src/sfnt/ttload.c (TT_Load_Names, TT_Load_CMap): Fix debug
messages.
(TT_Load_OS2): 16bit fix.
2002-03-31 18:48:24 +00:00
Werner Lemberg 259d88edbc * src/psaux/t1cmap.c: s/index/idx/.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix debug
messages.
2002-03-31 11:18:15 +00:00
Werner Lemberg 9bba0634a0 * src/truetype/ttobjs.c (TT_Size_Init): Fix typo.
* src/otlayout/otlcommn.c, src/otlayout/otlcommn.h: s/index/idx/.
2002-03-31 06:56:56 +00:00
Werner Lemberg f1c46e5e00 formatting, copyright 2002-03-30 17:08:04 +00:00
Werner Lemberg 540dff7648 fix entry 2002-03-30 16:47:55 +00:00
Werner Lemberg 05109ff794 formatting 2002-03-30 16:46:23 +00:00
Werner Lemberg f387e07c27 * src/cff/cffdrivr.c (cff_get_glyph_name): Fix debug message.
* src/cff/cffobjs.c (CFF_Driver_Init, CFF_Driver_Done)
[TT_CONFIG_OPTION_EXTEND_ENGINE]: Removed.
* src/cff/sfobjs.c (SFNT_Load_Face)
[TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto.
* src/truetype/ttobjs.c (TT_Init_Driver, TT_Done_Driver)
[TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto.

* src/truetype/ttdriver.c, src/truetype/ttobjs.c,
src/truetype/ttobjs.h: Renaming driver functions to the
FT_<Subject>_<Action> scheme:

  TT_Init_Driver => TT_Driver_Init
  TT_Done_Driver => TT_Driver_Done
  TT_Init_Face   => TT_Face_Init
  TT_Done_Face   => TT_Face_Done
  TT_Init_Size   => TT_Size_Init
  TT_Done_Size   => TT_Size_Done
  TT_Reset_Size  => TT_Size_Reset
2002-03-30 16:41:09 +00:00
David Turner 61526ec55f fixing the function that computes an ASCII face name 2002-03-30 16:32:47 +00:00
David Turner 451e416d66 removing compiler warnings 2002-03-30 16:14:48 +00:00
David Turner 957565d4ee updating comments for some TT_FaceRec fields 2002-03-30 16:09:24 +00:00
Werner Lemberg f05e21a035 * include/freetype/t1tables.h (t1_blend_max): Fix typo.
* src/base/ftstream.c: Simplify FT_ERROR calls.

formatting, copyright update
2002-03-30 13:16:35 +00:00
Werner Lemberg 2b5f1a9b91 formatting 2002-03-29 23:23:28 +00:00
Werner Lemberg 471b953ac0 * builds/vms/ftconfig.h: Rename LOCAL_DEF and LOCAL_FUNC to
FT_LOCAL and FT_LOCAL_DEF, respectively, as with other ftconfig.h
files.
* builds/unix/ftconfig.in: Add argument to FT_LOCAL and
FT_LOCAL_DEF.
* src/truetype/ttinterp.c: s/FT_Assert/FT_ASSERT/.
* builds/unix/configure.ac: Temporarily deactivate creation of
../../Jamfile.
* builds/unix/configure: Updated.
2002-03-29 07:43:04 +00:00
Werner Lemberg eb7730815c * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fix serious typos. 2002-03-28 14:21:15 +00:00
Werner Lemberg 3431df9bcf * include/freetype/internal/psaux.h (PSAux_ServiceRec): Fix
compiler warnings.
* include/freetype/internal/t1types.h (T1_FaceRec): Use `const' for
some members.
* src/base/ftapi.c (FT_New_Memory_Stream): Fix typos.
* src/psaux/t1cmap.c (t1_cmap_std_init, t1_cmap_unicode_init): Add
cast.
(t1_cmap_{standard,expert,custom,unicode}_class_rec): Use
`FT_CALLBACK_TABLE_DEF'.
* src/psaux/t1cmap.h: Updated.
* src/sfnt/ttcmap0.c (TT_Build_CMaps): Use `ft_encoding_none'
instead of zero.
* src/type1/t1objs.c (T1_Face_Init): Use casts.
2002-03-28 08:07:16 +00:00
David Turner 6a883fcd23 fixed a small bug in FT_CMaps support 2002-03-26 02:38:39 +00:00
David Turner 0bcc41ef02 removing compiler warnings 2002-03-25 17:02:26 +00:00
David Turner 5cfe15c7f6 formatting 2002-03-25 16:35:13 +00:00
David Turner 5f33c9009e * src/base/ftobjs.c, src/sfnt/ttcmap0.c, src/type1/t1objs.c:
various fixes to make the FT_CMaps support work correctly
          (more tests are still needed)
2002-03-22 22:37:40 +00:00
David Turner 636fdbd4a4 various fixes to the FT_CMaps support 2002-03-22 17:09:52 +00:00
David Turner fb285cbd0b polishing FT_CMaps support for Type 1 format 2002-03-22 15:56:12 +00:00
David Turner d1f86d8c90 formatting 2002-03-22 15:55:55 +00:00
David Turner 24abcf885b * include/freetype/internal/ftobjs.h,
src/sfnt/Jamfile, src/sfnt/rules.mk,
          src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
          src/sfnt/ttload.c, src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h:

            updated the SFNT charmap support to use FT_CMaps
2002-03-22 15:02:38 +00:00
David Turner d6c9e0c806 * include/freetype/config/ftheader.h, include/freetype/fterrors.h:
modified "fterrors.h" to include the error definitions list found
        in "fterrdef.h"
2002-03-22 15:00:19 +00:00
David Turner d802109731 * include/freetype/internal/ftmemory.h, and a lot of other files !!:
changed the names of memory macros. Examples:

              MEM_Set   => FT_MEM_SET
              MEM_Copy  => FT_MEM_COPY
              MEM_Move  => FT_MEM_MOVE

              ALLOC     => FT_ALLOC
              FREE      => FT_FREE
              REALLOC   = >FT_REALLOC

            FT_NEW was introduced to allocate a new object from a _typed_
            pointer..

            note that ALLOC_ARRAY and REALLOC_ARRAY have been replaced
            by FT_NEW_ARRAY and FT_RENEW_ARRAY which take _typed_ pointer
            arguments.

            This results in _lots_ of sources being changed, but makes the
            code more generic and less error-prone..
2002-03-22 13:52:37 +00:00
David Turner c9bcd833ba * include/freetype/internal/ftstream.h,
src/base/ftstream.c, src/cff/cffload.c, src/pcf/pcfread.c,
          src/sfnt/ttcmap.c, src/sfnt/ttcmap0.c, src/sfnt/ttload.c,
          src/sfnt/ttpost.c, src/sfnt/ttsbit.c,
          src/truetype/ttgload.c, src/truetype/ttpload.c,
          src/winfonts/winfnt.c:

            changed the definitions of stream macros. Examples:

              NEXT_Byte     => FT_NEXT_BYTE
              NEXT_Short    => FT_NEXT_SHORT
              NEXT_UShortLE => FT_NEXT_USHORT_LE
              READ_Short    => FT_READ_SHORT
              GET_Long      => FT_GET_LONG
              etc..

            also introduced the FT_PEEK_XXXX functions..
2002-03-22 12:55:23 +00:00
David Turner 7884957c9b * src/psaux/t1cmap.h, src/psaux/t1cmap.c, src/type1/t1cmap.h,
src/type1/t1cmap.c: updating and moving the Type 1 FT_CMap support
        from "src/type1" to "src/psaux" since it's going to be shared
        by the Type 1 and CID font drivers..

        * src/psaux/Jamfile, src/psaux/psaux.c, src/psaux/psauxmod.c,
        src/psaux/rules.mk, include/freetype/internal/psaux.h: added support
        for Type 1 FT_CMaps.
2002-03-21 15:02:54 +00:00
David Turner 1eae664342 * src/base/ftobjs.c (FT_Get_Next_Char): updated to new FT_CMap
definitions
2002-03-21 15:00:13 +00:00
David Turner 143e31bf6b moving the Type 1 CMap support to "psaux" 2002-03-21 10:39:23 +00:00
David Turner d19bd8003f * src/base/ftdbgmem.c (ft_mem_table_destroy): fixed a small bug that
caused the library to crash with Electric Fence when memory debugging
        is used..
2002-03-20 15:37:12 +00:00
David Turner 5819e3f3c7 * src/base/ftgloadr.c (FT_GlyphLoader_CheckSubGlyphs): fixed a memory
allocation bug that was due to un-careful renaming of the FT_SubGlyph
        type..
2002-03-20 15:35:53 +00:00
David Turner 5cff1134e9 * renaming stream macros. Examples:
FILE_Skip    => FT_STREAM_SKIP
           FILE_Read    => FT_STREAM_READ
           ACCESS_Frame => FT_FRAME_ENTER
           FORGET_Frame => FT_FRAME_EXIT
           etc...
2002-03-20 10:49:31 +00:00
David Turner de388f501f * src/sfnt/sfdriver.c (get_sfnt_postscript_name): fixed memory leak 2002-03-20 10:47:38 +00:00
David Turner 9230415aa9 * include/freetype/internal/ftobjs.h: changing the definition of
FT_CMap_CharNextFunc slightly

        * src/cff/*.c: updating CFF type definitions.
2002-03-20 09:44:20 +00:00
David Turner f3caf22dad formatting 2002-03-20 09:42:31 +00:00
David Turner 0a86d63289 no message 2002-03-14 12:56:35 +00:00
David Turner ad4597babc * include/freetype/internal/psglobals.h (removed),
include/freetype/internal/pshints.h,
          src/pshinter/pshglob.h: removing obsolete file

        * include/freetype/internal/tttypes.h,
          include/freetype/internal/sfnt.h,
          src/base/ftnames.c, src/cff/cffdrivr.c,
          src/sfnt/*.c, src/truetype/*.c: updated SFNT/TrueType type
          definitions
2002-03-14 11:26:29 +00:00
David Turner 875e7b7fa6 removing obsolete file 2002-03-14 10:10:41 +00:00
David Turner 72a849f394 * include/freetype/internal/psaux.h,
src/cid/cidload.c, src/cidtoken.h,
          src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
          stc/type1/t1load.c, src/type1/t1tokens.h: updated common Postscript
          type definitions
2002-03-14 10:09:35 +00:00
David Turner 44c5177782 formatting 2002-03-14 09:30:52 +00:00
David Turner 5693e4d09b * include/freetype/internal/ftobjs.h,
src/base/ftapi.c, src/base/ftobjs.c: updated a few face method
          definitions:

            FT_PSName_Requester     => FT_Face_GetPostscriptNameFunc
            FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc
            FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc
2002-03-14 09:28:51 +00:00
David Turner 9e1cfb80d1 * include/freetype/internal/ftdriver.h,
include/freetype/internal/ftobjs.h,
          src/base/ftapi.c, src/base/ftobjs.c,
          src/cff/cffdrivr.c, src/cff/cffdrivr.h,
          src/cid/cidriver.c, src/cid/cidriver.h,
          src/pcf/pcfdriver.c, src/pcf/pcfdriver.h,
          src/truetype/ttdriver.c, src/truetype/ttdriver.h,
          src/type1/t1driver.c, src/type1/t1driver.h,
          src/winfonts/winfnt.c, src/winfonts/winfnt.h:
          updating the type definitions for font font drivers
2002-03-14 09:22:48 +00:00
David Turner 2999605407 * include/freetype/internal/fnttypes.h, src/winfnt/*.c: updating
the type definitions of the Windows FNT font driver
2002-03-14 09:01:32 +00:00
David Turner 5acebac70f * include/freetype/internal/cfftypes.h, src/cff/*.c: updating the
type definitions of the CFF font driver

        (i.e. CFF_Font  => CFF_FontRec
              CFF_Font* => CFF_Font, etc...)
2002-03-14 08:57:10 +00:00
David Turner cf1c2f7e12 * include/freetype/internal/autohint.h, src/autohint/ahmodule.c,
src/base/ftapi.c, src/base/ftobjs.c: updating the type definitions for
        the auto-hinter module.

        (i.e. FT_AutoHinter_Interface  => FT_AutoHinter_ServiceRec,
              FT_AutoHinter_Interface* => FT_AutoHinter_Service, etc..)
2002-03-14 08:49:59 +00:00
David Turner ca30a7f785 * include/freetype/config/ftoption.h: changed the automatic detection
of Microsoft C compilers to automatically support 64-bit integers only
        since revision 9.00 (i.e. >= Visual C++ 2.0)
2002-03-13 09:37:50 +00:00
Werner Lemberg 8b3551a7f9 * src/base/ftutil.c (FT_Realloc): Use MEM_Set instead of memset. 2002-03-07 23:22:28 +00:00
Werner Lemberg 769430fc03 * src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
* src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
Ditto.
* src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
variables.

* include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
to...
(T1_Builder_FuncsRec): This.
(T1_Builder_Funcs): New typedef.
(PSAux_Interface): Remove compiler warnings.
* src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
(t1_builder_funcs): Updated.

* src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
(PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
(PSH_AlignmentRec): Updated.

* include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
typo.
* include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
* src/base/ftstream (FT_Get_Char): Rename to...
(FT_Stream_Get_Char): This.

* src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
a built-in function in gcc, causing warning messages with gcc 3.0.
* src/autohint/ahglyph.c (ah_outline_load): Ditto.
* src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
Ditto.
* src/cff/cffload.c (cff_new_index, cff_done_index,
cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
CFF_Done_Font): Ditto.
* src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
* src/pshinter/pshalgo1.c (psh1_hint_table_record,
psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_table_record,
psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
* src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
TT_Get_PS_Name): Ditto.
* src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
load_truetype_glyph): Ditto.
* src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
* src/type1/t1afm.c (T1_Get_Kerning): Ditto.
* include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
2002-03-07 21:59:59 +00:00
David Turner 004b890674 * include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
src/base/ftobjs.c, src/base/ftinit.c: adding the new FT_Library_Version
        API to return the library's current version in dynamic links.
2002-03-06 12:42:34 +00:00
David Turner 01d9ce0386 * src/pshinter/pshalgo2.c: changed 'print_zone' to 'psh2_print_zone'
* src/pshinter/pshalgo1.c: changed 'print_zone' to 'psh1_print_zone'
2002-03-06 12:39:12 +00:00
David Turner 87f697410e * src/type1/t1objs.c (T1_Face_Init), src/cid/cidobjs.c (CID_Face_Init):
fixed another bug related to the ascender/descender/text height of
        Postscript fonts. Damn, this should have been fixed on 2002-03-04 !
2002-03-06 12:38:15 +00:00
David Turner e4df898395 formatting 2002-03-06 12:36:22 +00:00
Werner Lemberg 7178d1e35f * src/pshinter/pshglob.h (PSH_DimensionRec): s/std/stdw/.
* src/pshinter/pshglob.c (psh_global_scale_widths,
psh_dimension_snap_width, psh_globals_destroy, psh_globals_new):
Ditto.
2002-03-06 06:05:56 +00:00
David Turner ec208f00fe * src/sfnt/ttload.c (TT_Load_Names), src/sfnt/sfobjs.c (Get_Name),
src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fixed the loader so
	that it accepts broken fonts like "foxjump.ttf", which made FreeType
	crash when trying to load them.

	Also improved the name table parser to be able to load
	Windows-encoded entries before Macintosh or Unicode ones, since it
	seems some fonts don't have reliable values here anyway.
2002-03-05 16:12:57 +00:00
David Turner 57cd33e0d3 * src/cid/cidriver.c (cid_get_postscript_name): fixed a bug that
caused the CID driver to return Postscript font names with a leading
        slash ("/") as in "/MOEKai-Regular"
2002-03-05 15:57:45 +00:00
David Turner e826d8753b * src/type1/t1objs.c (T1_Face_Init),
src/cff/cffobjs.c (CFF_Face_Init),
          src/cid/cidobjs.c (CID_Face_Init):

            removing the bug that returned global BBox values in
            16.16 fixed format (instead of integer font units).
2002-03-05 15:55:28 +00:00
Werner Lemberg 9eddcfc1da * builds/unix/aclocal.m4, builds/unix/ltmain.sh: Update to libtool
1.4.2.
Apply a small patch for AIX to make shared libraries work (this
patch is already in the CVS version of libtool).

* builds/unix/config.sub, builds/unix/config.guess: Updated to
recent versions.

* builds/unix/configure.ac: Fix typo
(AC_CONFIG_FILE->AC_CONFIG_FILES).

* builds/unix/configure: Regenerated.
2002-03-05 15:09:59 +00:00
David Turner 01f2de854c * include/freetype/ftconfig.h: changed FT_LOCAL xxxx to FT_LOCAL( xxxx )
everywhere in the source. Sames goes for FT_LOCAL_DEF xxxx translated
        into FT_LOCAL_DEF( xxxxx )
2002-03-01 02:26:22 +00:00
David Turner 31526ef881 * include/freetype/freetype.h: changing version to 2.1.0 to indicate
an unstable branch. Added the declarations of FT_Get_First_Char and
        FT_Get_Next_Char

        * src/base/ftobjs.c: implemented FT_Get_First_Char and FT_Get_Next_Char
2002-02-28 19:28:26 +00:00
David Turner 5afd3fec9b changing patch level to 9 (FT_FREETYPE_PATCH)
adding FT_Get_First_Char and FT_Get_Next_Char
2002-02-28 19:25:50 +00:00
David Turner f12944ec0b still more logical transformations. This time, some public API headers have
been touched, while keeping everything backwards-compatible..

        * include/freetype/t1tables.h: re-naming structure types. This done
        basically:

          typedef T1_Struct_
          {
          } T1_Struct;

        becomes:

          typedef PS_StructRec_
          {
          } PS_StructRec, *PS_Struct;

          typedef PS_StructRec  T1_Struct;  /* backwards-compatibility */


        hence, we increase the coherency of the source code by effectuively
        using the 'Rec' prefix for structure types..
2002-02-28 18:59:37 +00:00
David Turner aa919383de yet another logical transformation of the internals to make them
more consistent and understandable..

mainly, changing things like PS_Table  => PS_TableRec + *PS_Table
2002-02-28 16:10:29 +00:00
David Turner 77e54f363a * src/sfnt/ttload.c (TT_Load_Names): simplifying and securing the
names table loader. Invalid individual name entries are now handled
        correctly. This allows the loading of very buggy fonts like
        "foxjump.ttf" without allocating tons of memory and causing crashes..
2002-02-27 23:10:19 +00:00
David Turner 34fb6290ca adding several experimental sources:
- OpenType Layout validation and parsing (common tables)
  - Type 1 charmap processing
2002-02-27 21:25:47 +00:00
David Turner 5be6ec3453 * renaming stream functions to the FT_Subject_Action scheme:
FT_Seek_Stream         => FT_Stream_Seek
          FT_Skip_Stream         => FT_Stream_Skip
          FT_Read_Stream         => FT_Stream_Read
          FT_Read_Stream_At      => FT_Stream_Read_At
          FT_Access_Frame        => FT_Stream_Enter_Frame
          FT_Forget_Frame        => FT_Stream_Exit_Frame
          FT_Extract_Frame       => FT_Stream_Extract_Frame
          FT_Release_Frame       => FT_Stream_Release_Frame
          FT_Get_XXXX            => FT_Stream_Get_XXXX
          FT_Read_XXXX           => FT_Stream_Read_XXXX

          note also that:

          FT_New_Stream( filename, stream ) =>
            FT_Stream_Open( stream, filename )

          (the function doesn't create the FT_Stream structure, it simply
           initializes it for reading)

          FT_New_Memory_Stream( library, FT_Byte*  base, size, stream ) =>
            FT_Stream_Open_Memory( stream, const FT_Byte* base, size )

          FT_Done_Stream => FT_Stream_Close

          note that the name of the stream methods, defined in
          "include/freetype/ftsystem.h" have also been changed without
          problems:

            FT_Stream_IO    => FT_Stream_IOFunc
            FT_Stream_Close => FT_Stream_CloseFunc
2002-02-24 05:26:57 +00:00
David Turner 76c7bd0d40 * moving all code related to glyph loaders to "internal/ftgloadr.h"
and "src/base/ftgloadr.c".

        Note also that the type "FT_GlyphLoader" is now a pointer to the
        structure "FT_GlyphLoaderRec"..
2002-02-24 02:59:24 +00:00
David Turner 6c0fedceba renaming "ft_glyph_own_bitmap" into "FT_GLYPH_OWN_BITMAP" 2002-02-24 02:39:08 +00:00
David Turner 0502dc2fbf adding API-specific source 2002-02-22 18:29:12 +00:00
David Turner 28005173e4 adding new & experimental charmap processor 2002-02-22 18:28:11 +00:00
David Turner cc144f1c8d adding glyph loader routines (previously in ftobjs.c) 2002-02-22 17:58:05 +00:00
David Turner 1f7056f5e5 adding glyph loader header file (previously in ftobjs.h) 2002-02-22 17:57:35 +00:00
David Turner 77cba45d4e adding file containing error definitions (unlike fterrors.h which also
contains macro definitions)..

the changes are not finished yet..
2002-02-22 17:57:05 +00:00
David Turner 8a94f94672 adding new file 2002-02-22 14:40:12 +00:00
Werner Lemberg fb87c42c4a * include/freetype/internal/ftdebug.h (FT_Trace): Remove comma in
enum to avoid compiler warnings.
2002-02-22 00:58:04 +00:00
David Turner 677dc0f752 * include/freetype/internal/ftdebug.h, src/base/ftdebug.c: modified
the debug sub-system initialization. trace levels can now be specified
        within the "FT2_DEBUG" environment variable. See the comments within
        "ftdebug.c" for more details

        * include/freetype/internal/fttrace.h: new file to define the trace
        levels used for debugging. it is used both to define enums and
        toggle names for FT2_DEBUG

        * src/base/ftobjs.c, src/base/ftstream.c: FT_Assert renamed to
        FT_ASSERT

        * include/freetype/internal/ftextend.h, src/base/ftextend.c,
        src/base/Jamfile, src/base/rules.mk: removing "ftextend" from the
        library, since it is now completely obsolete..
2002-02-21 11:48:48 +00:00
David Turner af14179c9e adding "devel@freetype.org" address for bug reports 2002-02-20 21:49:59 +00:00
Werner Lemberg 094e5f5b71 * builds/unix/install.mk (check): New dummy target.
(.PHONY): Add it.
2002-02-20 00:55:59 +00:00
Werner Lemberg 81cb1bb920 * builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first.
* src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused
to avoid compiler warning.
* src/cff/cffload.c (CFF_Get_String): Ditto.
* src/cff/cffobjs.c (CFF_StrCopy): Ditto.
* src/psaux/psobjs.c (PS_Table_Done): Ditto.
* src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto.
* src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
(pcf_get_bitmaps): The same for `sizebitmaps'.
* src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for
`orig_y'.
(t1operator_seac): Comment out more dead code.
* src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
conditional.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph,
load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER'
conditional.
2002-02-19 16:30:15 +00:00
Werner Lemberg cc0039b533 * src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused
variables.
* src/autohint/ahhint.c (ah_align_serif_edge): Use FT_UNUSED instead
of UNUSED.
* src/autohint/ahmodule.c (ft_autohinter_reset): Ditto.
* src/pshinter/pshrec.c (ps_mask_table_merge): Fix typo in variable
swapping code.
* src/pshinter/pshglob.h (PSH_Blue_Align): Add PSH_BLUE_ALIGN_NONE.
* src/pshinter/pshglob.c (psh_blues_snap_stem): Use it.
* src/pshinter/pshalgo1.c (psh1_hint_table_optimize): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_align): Ditto.
* include/freetype/internal/ftobjs.h (UNUSED): Removed.
2002-02-19 01:12:23 +00:00
Werner Lemberg 8f2aa06409 Add support for ISOLatin1 PS encoding.
* include/freetype/freetype.h (ft_encoding_latin_1): New tag
(`lat1').
* include/freetype/internal/t1types.h (T1_Encoding_Type): Add
`t1_encoding_isolatin1'.
* src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Handle
ft_encoding_latin_1.
* src/type1/t1load.c (parse_encoding): Handle `ISOLatin1Encoding'.
* src/type1/t1objs.c (T1_Face_Init): Handle `t1_encoding_isolatin1'.
2002-02-10 12:33:14 +00:00
Werner Lemberg 1481a93d06 * README: Fix typo.
* docs/CHANGES: Minor fixes.
2002-02-09 17:59:12 +00:00
David Turner 2239bd0d51 updating docs for 2.0.8 2002-02-08 14:00:20 +00:00
David Turner 749c7bce97 setting PATH_LEVEL to 8
removing FT_Get_Next_Char from the API (for the 2.0.8 release)
2002-02-08 13:54:10 +00:00
Werner Lemberg d61774feb9 cleaning 2002-02-08 13:11:18 +00:00
David Turner 03c6ca930c adding comments to FT_Get_Next_Char 2002-02-08 10:50:12 +00:00
Werner Lemberg efb5eb9836 some cleaning 2002-02-08 06:23:50 +00:00
David Turner 6947e1883e * src/pcf/pcfread.c (pcf_load_font): removed immature support of
the AVERAGE_WIDTH property..
2002-02-07 16:59:38 +00:00
David Turner a8c225cbaa support for embedded fonts in PDF documents. These
often do not have a 'cmap', 'post' and 'name' table and
were not loaded by FreeType previously..

(thanks to Derek B. Noonburgs from XPDF)
2002-02-06 13:59:25 +00:00
David Turner a391b7e86f fixing memory leak in the PCF driver, and managing the
"AVERAGE_WIDTH" property in PCF fonts to return correct
character pixel (width/height) pairs for embedded bitmaps..
2002-02-06 11:22:56 +00:00
David Turner 025bbaa967 removing compiler warnings 2002-02-06 11:22:01 +00:00
Werner Lemberg 08270698e7 Adding the function `FT_Get_Next_Char', doing the obvious thing
w.r.t. the selected charmap.

* include/freetype/freetype.h: Add prototype.
* include/freetype/internal/ftdriver.h: Add `FTDriver_getNextChar'
typedef.
(FT_Driver_Class): Use it.
* include/freetype/internal/psnames.h: Add `PS_Next_Unicode_Func'
typedef.
(PSNames_Interface): Use it.
* include/freetype/internal/tttypes.h: Add `TT_CharNext_Func'
typedef.
(TT_CMapTable): Use it.

* src/base/ftobjs.c (FT_Get_Next_Char): New function, implementing
high-level API.
* src/cff/cffdrivr.c (cff_get_next_char): New function.
(cff_driver_class): Add it.
* src/cid/cidriver.c (Cid_Get_Next_Char): New function.
(t1cid_driver_class): Add it.
* src/pcf/pcfdriver.c (PCF_Get_Next_Char): New function.
(pcf_driver_class): Add it.
* src/psnames/psmodule.c (PS_Next_Unicode): New function.
(psnames_interface): Add it.
* src/sfnt/ttcmap.c (code_to_next0, code_to_next2, code_to_next4,
code_to_next6, code_to_next_8_12, code_to_next_10): New auxiliary
functions.
(TT_CharMap_Load): Use them.
* src/truetype/ttdriver.c (Get_Next_Char): New function.
(tt_driver_class): Add it.
* src/type1/t1driver.c (Get_Next_Char): New function.
(t1_driver_class): Add it.
* src/winfnt/winfnt.c (FNT_Get_Next_Char): New function.
(winfnt_driver_class): Add it.

* src/pcf/pcfread.c (pcf_load_font): For now, report Unicode for
Unicode and Latin 1 encodings.
2002-02-04 20:55:58 +00:00
Werner Lemberg 5b4691278c * builds/unix/freetype-config.in: Add missing `fi'. 2002-02-02 15:05:38 +00:00
David Turner f8d40f96c0 increasing FREETYPE_PATCH to 7 2002-02-01 09:22:39 +00:00
Werner Lemberg acf80aa238 Formatting. 2002-02-01 01:20:11 +00:00
David Turner 5eef31a04f updating documentation for 2.0.7 2002-01-31 17:42:05 +00:00
Werner Lemberg 708fd47251 *** empty log message *** 2002-01-30 22:37:52 +00:00
David Turner a104001612 moved INSTALL to docs/INSTALL to get rid of conflicts with the "install"
script on Windows (where the file system doesn't preserve CASE)
2002-01-30 12:56:16 +00:00
David Turner 8ac794cf04 fixed the "configure" script in the top-level directory..
It didn't work correctly when several arguments were passed
to it. For example, when typing:

  ./configure --disable-shared --prefix=/usr

the "--prefix=/usr" was incorrectly sent to the "make" program..
2002-01-29 18:13:54 +00:00
Werner Lemberg 43e5b1147d * README.UNX: Fix typo.
* builds/unix/install.mk (uninstall): Fix library name for libtool.
2002-01-29 01:11:23 +00:00
Werner Lemberg e8d3b9b75d * src/pcf/pcfdriver.c (PCF_Done_Face): Fix incorrect destruction of
the face object (face->toc.tables, face->root.family_name,
face->root.available_size, face->charset_encoding,
face->charset_registry are now freed).  Thanks to Niels Moseley.
2002-01-28 23:52:24 +00:00
Werner Lemberg 7c836c227c * src/type1/t1load.c (parse_encoding): Set `loader->num_chars'.
* src/type1/t1load.c (parse_subrs, parse_charstrings): Use copy
of `base' string for decrypting to not modify the original data.
2002-01-28 13:34:52 +00:00
Werner Lemberg 5e99e92619 * src/smooth/ftgrays.c (gray_render_scanline): Fix bug which caused
bad rendering of thin lines (less than one pixel thick).
2002-01-28 05:04:22 +00:00
Werner Lemberg 2ee087e487 * src/cff/cffdrivr.c (cff_get_name_index): Make last patch work
actually.
2002-01-25 22:55:53 +00:00
Werner Lemberg 840c2f268e * src/cache/ftccache.c (ftc_node_done, ftc_node_destroy): Fix
compilation warnings.
* src/base/descrip.mms (OBJS): Add `ftmm.obj'.
* src/cache/descrip.mms (ftcache.obj): Dependencies added.
2002-01-25 16:05:39 +00:00
Antoine Leca c511ad734b * docs/PATENTS: Typo fixed (Thanks to Detlef "Hawkeye" Wuerkner) in the URL for the on-line resource. 2002-01-21 21:57:38 +00:00
Werner Lemberg 9d7468015b Undo incorrect commit. 2002-01-19 02:24:22 +00:00
Werner Lemberg 6b86b0b54d * builds/win32/ftdebug.c: New file.
* builds/win32/visualc/freetype.dsp: Updated.

* builds/amiga/src/base/ftsystem.c: Updated for AmigaOS 3.9.
* builds/amiga/README: Updated.
2002-01-19 02:20:45 +00:00
Werner Lemberg 548de419a2 * builds/win32/visualc/freetype.dsp: Updated. 2002-01-18 09:00:44 +00:00
Werner Lemberg 08411e563d * builds/unix/freetype2.a4: The script was still buggy.
* builds/unix/freetype-config.in: Make it really work for any install
prefix.
2002-01-13 06:36:02 +00:00
Werner Lemberg 7d697ff893 * builds/unix/freetype2.a4: Fix some serious bugs. 2002-01-11 02:22:40 +00:00
Werner Lemberg b8ced96ce3 Formatting. 2002-01-09 21:01:18 +00:00
David Turner 944ac3747e small speed-up to the anti-aliased renderer 2002-01-09 10:48:25 +00:00
David Turner 82436dcc60 adding files 2002-01-08 18:34:11 +00:00
David Turner 9d283e504d added 'configure' and 'install' wrapper scripts to make the
installation process more Unix-friendly :-)
2002-01-08 18:33:55 +00:00
David Turner 6456a92ebb fixed html quoting in DocMaker 2002-01-07 12:09:51 +00:00
David Turner 7dc6718343 updating documentation 2002-01-07 10:40:48 +00:00
David Turner 4472fd437d * include/freetype/config/ftoption.h: setting default options for
a release build (debugging off, bytecode interpreter off)
2002-01-07 10:05:34 +00:00
David Turner 3837098a65 * src/base/ftobjs.c, src/base/ftoutln.c, src/cache/ftccmap.c,
src/cff/cffload.c, src/cff/cffobjs.c, src/pshinter/pshalgo2.c,
        src/sfnt/ttload.c, src/sfnt/ttsbit.c: removing small compiler
        warnings (in pedantic compilation modes)
2002-01-07 10:04:09 +00:00
Werner Lemberg 2a4ea10b05 formatting 2002-01-06 16:42:44 +00:00
David Turner f126ee26e7 the TrueType glyph loader is now much more paranoid, this avoids
unpleasant overwrites in the case of invalid glyph data (found in
the output of buggy font converters)

the computation of auto-hinted stem widths has been modified to
avoid certain color fringes in LCD-decimation rendering (a.k.a.
"ClearType")
2002-01-06 10:13:40 +00:00
David Turner 6ee4fcdeea added README.UNX for Unix users 2002-01-04 16:36:42 +00:00
David Turner b122d6d843 remove compiler warnings and a typo in builds/unix/ftsystem.c 2002-01-04 09:47:30 +00:00
Werner Lemberg 1ccd917ed6 * src/type1/t1objs.c (T1_Face_Init): Add cast to avoid compiler
warning.
2002-01-03 22:06:13 +00:00
David Turner 52ca40b522 * builds/unix/ftsystem.c (FT_New_Stream): added a fix to ensure that
all FreeType input streams are closed in child processes of a "fork"
        on Unix systems. This is important to avoid (potential) access
        control issues..
2002-01-03 17:08:20 +00:00
David Turner 1c2ef2b948 * src/type1/t1objs.c (T1_Face_Init): fixed a bug that crashed the
library when dealing with certain weird fonts (like "Stalingrad",
        in "sadn.pfb". This font has no full font name entry.. )

        * src/base/ftoutln.c, include/freetype/ftoutln.h: added the
        FT_Outline_Check API to check the consistency of outline data

        * src/base/ftobjs.c (FT_Load_Glyph): added a call to the new
        FT_Outline_Check to ensure that loaded glyphs are valid. This
        allows certain fonts like "tt1095m_.ttf" to be loaded even though
        it appears they contain really funky glyphs..

        there still is a bug there though.. !!
2002-01-03 16:56:59 +00:00
Werner Lemberg da0da4a5e8 Formatting. 2001-12-31 16:04:26 +00:00
David Turner dcf5e6e5c5 improving the computation of the advance widths of auto-hinted glyphs,
in order to produce better letter spacing..
2001-12-30 01:30:11 +00:00
Antoine Leca 21bdad1554 * builds/dos/detect.mk: Correcting the order for Borland compilers:
16-bit bcc was never selected, always overriden by 32-bit bcc32.
2001-12-25 20:54:33 +00:00
Werner Lemberg 39defae424 * src/pfc/pcfread.c (pcf_load_font): Handle property `POINT_SIZE'
and fix incorrect computation of `available_sizes'.
2001-12-23 01:38:53 +00:00
Werner Lemberg 964dd10db1 Formatting. 2001-12-23 00:56:36 +00:00
Werner Lemberg f2977cfcd6 New file. 2001-12-22 20:32:20 +00:00
David Turner eb147c6a0b fixing the autohinter: the advance of auto-hinted glyphs in mono-spaced fonts was incorrect 2001-12-22 16:07:52 +00:00
Werner Lemberg 4770f01cbe * builds/amiga/*: Adaptations to latest changes.
Support added for MorphOS.

* src/pshinter/pshrec.c (FT_COMPONENT): Redefine to `trace_pshrec'.
(ps_mask_table_merge, ps_hints_open, ps_hints_stem,
ps_hints_t1stem3, ps_hints_t2mask, ps_hints_t2counter): Fix
FT_ERROR messages.
* src/pshinter/pshalgo1.c (FT_COMPONENT): Define as
`trace_pshalgo1'.
* src/pshinter/pshalgo2.c (FT_COMPONENT): Define as
`trace_pshalgo2'.
* include/freetype/internal/ftdebug.h (FT_Trace): Updated.

* docs/modules.txt: New file.
2001-12-22 14:38:40 +00:00
David Turner ae69e7dc7d * src/cff/cffgload.c: added a comment regarding "cntrmask" operator
* src/pshinter/pshrec.c: now ignores invalid "hintmask" and "cntrmask"
        operators (instead of returning an error). Glyph 2028 of the CFF font
        "MSung-Light-Acro" couldn't be rendered otherwise (it seems its
        charstring is buggy, though this requires more analysis)..
2001-12-21 21:21:13 +00:00
David Turner de4383892e * src/cff/cffgload.c, src/psaux/t1decode.c, src/pshinter/pshrec.c,
src/pshinter/ahalgo2.c, src/pshinter/pshglob.h: fixed a bug where
        the X and Y axis where inversed in the postscript hinter. this
        caused problem when displaying on non-square surfaces..
2001-12-21 15:59:43 +00:00
David Turner 637dd17647 * src/cid/cidobjs.c (CID_Face_Done): fixed a memory leak, the subrs
routines were never released when CID faces were destroyed
2001-12-21 15:26:19 +00:00
David Turner 5fd895c9f4 * src/cid/cidobjs.c (CID_Face_Done): fixed a memory leak, the subrs
routines were never released when CID faces were destroyed
2001-12-21 15:20:48 +00:00
Werner Lemberg b3bf8144df Formatting. 2001-12-21 10:57:09 +00:00
David Turner 04658fcd81 * src/pshinter/pshglob.c (psh_globals_new): replaced a floating point
constant with a fixed-float equivalent. For some reason, some compilers
        aren't capable of directly computing a floating pointer constant casted
        to FT_Fixed, and will link a math library instead !!
2001-12-21 04:16:42 +00:00
Werner Lemberg aa78d59d23 * src/base/ftobjs.c (FT_Done_Library): Remove compiler warning.
Formatting.
2001-12-20 21:22:02 +00:00
Werner Lemberg a931abf7a1 Formatting.
* src/cache/ftccache.c (ftc_node_destroy, ftc_cache_lookup): Fix
tracing strings.
* src/cache/ftccmap.c (ftc_cmap_family_init): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Check): Ditto.
* src/cache/ftcsbits.c (ftc_sbit_node_load): Ditto.
2001-12-20 17:49:10 +00:00
David Turner 7c0403638f disabling bytecode interpreter 2001-12-20 13:34:21 +00:00
David Turner 90580798f3 * docs/CHANGES: updated for 2.0.6 release
* src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: updated
        to mode the definition of encoding tables within "cffload.c" instead
        of making them part of a shared header (causing problems in "multi"
        builds)
2001-12-20 13:33:03 +00:00
David Turner 988df8f3c3 * docs/TODO: added "stem3 and counter hints support" to the TODO list
for the Postscript hinter

        * docs/BUGS: closed the AUTOHINT-NO-SBITS bug.

        * src/pshinter/pshrec.c (t2_hint_stems), src/cff/cffobjs.h,
        src/cff/cffobjs.c, src/cff/cffload.c, src/cff/cffload.h,
        src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffdriver.c,
        include/freetype/internal/cfftypes.h: added Postscript hinter support
        to the CFF driver

        * src/base/ftobjs.c (FT_Done_Library): fixed a stupid bug that crashed
        the library on exit
2001-12-20 13:14:18 +00:00
David Turner 6ae4d20687 * src/type1/t1gload.c (T1_Load_Glyph): enable font matrix transform
on hinted glyphs..

        * src/cid/cidgload.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
        src/cid/cidriver.c, include/freetype/internal/t1types.h: added
        Postscript hinter support to the CID font driver !!
2001-12-20 09:36:21 +00:00
Werner Lemberg eed63c3f60 Formatting.
CFF encoding tables moved back from cffload.c to cffload.h.
2001-12-19 22:26:12 +00:00
David Turner 82350696e8 * src/truetype/ttgload.c (TT_Load_Glyph), src/base/ftobjs.c
(FT_Load_Glyph): "fixed" the bug that prevented embedded bitmaps from
        begin loaded when the auto-hinter is used.. This actually is a hack
        but will be enough until the internal re-design scheduled for
        FreeType 2.1
2001-12-19 21:09:16 +00:00
David Turner 1dc7596bb0 * include/freetype/cache/ftcache.h: added comments to indicate that
some of the exported functions should only be used by applications
        that need to implement custom cache types

        * src/truetype/ttgload.c: fixed a nasty bug that prevent composites
        from loading correctly. Believe it or not, this was due to an invalid
        macro definition !!
2001-12-19 19:17:35 +00:00
David Turner a179279b29 * src/sfnt/sfobjs.c (SFNT_Load_Face): make the "post" and "name"
tables optional to load PCL fonts properly
2001-12-19 14:59:23 +00:00
David Turner 2413394ce0 * src/raster/ftrend1.c (ft_raster1_render): fixed a nasty outline
shifting bug in the monochrome renderer.

        * README: updated version numbers to 2.0.6
2001-12-19 14:47:28 +00:00
Werner Lemberg 8016d9c7e7 * src/truetype/ttgload.c (load_truetype_glyph): Fix test for invalid
glyph header.
2001-12-17 16:21:22 +00:00
Werner Lemberg 3f70811c7d Updating/Formatting. 2001-12-16 23:53:39 +00:00
Werner Lemberg 5f63d74e57 * src/base/ftglyph (FT_Glyph_To_Bitmap): Remove compiler warning.
* include/freetype/ftcache.h (FTC_Node_Unref): Removed.  It is
already in ftcmanag.h.
* src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused variable
`gfam'.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
* ftc_family_table_free): Use FT_EXPORT_DEF.
* include/freetype/cache/ftcmanag.h: Updated.
* src/cache/ftccache.c (ftc_node_destroy): Use FT_EXPORT_DEF.
* src/cache/ftccmap.c (ftc_cmap_node_init): Remove unused variable
`cfam'.
Remove compiler warning.
(FTC_CMapCache_Lookup): Remove compiler warnings.
(ftc_cmap_family_init): Ditto.
(FTC_CMapCache_Lookup): Ditto.

* builds/unix/configure.ac: Increase `version_info' to 8:0:2.
* builds/unix/configure: Regenerated.

* builds/mac/README: Updated.
2001-12-16 08:17:33 +00:00
David Turner 24c7b56a57 * src/truetype/ttgload.c (load_truetype_glyph): fixing crash when dealing
with invalid fonts (i.e. glyph size < 10 bytes)..
2001-12-14 15:14:44 +00:00
David Turner 3b7f20b4ec * builds/mac/freetype.mac: a new Makefile to build with MPW on MacOS
classic..
2001-12-14 15:06:15 +00:00
David Turner bbb7c4652c fixing hinted advance width bug in all font drivers 2001-12-14 14:52:58 +00:00
David Turner 92827826f9 * src/pshint/pshglob.c: adding correct BlueScale/BlueShift support,
plus family blues processing

    * src/cff/cffgload.c: started adding support for the Postscript hinter
2001-12-12 16:07:29 +00:00
Werner Lemberg 110195a9cf * builds/unix/freetype2.m4: Some portability fixes. 2001-12-12 15:15:44 +00:00
Werner Lemberg 5f3c10e498 * src/base/descrip.mms (OBJS): Add ftdebug.obj. 2001-12-11 14:11:11 +00:00
Werner Lemberg 8a0b22f71c * src/sfnt/ttload.c (TT_Load_Generic_Header): Typos. 2001-12-11 14:09:06 +00:00
David Turner c6f84561f5 * src/base/fttrigon.c (FT_Cos): fixed a small bug that caused slightly
improper results for FT_Cos and FT_Sin (example: FT_Sin(0) == -1 !!)
2001-12-11 13:49:55 +00:00
David Turner 36ba9d87a5 * builds/unix/freetype-config.in: modified the script to prevent
passing "-L/usr/lib" to gcc

        * docs/FTL.TXT: simple fix (change "LICENSE.TXT" to "FTL.TXT")

        * builds/unix/freetype2.m4: added autoconf macro, we need to install
        it in $(prefix)/share/aclocal/freetype2.m4 but I didn't modified
        builds/unix/install.mk yet..
2001-12-11 13:38:52 +00:00
David Turner 9681c93f05 * include/freetype/internal/ftstream.h: fixed the definitions of
GET_LongLE and GET_ULongLE which where incorrect (creating problems
        in the pcf driver)..

        * INSTALL: updated the instructions to build shared libraries with
        Jam.. they were simply erroneous..
2001-12-11 13:14:41 +00:00
David Turner 0ffc299a70 * src/pcf/pcfdriver.c (PCF_Init_Face): allow Xft to use PCF fonts
by setting the "face->metrics.max_advance" correctly..
2001-12-10 10:47:47 +00:00
David Turner ea5ef83f3a small fix 2001-12-08 00:54:19 +00:00
Werner Lemberg 40c2b91140 Formatting. 2001-12-07 21:56:32 +00:00
David Turner 1d1edb49bd added new charmap cache. see include/freetype/cache/ftccmap.h 2001-12-07 14:43:45 +00:00
Leonard Rosenthol 60979e0cc3 Noted my Mac OS changes from today 2001-12-07 01:51:48 +00:00
Werner Lemberg 447218cfac *** empty log message *** 2001-12-06 18:37:52 +00:00
Werner Lemberg 1455700b17 * INSTALL: Small update. 2001-12-06 18:37:34 +00:00
Leonard Rosenthol 33e59a9cb4 Exported new routine for getting a path from a name 2001-12-06 17:52:40 +00:00
Leonard Rosenthol 7532426c0b Added support for Mac OS X .dfonts and also getting a filespec for a given font by name 2001-12-06 17:52:06 +00:00
David Turner 2cee961654 oops, forgot to add new file and remove old one in src/cache 2001-12-06 16:45:26 +00:00
David Turner 7ebd63726b * src/base/ftglyph.c (FT_Glyph_To_Bitmap): re-ordered code for debugging
purposes..


    * src/smooth/ftsmooth.c (ft_smooth_render): fixed a nasty hidden bug where
    outline shifting wasn't correctly undone after bitmap rasterization. this
    created problems with certain glyphs (like '"' of certain fonts..) and
    the cache system..
2001-12-05 17:24:34 +00:00
David Turner 7b37145b63 First of all, a big thanks to Werner and Antoine for their latest work !!
* src/pshinter/pshalgo2.c (psh2_hint_table_init),
      src/pshinter/pshalgo1.c (psh1_hint_table_init): removed compiler
      warnings

    * include/freetype/cache/*, src/cache/*: yet another massive rewrite of
    the caching sub-system, in order to both increase performance and allow
    simpler cache sub-classing. As an example, the code for the image and
    sbit caches is now much simpler

    I still need to update the documentation in www/freetype2/docs/cache.html
    to reflect the new design though..
2001-12-05 15:59:33 +00:00
Werner Lemberg 05f271b5d4 Formatting.
Cleaning up of ChangeLog.

* docs/license.txt: s/X Windows/X Window System/.

* src/raster/ftraster.c: Fix definition condition of MEM_Set().
* src/smooth/ftgrays.c (M_Y): Change value to 192.
* src/base/ftdbgmem.c (ft_mem_table_destroy): Fix printf() parameter.
Remove unused variable.
* src/cache/ftcimage.c (ftc_image_node_init,
ftc_image_node_compare): Remove unused variables.
* src/cache/ftcsbits.c (ftc_sbit_node_weight): Remove unused
variable.
* src/raster/ftraster.c (MEM_Set): Move definition down to avoid
compiler warning.
* src/autohint/ahhint.c (ah_hinter_hint_edges): Use UNUSED() to
avoid compiler warnings.
* src/pcf/pcfread.c (tableNames): Use `const'.
(pcf_read_TOC): Change counter name to avoid compiler warning.
Use `const'.
* src/pshinter/pshrec.c (ps_hints_close): Remove redundant
declaration.
* src/pshinter/pshalgo1.c (psh1_hint_table_init): Rename variables
to avoid shadowing.
* src/pshinter/pshalgo2.c (psh2_hint_table_activate_mask): Ditto.
* src/type1/t1objs.h: Remove double declarations of `T1_Size_Init()'
and `T1_Size_Done()'.
2001-12-05 01:22:05 +00:00
Antoine Leca 58c48a4324 * include/freetype/ttnameid.h: Added some new Microsoft language
codes and LCIDs as found in MSDN (Passport SDK). Also added
comments about the meaning of bit 57 of OS/2 (TT_UCR_SURROGATES)
which with OpenType v.1.3 now means "there is a character beyond
FFFF in this font". Thanks to Detlef Wuerkner <TetiSoft@apg.lahn.de>
for noticing this.
2001-11-20 19:22:13 +00:00
David Turner 782d522028 * src/pshinter/{pshalgo2.c, pshalgo1.c}: fixed stupid bug in sorting
routine that created nasty alignment artefacts.

        * src/pshinter/pshrec.c, tests/gview.c: debugging updates..

        * src/smooth/ftgrays.c: de-activated experimental gamme support,
        apparently, "optimal" gamma tables depend on the monitor type,
        resolution and general karma, so it's better to compute them outside
        of the rasterizer itself..
2001-11-20 01:29:34 +00:00
David Turner 9f892b4ef1 * src/smooth/ftgrays.c: adding experimental "gamma" support. This
produces smoother glyphs at small sizes for very little cost

	* src/autohint/ahglyph.c, src/autohint/ahhint.c: various fixes to
	the auto-hinter. They merely improve the output of sans-serif fonts.
	Note that there are still problems with serifed fonts and composites
	(accented characters)

	* tests/gview.c: updated the debugging glyph viewer to show the
	hints generated by the "autohint" module
2001-10-30 23:51:24 +00:00
David Turner 5869f481a2 other auto-hinter experiments not worthy of a Changelog entry 2001-10-29 17:22:12 +00:00
David Turner f5b9207bce experimental changes to debug the auto-hinter. These are not
worthy of a Changelog entry yet..
2001-10-29 10:45:57 +00:00
David Turner d9229cc2ef fixed a small performance bug in the new cache sub-system implementation 2001-10-27 17:36:04 +00:00
Tom Kacvinsky 7a517e472a Changed a minor typo. 2001-10-26 18:02:15 +00:00
Tom Kacvinsky 07bc78581c Changed tjk@ams.org to tkacvins@freetype.org. 2001-10-26 18:01:32 +00:00
David Turner 09adc1c1b3 _major_ re-design of the caching sub-system. Still using the same API
though :-)
2001-10-26 16:58:27 +00:00
Leonard Rosenthol e53664dbd8 Incorporated changes for faces other than the first 2001-10-26 13:24:39 +00:00
Leonard Rosenthol f2226097e7 Changed to reflect current status 2001-10-26 13:23:56 +00:00
Leonard Rosenthol 0d630d7886 Added changes about MacOS stuff 2001-10-26 13:23:38 +00:00
David Turner 49ba9e45f2 a few updates used to debug the auto-hinter as well as
try to improve it significantly
2001-10-26 07:21:38 +00:00
Leonard Rosenthol b268aa9fb5 Added change about ftlib.prj 2001-10-25 16:04:24 +00:00
Leonard Rosenthol 27f2f53fa7 Updated project to CodeWarrior 7 and latest FT source files 2001-10-25 15:56:01 +00:00
David Turner 2271a84bbd updated comment explaining how to use project-specific
option (and module) files
2001-10-24 23:33:31 +00:00
Tom Kacvinsky 1b138a4260 * builds/unix/ftsystem.c (FT_New_Memory): Added a missing `}'. 2001-10-24 14:45:15 +00:00
Tom Kacvinsky 3f154085ed In function FT_New_Memory, added a missing `}'. 2001-10-24 14:43:40 +00:00
David Turner d4b4ccb8b3 * include/freetype/internal/ftmemory.h, src/base/ftdbgmem.c:
improvements to the memory debugger to report more information in
	case of errors. Also, some allocations that occured through
	REALLOC couldn't be previously catched correctly..
2001-10-24 08:04:00 +00:00
David Turner 864a36ad78 replaced liberal uses of "memset" by the "MEM_Set" macro call
(some platforms don't provide this ANSI function !!)

some changes to "ftsystem.c" implementations in order to use
the new memory debugger on Unix, VMS and Amiga too !!
2001-10-24 07:32:55 +00:00
David Turner 86ef2a6a8d replaced liberal uses of "memset" by the "MEM_Set" macro call
(some platforms don't provide this ANSI function !!)
2001-10-24 07:31:03 +00:00
David Turner 538072bb84 updating the debugging memory manager to run on Unix, VMS and
Amiga too (since they use a custom version of "ftsystem.c" !!)
2001-10-23 20:19:01 +00:00
David Turner 63fbd8644a updating debug manager 2001-10-22 20:15:29 +00:00
David Turner 1a5b515ca8 removed bogus warnings 2001-10-22 15:24:32 +00:00
David Turner c1b7ca25b8 * include/freetype/internal/ftmemory.h, src/base/ftdbgmem.c: modified
the debugging memory manager to report the location (source file name
        + line number) where leaked memory blocks are allocated in the source
        file..  funny, isn't it ??
2001-10-22 14:50:41 +00:00
David Turner 9cd8c10950 Added a new debugging memory manager implementation. See the
FT_DEBUG_MEMORY macro definition in "ftoption.h", as well as the
file "src/base/ftdbgmem.c"
2001-10-22 08:32:21 +00:00
Tom Kacvinsky fdba894d21 2001-10-21 Tom Kacvinsky <tjk@ams.org>
* src/cff/cffload.c (CFF_Done_Font): Free subfonts array only if
        we are working with a CID keyed CFF font.  Otherwise, a variable
        that was never allocated memory might freed.  This is a correction
        to the previous patch for freeing subfonts.
2001-10-21 20:30:54 +00:00
Tom Kacvinsky c1130459e8 In function CFF_Done_Font, make sure that subfonts are freed only if
we are working with a CID keyed CFF font.  This is to avoid freeing a
variable that might not have been allocated.
2001-10-21 20:26:59 +00:00
Tom Kacvinsky c5d0d00cdc 2001-10-21 Tom Kacvinsky <tjk@ams.org>
* src/cff/cffload.c (CFF_Done_Font): Free the subfonts array to
        avoid a memory leak.
2001-10-21 16:30:59 +00:00
Tom Kacvinsky 7579edc55e In function CFF_Done_Font, make sure to free the subfonts array to
avoid a memory leak.
2001-10-21 16:29:16 +00:00
David Turner 9b8f633b87 * src/type1/t1load.c: fixed memory leak bugs that appeared with certain
synthetized fonts (e.g. CourierBoldOblique, a.k.a. "cobo_____.pfb")

	* src/pshinter/pshalgo2.c, src/pshinter/pshalgo1.c,
	src/pshinter/pshglob.c: removing compiler warnings in pedantic modes
	(in multi-object compilation mode, mainly)
2001-10-21 15:41:11 +00:00
Tom Kacvinsky d57a82312f Added another entry for t1load.c related to synthetic fonts: make sure
that custom encodings are not loaded twice (thus avoiding a memory
leak).
2001-10-20 20:49:58 +00:00
Tom Kacvinsky d6eb0a267a In function parse_encoding, add a test to make sure that custom
encodings (i.e., neither StandardEncoding nor ExpertEncoding) are not
loaded twice when the Type 1 font is synthetic.
2001-10-20 20:46:36 +00:00
Tom Kacvinsky 5f5f371b87 Added entries for changes to t1load.c. 2001-10-20 17:53:22 +00:00
Tom Kacvinsky 33c989b7c6 In functions parse_font_name and parse_subrs, added a test for when
loading synthetic fonts to make sure that the font name and
subrotuines are not loaded twice.  This is to remove a memory leak
that occurs because the original allocation for these objects is not
deallocated when the objects are read the second time.
2001-10-20 17:44:48 +00:00
Werner Lemberg ab106cbbac renaming todo -> TODO 2001-10-20 01:29:38 +00:00
David Turner ce68a3db4f getting rid of compiler warnings 2001-10-19 09:17:49 +00:00
David Turner ef8c5d41df another small test of the CVS loginfo setup 2001-10-19 08:15:28 +00:00
David Turner 45a518360b adding or updating files to the old build system to compile
the library with the Postscript hinter correctly..
2001-10-19 07:34:20 +00:00
David Turner c9ae7e72e6 just testing the CVS loginfo setup 2001-10-18 15:02:47 +00:00
David Turner d89e3ec521 just testing the CVS loginfo setup 2001-10-18 14:58:45 +00:00
David Turner 8fcb79c8c6 just testing the CVS loginfo setup 2001-10-18 14:57:28 +00:00
David Turner bfdaf0bfca just testing the CVS loginfo setup 2001-10-18 14:54:49 +00:00
David Turner 812a8fabf7 just testing the CVS loginfo setup 2001-10-18 14:50:01 +00:00
David Turner 48815fc8c3 just testing the CVS loginfo setup 2001-10-18 14:49:12 +00:00
David Turner 2ab4833518 just testing the CVS loginfo setup 2001-10-18 14:45:28 +00:00
David Turner 99fc859697 just testing the CVS loginfo setup 2001-10-18 14:36:46 +00:00
David Turner 701efef72e just testing the CVS loginfo setup 2001-10-18 14:35:52 +00:00
David Turner 1585605454 just testing the CVS loginfo setup 2001-10-18 14:33:11 +00:00
David Turner 617579b75b just testing the CVS loginfo setup 2001-10-18 14:31:41 +00:00
David Turner 5f2d493fea just testing the CVS loginfo setup 2001-10-18 14:27:43 +00:00
David Turner 4a458a1f43 just testing the CVS loginfo setup 2001-10-18 14:25:38 +00:00
David Turner 05bcf2cf55 just testing the CVS loginfo setup 2001-10-18 14:12:44 +00:00
David Turner acfbbcf3ad just testing the CVS loginfo setup 2001-10-18 14:10:23 +00:00
David Turner 76e596c08c just testing the CVS loginfo setup 2001-10-18 14:07:06 +00:00
David Turner c4c4edbc1e just testing the CVS loginfo setup 2001-10-18 14:02:15 +00:00
David Turner 4ae546a2f2 just testing the CVS loginfo setup 2001-10-18 14:00:54 +00:00
David Turner 17151ce6f6 just testing the CVS loginfo setup 2001-10-18 13:58:05 +00:00
David Turner d305744dad just testing the CVS loginfo setup 2001-10-18 13:52:47 +00:00
David Turner 6ee6f94705 documentation update 2001-10-18 13:22:01 +00:00
David Turner 1a2af1f3d5 rewrote "glnames.py" to fix a rather nasty bug that made FreeType
return incorrect glyph names for certain glyph indices..
2001-10-18 13:20:01 +00:00
David Turner 9e1a4b4271 updating ChangeLog and Jamfile for the new Postscript hinter 2001-10-18 11:59:08 +00:00
David Turner e57a868725 changing pixel size computations for better accuracy (experimental) 2001-10-18 11:57:52 +00:00
David Turner b557d4951c Adding glyph hinter debugging program.
WARNING:
You cannot compile this program without a (yet) unavailable
third-party library named "Nirvana".. this is reserved for FreeType
development exclusively..
2001-10-18 11:50:31 +00:00
David Turner 94bec3e1ba add support for new postscript hinter 2001-10-18 11:49:26 +00:00
David Turner fa69bbec01 add support for new postscript hinter 2001-10-18 11:46:25 +00:00
David Turner e888167e1f adding new postscript hinter 2001-10-18 11:38:43 +00:00
David Turner 02701db9ce adding support to new postscript hinter 2001-10-18 11:26:21 +00:00
David Turner de3fb83c68 fixing a "bug" that affected the Postscript hinter: growing a memory block
though "realloc" didn't clear the new bytes of memory..
2001-10-18 11:23:51 +00:00
David Turner e65e9b13c2 fixed typo 2001-10-18 10:27:56 +00:00
David Turner d2271084d3 updated FT_Div64by32 2001-10-18 09:51:09 +00:00
David Turner 60438ae490 minimal optimisation submitted by Graham Asher 2001-10-17 14:29:51 +00:00
David Turner 511fa11bd8 documentation update for 2.0.5 2001-10-17 13:57:02 +00:00
David Turner 01fbfe3e75 implementing a new function named "FT_Get_Postscript_Name" to
retrieve a face's "unique" Postscript name
2001-10-17 13:48:10 +00:00
David Turner 970c162290 tagging files, checking new CVS -> mail script 2001-10-17 11:33:01 +00:00
Werner Lemberg 6a36a6db05 Fixed a bug in `glnames.py' that prevented it from generating
correct glyph names tables.  This resulted in the unavailability of
certain glyphs like `Cacute', `cacute' and `lslash' in Unicode
charmaps, even if these were present in the font (causing problems
for Polish users).

* src/tools/glnames.py (mac_standard_names): Fixed.
(t1_standard_strings): Some fixes and renamed to ...
(sid_standard_names): This.
(t1_expert_encoding): Fixed.
(the_adobe_glyph_list): Renamed to ...
(adobe_glyph_names): This.
(the_adobe_glyphs): Renamed to ...
(adobe_glyph_values): This.
(dump_mac_indices, dump_glyph_list, dump_unicode_values, main):
Updated.
* src/psnames/pstables.h: Regenerated.
* src/psnames/psmodule.c (PS_Unicode_Value): Fix offset.
Fix return value.
Use `sid_standard_table' and `ps_names_to_unicode' instead of
`t1_standard_glyphs' and `names_to_unicode'.
(PS_Macintosh_Name): Use `ps_glyph_names' instead of
`standard_glyph_names'.
(PS_Standard_Strings): Use `sid_standard_names' instead of
`t1_standard_glyphs'.
* doc/BUGS, doc/TODO: New documents.
* src/cache/ftlru.c (FT_Lru_Lookup_Node): Fixed a bug that prevented
correct LRU behaviour.
setjmp() and longjmp() are now used for rollback (i.e. when memory
pool overflow occurs).
Function names are now all uniformly prefixed with `gray_'.

* src/smooth/ftgrays.c: Include <setjmp.h>.
(ErrRaster_MemoryOverflow): New macro.
(TArea): New type to store area values in each cell (using `int' was
too small on 16-bit systems).  <limits.h> is included to properly
get the needed data type.
(TCell, TRaster): Use it.
(TRaster): New element `jump_buffer'.
(gray_compute_cbox): Use `RAS_ARG' as the only parameter and get
`outline' from it.
(gray_record_cell): Use longjmp().
(gray_set_cell): Use gray_record_cell() for error handling.
(gray_render_line, gray_render_conic, gray_render_cubic): Simplify.
(gray_convert_glyph_inner): New function, using setjmp().
(gray_convert_glyph): Use it.


Provide a public API to manage multiple size objects for a given
FT_Face in the new header file `ftsizes.h'.

* include/freetype/ftsizes.h: New header file,
* include/freetype/internal/ftobjs.h: Use it.
Remove declarations of FT_New_Size and FT_Done_Size (moved to
ftsizes.h).
* include/freetype/config/ftheader.h (FT_SIZES_H): New macro.
* src/base/ftobjs.c (FT_Activate_Size): New function.
* src/cache/ftcmanag.c: Include ftsizes.h.
(ftc_manager_init_size, ftc_manager_flush_size): Use
FT_Activate_Size.
2001-10-10 19:56:42 +00:00
David Turner 05e3ed907c updating CHANGES
preparing for the 2.0.5 release
2001-10-09 07:32:50 +00:00
David Turner b246a5efd6 * src/psnames/pstables.h, src/psnames/psmodule.c, src/tools/glnames.py:
fixed a bug in 'glnames.py' that prevented it from generating correct
	glyph names table. This resulted in the unavailability of certain glyphs
	like "Cacute", "cacute" and "lslash" in Unicode charmaps, even if these
	were present in the font (causing problems for Polish users).
2001-10-08 21:18:11 +00:00
David Turner f70cf971a8 oops, forgot to add this file 2001-10-08 20:46:37 +00:00
David Turner 78b6740ff2 * include/freetype/ftsizes.h, src/base/ftobjs.c, src/cache/ftcmanag.c:
added a new header, named "ftsizes.h" (FT_SIZES_H) to provide a public
	API to manage multiple size objects for a given FT_Face.
2001-10-07 13:30:26 +00:00
David Turner 8bb7aba785 * src/cache/ftlru.c (FT_Lru_Lookup_Node): fixed a bug that prevented
correct LRU behaviour
2001-10-07 11:06:07 +00:00
David Turner 30c58089e4 * src/smooth/ftgrays: "setjmp/longjmp" is now used for rollback (i.e.
when memory pool overflow occurs), function names are now all prefixed
	with "gray_", and a new type (TArea) is defined to store area value in
	each cell (using "int" was too small on 16-bit systems)..
2001-10-07 10:39:03 +00:00
David Turner 0a746fadff Adding a new file named docs/BUGS contained a table of known bugs
of the library

Updated the docs/CHANGES and docs/TODO documents slightly
2001-10-05 14:23:03 +00:00
David Turner 70a2c42586 fixing a bug related to decoding glyph names like "uniXXXX" into
Unicode character codes
2001-10-05 09:42:50 +00:00
Werner Lemberg c3ec1c6580 *** empty log message *** 2001-09-20 12:01:09 +00:00
Werner Lemberg 7b2726963f Amiga port 2001-09-20 11:58:51 +00:00
Werner Lemberg 263f61bfb1 Initial revision 2001-09-20 11:58:51 +00:00
Werner Lemberg 093edacc49 * src/type1/t1afm.c (T1_Done_AFM): Free `afm'. 2001-09-15 10:05:12 +00:00
Werner Lemberg fc56e11bed * src/sfnt/ttcmap.c (code_to_index2): Handle code values with
hi-byte == 0 correctly.

* builds/link-std.mk ($(PROJECT_LIBRARY)): Fix typo.
2001-09-10 13:11:52 +00:00
Werner Lemberg ef87351494 formatting 2001-09-10 06:55:43 +00:00
David Turner 5780b17432 file pshoptim.h was initially added on branch VER-2-0-4-PATCH. 2001-09-04 14:17:51 +00:00
David Turner 782acf1c31 file pshoptim.c was initially added on branch VER-2-0-4-PATCH. 2001-09-04 14:17:51 +00:00
David Turner 2e271f247f Martin Muskens bufixes:
- reallocation bug in T1_Table_Add
  - increased accuracy of units per EM computation in T1 fonts
  - support "+" as valid font name character (used in embedded fonts)
2001-08-30 07:59:28 +00:00
David Turner f09ddd430f fixed Type1 kerning flag setting when reading AFM file 2001-08-30 06:56:03 +00:00
Werner Lemberg 9f1c1c718f * src/sfnt/ttload.c (TT_Load_CMap): Fix frame length of
`cmap_rec_fields'.

* include/freetype/fterrors.h [!FT_CONFIG_OPTION_USE_MODULE_ERRORS]:
Undefine FT_ERR_BASE before defining again.
2001-08-24 23:11:34 +00:00
Werner Lemberg 95d5bc6f0d * src/truetype/ttinterp.h: Fix prototype of TT_Move_Func.
Some formatting
2001-08-22 18:35:06 +00:00
Werner Lemberg ada5726e2c * builds/dos/dos-def.mk (NO_OUTPUT): Don't use `&>' but `>'. 2001-08-21 15:49:24 +00:00
David Turner 716d55e61d updating the definition of FT_CONFIG_OPTION_USE_MODULE_ERRORS
to _undefined_ (source compatibility breaking issue) + updated its comment

back from holidays, woohoo :-)
2001-08-21 08:50:45 +00:00
Werner Lemberg f2cc4a235e * src/base/ftcalc.c (FT_MulDiv): Fixed serious typo. 2001-08-18 05:09:42 +00:00
Werner Lemberg 159d431faa Updating to OpenType 1.3.
* include/freetype/internal/tttypes.h (TT_CMap0, TT_CMap2, TT_CMap4,
TT_CMap6): Adding field `language'.
(TT_CMapTable): Removing field `language'.
Type of `length' field changed to FT_ULong.
Adding fields for cmaps format 8, 10, and 12.
(TT_CMapGroup): New auxiliary structure.
(TT_CMap8_12, TT_CMap10): New structures.
* include/freetype/tttables.h (TT_HoriHeader, TT_VertHeader):
Removed last element of `Reserved' array.
* include/freetype/ttnameid.h (TT_PLATFORM_CUSTOM, TT_MS_ID_UCS_4,
TT_NAME_ID_CID_FINDFONT_NAME): New macros.

* src/sfnt/ttcmap.c (TT_CharMap_Load): Updated loading of `language'
field to the new structures.
Fixed freeing of arrays in case of unsuccessful loads.
Added support for loading format 8, 10, and 12 cmaps.
(TT_CharMap_Free): Added support for freeing format 8, 10, and 12
cmaps.
(code_to_index4): Small improvement.
(code_to_index6): Ditto.
(code_to_index8_12, code_to_index10): New functions.
* src/sfnt/ttload.c (TT_Load_Metrics_Header): Updated to new
structure.
(TT_Load_CMap): Ditto.

* src/sfnt/sfobjs.c (tt_encodings): Add MS UCS4 table (before MS
Unicode).


* src/type1/t1driver.c (t1_get_name_index): Fix compiler warning.
2001-08-13 11:44:29 +00:00
Tom Kacvinsky 9a6ac0e25b Added entries for chnages to t1driver.c (new name_index function,
function name change)

Added entries for cffdrivr.c (documentation fix, function name change)
2001-08-09 01:21:24 +00:00
Tom Kacvinsky ca44b53c4f Changed function get_cff_glyph_name to cff_get_glyph_name for
consistency.

Minor documentation change for function cff_get_glyph_index.
2001-08-09 01:13:43 +00:00
Tom Kacvinsky 6aa63338f8 Added function t1_get_name_index and changed Get_Interface to return
this function when the "name_index" function is requested.

Changed get_t1_glyph_name to t1_get_glyph_name for consistency.
2001-08-09 01:06:33 +00:00
Tom Kacvinsky 0dc3dbb10a Added entries for changes to CFF driver (moved some assignments from
source file to header and added glyph name index requestor function).

Added entries for chnages to FreeType includes for new function
FT_Get_Name_Index.
2001-08-08 11:18:13 +00:00
Tom Kacvinsky d6ab72316b Added documentation and prototype for new function FT_Get_Name_Index. 2001-08-08 11:08:58 +00:00
Tom Kacvinsky 845661a0fe Added FT_Name_Index_Requester, a function pointer type defintion used
for in the function FT_Get_Name_Index.
2001-08-08 11:02:12 +00:00
Tom Kacvinsky 43f2a3f0f5 Added function FT_Get_Name_Index, used to return a glyph index for a
given glyph name only if the driver supports glyph names.
2001-08-08 10:58:08 +00:00
Tom Kacvinsky 3e92275489 Added function cff_get_name_index, used as a requestor function for
FT_Get_Name_Index.  Also, modified cff_get_interface so that it returns the
function cff_get_name_index when the "name_index" function is requested.
2001-08-08 10:51:44 +00:00
Tom Kacvinsky cf1fafcc24 Added definitions of cff_isoadobe_charset, cff_expert_charset, cff_expertsubset_charset,
cff_standard_encoding, and cff_expert_encoding arrays.
2001-08-08 10:45:08 +00:00
Tom Kacvinsky cdc64b3ee5 Removed definitions of cff_isoadobe_charset, cff_expert_charset, cff_expertsubset_charset,
cff_standard_encoding, and cff_expert_encoding arrays to cffload.h.
2001-08-08 10:42:44 +00:00
Werner Lemberg 7fd46180f5 * builds/cygwin/*: Removed. Use the unix stuff instead.
* builds/vms/ftconfig.h (FT_CALLBACK_DEF): Updated to change dated
2001-06-27.
2001-07-26 13:17:21 +00:00
Werner Lemberg 9a8cf37202 *** empty log message *** 2001-07-17 12:44:49 +00:00
Werner Lemberg cabdc818b6 * include/freetype/internal/psaux.h (PS_Table): Use FT_Offset for
`cursor' and `capacity'.
* src/psaux/psobjc.c (reallocate_t1_table): Use FT_Long for second
parameter.
(PS_Table_Add): Use FT_Offset for `new_size'.


* src/base/ftsynth.c: Include ftcalc.h unconditionally.
2001-07-17 12:37:54 +00:00
David Turner 4a8b5ea4fe file pshfit.c was initially added on branch VER-2-0-4-PATCH. 2001-07-17 07:24:37 +00:00
David Turner 877fe63056 file pshfit.h was initially added on branch VER-2-0-4-PATCH. 2001-07-17 07:24:37 +00:00
Werner Lemberg b7fedd59a8 2001-07-13 Werner Lemberg <wl@gnu.org>
* src/base/ftsynth.c: Include ftcalc.h unconditionally.
2001-07-12 22:41:08 +00:00
Werner Lemberg dbd0f4ef35 formatting 2001-07-12 21:46:44 +00:00
Werner Lemberg c62c60ef49 formatting 2001-07-07 23:24:02 +00:00
David Turner c3686096b1 removed pedantic compiler warnings when the bytecode
interpreter is compiled in the library
2001-07-07 16:12:14 +00:00
David Turner ada139f474 * include/internal/ftstream.h: modified the definitions
of the FT_GET_XXXX and NEXT_XXXX macros for 16-bit correctness
2001-07-06 13:52:36 +00:00
Werner Lemberg 2d17901f66 * src/autohint/ahhint.c (ah_hinter_align_weak_points): Remove
unused variable `edges'.
(ah_hinter_load): Remove unused variables `old_width' and
`new_width'.
* src/cid/cidload.c (cid_decrypt): Use `U' for constant (again).
* src/psaux/psobjs.c (T1_Decrypt): Ditto.
* src/type1/t1parse.c (T1_Get_Private_Dict): Ditto.
2001-07-03 12:45:24 +00:00
Werner Lemberg 08146ba16b finishing function header formatting
updating copyrights
2001-06-28 17:49:10 +00:00
Werner Lemberg 3544916a6b formatting 2001-06-28 07:17:51 +00:00
Werner Lemberg 38df7df0e2 formatting 2001-06-27 23:25:46 +00:00
Werner Lemberg 9f174a19d7 next round in function header formatting 2001-06-27 19:46:12 +00:00
Werner Lemberg b5cb4bb2e1 * src/cid/cidload.c, src/cid/cidload.h (cid_decrypt): Use FT_Offset
instead of FT_Int as type for `length' parameter.
* include/freetype/internal/psaux.h (PSAux_Interface): Updated.


* src/psaux/psobjs.c, src/psaux/psobjs.h (T1_Decrypt): Use FT_Offset
instead of FT_Int as type for `length' parameter.
2001-06-27 17:06:28 +00:00
Werner Lemberg 3bf2f63e4a First round in converting
type foo ( ... )

to

  type
  foo ( ... )

Other minor formatting issues.
2001-06-27 16:18:10 +00:00
David Turner fe7f3b4f62 doc update 2001-06-27 12:42:10 +00:00
David Turner d0f20a15f5 the SFNT Kerning table loader now ensures that the table is correctly
sorted.
2001-06-27 12:40:46 +00:00
David Turner 37fb4854bb formatting/bug fix 2001-06-27 11:08:25 +00:00
David Turner a20ad4b9ef changed the definition of FT_CALLBACK_DEF 2001-06-27 10:54:13 +00:00
David Turner cc40f83ffd * include/freetype/ftconfig.h, src/*/*.c: changed the definition and
uses of the FT_CALLBACK_DEF macro in order to support 16-bit compilers
2001-06-27 09:26:46 +00:00
Werner Lemberg e4fb0e73c4 * include/freetype/internal/ftstream.h (FT_GET_OFF3_LE): Fix typo.
* src/base/ftcalc.c (ft_div64by32): Fixed the source to work
correctly on 16-bit systems.
* docs/PATENTS: Added patents disclaimer.  This one was missing!
* docs/CHANGES, docs/todo: Updated for the upcoming 2.0.4 release.
2001-06-26 05:57:19 +00:00
David Turner 08e755bbf0 fixed the 64-bits division computation for 16-bits systems 2001-06-24 17:23:45 +00:00
Werner Lemberg 609a20d0fa Formatting. 2001-06-23 22:06:00 +00:00
David Turner a7d527c6e8 adding Debian build directory 2001-06-23 07:44:51 +00:00
Werner Lemberg 5cc78ed59a Formatting. 2001-06-22 17:17:47 +00:00
Werner Lemberg 7e4140d0e7 Add cast in pcfread.c. 2001-06-22 17:08:26 +00:00
David Turner 0c6c5ba972 file psrecord.c was initially added on branch VER-2-0-4-PATCH. 2001-06-22 16:18:54 +00:00
David Turner 8f43734013 file psrecord.h was initially added on branch VER-2-0-4-PATCH. 2001-06-22 16:18:54 +00:00
David Turner fa6720d0f5 updated documentation for the 2.0.4 release 2001-06-22 08:45:31 +00:00
Werner Lemberg 6b4e8d93ae * include/freetype/config/ftconfig.h: Add two more `L's to
constants.
Add missing semicolons.

* builds/toplevel.mk: Do similar change as for
builds/unix/detect.mk.

* include/freetype/freetype.h (FT_ENC_TAG): New version to make it
easier to redefine.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.

* include/freetype/freetype.h (FT_New_Memory_Face): Updated
2001-06-20 08:06:50 +00:00
Werner Lemberg 93da21f8d7 Formatting. 2001-06-19 23:03:41 +00:00
David Turner 0ef83eda7c * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
updated the Visual C++ project (for the 2.0.4 release)

        * builds/unix/detect.mk: added rule for AIX detection (which uses
        /usr/sbin/init instead of /sbin/init, go figure..)
2001-06-19 15:45:48 +00:00
David Turner c7b1d818a8 * include/freetype/fterrors.h: updated some of the error macros to
simplify Werner's latest tricks :o)
2001-06-19 13:41:59 +00:00
Werner Lemberg 8ec0b130d8 Formatting. 2001-06-19 09:11:18 +00:00
David Turner 3d2be25ba1 - updated doc for FT_New_Memory_Face
- removed lots of compiler warnings in lint-style
  warning modes (/W4 with Visual C++)
2001-06-19 08:28:24 +00:00
Werner Lemberg b90818ed82 Minor cleanups to remove compiler warnings.
* include/freetype/cache/ftcmanag.h (FTC_MAX_BYTES_DEFAULT): Use
`L' for constant.
* include/freetype/config/ftoption.h (FT_RENDER_POOL_SIZE): Ditto.
* src/base/ftcalc.c (FT_MulDiv): Use `L' for constant.
* src/base/ftglyph.c (FT_Glyph_Get_CBox): Remove `error' variable.
* src/base/fttrigon.c (ft_trig_arctan_table): Use `L' for constants.
* src/base/ftobjs.c (FT_Done_Size): Fix return value.
(FT_Set_Char_Size, FT_Set_Pixel_Sizes, FT_Get_Kerning): Remove
unused `memory' variable.
* src/autohint/ahglyph.c (ah_get_orientation): Use `L' for constant.
* src/autohint/ahhint.c (ah_hint_edges_3,
ah_hinter_align_edge_points): Remove unused `before' and `after'
variables.
(ah_hinter_align_weak_points): Remove unused `edge_limit' variable.
(ah_hinter_load): Remove unused `new_advance', `start_contour',
and `metrics' variables.
* src/cff/cffload.c (CFF_Load_Encoding): Remove dead code to avoid
compiler warning.
* src/cff/cffobjs.c (CFF_Init_Face): Remove unused `base_offset'
variable.
* src/cff/cffgload.c (CFF_Parse_CharStrings): Remove unused
`outline' variable.
(cff_compute_bias): Use `U' for constant.
* src/cid/cidload.c (cid_decrypt): Ditto.
* src/psaux/psobjs.c (T1_Decrypt): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto.
* src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version'
variable.
* src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top'
variable.
* src/truetype/ttgload.c (load_truetype_glyph): Remove unused
`num_contours' and `ins_offset' variables.
(compute_glyph_metrics): Remove unused `Top' and `x_scale'
variables.
(TT_Load_Glyph): Remove unused `memory' variable.
* src/smooth/ftgrays.c (grays_raster_render): Use `L' for constants.
2001-06-18 14:23:45 +00:00
Werner Lemberg f8e9f4261b Make the new error scheme source compatible with older FT versions
by introducing another layer.

* include/freetype/fterrors.h (FT_ERRORDEF_, FT_NOERRORDEF_): New
macros.
(FT_NOERRORDEF): Removed.
* include/*/*err*.h: Use FT_ERRORDEF_ and FT_NOERRORDEF_.
2001-06-18 10:35:00 +00:00
Werner Lemberg b9ae6d06d2 * include/freetype/freetype.h (FT_ENC_TAG): New macro.
(FT_Encoding_): Use it.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Define it
conditionally.
2001-06-16 11:20:41 +00:00
Werner Lemberg 3058af3300 formatting 2001-06-16 07:48:30 +00:00
David Turner 686901a1a5 modified the TrueType interpreter to let it
use the new trigonometric functions provided in "fttrigon.h". This
        gets rid of some old 64-bit computation routines, as well as many
        warnings when compiling the library with the "long long" 64-bit
        integer type.
2001-06-14 12:34:00 +00:00
Werner Lemberg 2bd945c375 * src/base/ftcalc.c (FT_MulDiv, FT_DivFix, FT_Sqrt64): Remove
compiler warnings.
2001-06-11 13:26:11 +00:00
Werner Lemberg 645f60b869 Increase `version_info' to 7:0:1.
Fixed a bug that returned an invalid linear width for composite
TrueType glyphs.
* include/internal/tttypes.h (TT_Loader_): Two new elements `linear'
and `linear_def'.
* src/truetype/ttgload.c (load_truetype_glyph,
compute_glyph_metrics): Use it.
* include/fttypes.h (FT_ERROR_BASE): New macro.
* src/base/ftobjs.c (FT_Open_Face, FT_Render_Glyph_Internal): Use it
to make source code work with the new error scheme implemented by
Werner.
* src/base/ftoutln.c (FT_Outline_Render): Ditto.
2001-06-08 21:17:29 +00:00
David Turner 1ad51db6b1 fixed a bug that returned an invalid linear width for composite
TrueType glyphs

fixed source code to work with the new error scheme implemented
by Werner
2001-06-08 13:29:36 +00:00
Werner Lemberg 6c01dd82ae * builds/unix/configure.in: Renamed to ...
* builds/unix/configure.ac: This to make sure that autoconf 2.50 is
needed.
Run `autoupdate' on it.
* builds/unix/configure: Regenerated.

* src/autohint/ahhint.c (ah_hinter_load_glyph): Fixed a bug that
corrupted transformed glyphs that were auto-hinted (the transform
was applied twice).

Updating to libtool 1.4.0 and autoconf 2.50.
2001-06-08 12:19:22 +00:00
David Turner c4256c6fe1 * src/autohint/ahhint.c (ah_hinter_load_glyph): fixed a bug that
corrupted transformed glyphs that were auto-hinted (the transform
        was applied twice !!)
2001-06-08 10:54:43 +00:00
Werner Lemberg cec2c86494 removed 2001-06-07 17:37:08 +00:00
Werner Lemberg 7840c3cc47 Updating to libtool 1.4.0.
* builds/unix/ltconfig: Removed.
* builds/unix/ltmain.sh, builds/unix/configure.in,
builds/unix/aclocal.m4: Updated.
* builds/unix/configure: Regenerated.
2001-06-07 17:36:17 +00:00
Werner Lemberg 442b0910b9 Complete redesign of error codes. Please check ftmoderr.h for more
details.

* include/freetype/internal/cfferrs.h,
include/freetype/internal/tterrors.h,
include/freetype/internal/t1errors.h: Removed.  Replaced with files
local to the module.  All extra error codes have been moved to
`fterrors.h'.

* src/sfnt/ttpost.h: Move error codes to `fterrors.h'.

* src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
error names for the module it belongs to.

* include/freetype/ftmoderr.h: New file, defining the module error
offsets.  Its structure is similar to `fterrors.h'.

* include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
(FT_ERRORDEF): Redefined to use module error offsets.
All internal error codes are now public; unused error codes have
been removed, some are new.

* include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
macro.
* include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.

All other source files have been updated to use the new error codes;
some already existing (internal) error codes local to a module have
been renamed to give them the same name as in the base module.

All make files have been updated to include the local error files.


* src/cid/cidtokens.h: Replaced with...
* src/cid/cidtoken.h: This file for 8+3 consistency.

* src/raster/ftraster.c: Use macros for header file names.
2001-06-06 17:30:41 +00:00
Werner Lemberg be0924aacc Fixed length of `Reserved' array. 2001-06-06 05:56:59 +00:00
Werner Lemberg 4b07f22396 formatting, minor fixes 2001-05-30 07:53:37 +00:00
David Turner 5aeaaa2fcc small doc update 2001-05-29 10:52:34 +00:00
David Turner faf72a3408 remong the "netware" directory, it was too big for a source release
(904 Kb !!)
2001-05-29 10:19:24 +00:00
Robert Wilhelm 92f3b135fd Netware port by Ulrich Neumann. 2001-05-28 21:29:58 +00:00
Werner Lemberg 1ddd46d903 formatting, update 2001-05-25 05:32:17 +00:00
David Turner 664643336a moving documents to the "docs" directory 2001-05-24 15:00:19 +00:00
Werner Lemberg 09c9ac2936 formatting 2001-05-17 06:27:17 +00:00
David Turner 9b00ad6469 * src/truetype/ttgload.c (load_truetype_glyph): fixed a bug in the
composite loader spotted by Keith Packard.
2001-05-16 17:49:07 +00:00
David Turner 8e86015f39 * src/base/ftcalc.c (FT_DivFix): fixed a bug in the 64-bit code that
created incorrect scale factors !!

    * src/autohint/ahglobal.c, src/autohint/ahglyph.c, src/autohint/ahhint.c:
    fixed the incorrect blue zone computations, and improved the composite
    support. Note that these changes result in improved rendering, while
    sometimes introducing their own artefacts. That's probably the last
    big change to the autohinter before the introduction of its complete
    replacement..
2001-05-14 14:04:23 +00:00
David Turner fdab085e25 formatting 2001-05-14 14:01:00 +00:00
Werner Lemberg c634580a51 * include/freetype/ftbbox.h: FTBBOX_H -> __FTBBOX_H__.
* include/freetype/fttrigon.h: __FT_TRIGONOMETRY_H__ ->
__FTTRIGON_H__.
Include FT_FREETYPE_H.
Beautified; added copyright.
* src/base/fttrigon.c: Beautified; added copyright.
2001-05-12 18:04:08 +00:00
Werner Lemberg 3bf46a41b9 formatting 2001-05-12 06:40:50 +00:00
David Turner 61b3ea2f5f * src/cff/cffparse.c, src/cid/cidload.c, src/type1/t1load.c: fixed
the incorrect EM size computation
2001-05-11 18:08:58 +00:00
David Turner 6f30f9b3a3 * include/freetype/fttrigon.h, src/base/fttrigon.c, src/base/ftbase.c,
src/base/Jamfile, src/base/rules.mk: adding trigonometric functions
    to the core API (using Cordic algorithms).

    * builds/top_level.mk, builds/newline, builds/detect.mk: fixed problems
    with Make on Windows 2000, as well as problems when "make distclean" is
    invoked on a non-Unix platform when there is no "config.mk" in the
    current directory..

    * builds/freetype.mk: fixed a problem with object deletions under
    Dos/Windows/OS/2 systems

    * src/tools: added new directory to hold tools and test programs
    moved docmaker.py, glnames.py to it..

    * src/tools/docmaker.py: improved the script to add the current date
    at the footer of each web page (useful to distinguish between versions)

    * Jamfile: fixed incorrect HDRMACRO argument.

    * TODO: removed the cubic arc bbox computation note, since it has been
    fixed recently..

    * include/freetype/t1tables.h, include/freetype/config/ftoption.h:
    formatting
2001-05-11 14:25:57 +00:00
David Turner 53cbe724ab * Jamfile: fixed incorrect HDRMACRO argument. 2001-05-11 14:25:02 +00:00
David Turner 4067530a53 * TODO: removed the cubic arc bbox computation note, since it has been
fixed recently..
2001-05-11 14:24:35 +00:00
Werner Lemberg e2fb148d7f * include/freetype/internal/ftcalc.h: Move declaration of
FT_SqrtFixed() out of `#ifdef FT_LONG64'.

* src/base/ftcalc.c (FT_MulDiv, FT_MulFix, FT_DivFix): Various tiny
fixes related to rounding in 64-bits routines and
pseudo-"optimizations".
2001-05-09 20:57:45 +00:00
Werner Lemberg e46456839c Another small fix from Francesco. 2001-05-08 13:54:36 +00:00
Werner Lemberg 57ce6c1334 formatting 2001-05-08 13:52:13 +00:00
David Turner 24b0172c17 * src/pcfdriver.c: fixed incorrect bitmap width computation
* docs/docmaker.py: updated the DocMaker script in order to add
    command line options (--output,--prefix,--title), fix the erroneous
    line numbers reported during errors and warnings, and other formatting
    issues..

    * src/base/ftcalc.c: various tiny fixes related to rounding in 64-bits
    routines and pseudo"optimisations" :-)
2001-05-08 12:58:07 +00:00
David Turner f0fbf27a4f * docs/docmaker.py: updated the DocMaker script in order to add
command line options (--output,--prefix,--title), fix the erroneous
    line numbers reported during errors and warnings, and other formatting
    issues..
2001-05-08 07:48:33 +00:00
Werner Lemberg 05d23c9c94 *** empty log message *** 2001-04-27 22:40:16 +00:00
David Turner 07079d70c2 * src/base/ftbbox.c (BBox_Cubic_Check): fixed the coefficient
normalization algorithm (invalid final bit position, and invalid
	shift computation..)
2001-04-27 09:49:27 +00:00
Werner Lemberg 4e8b203556 * builds/unix/config.guess, builds/unix/config.sub: Updated to
latest versions from gnu.org.

* builds/compiler/gcc-dev.mk: Add `-Wno-long-long' flag.

* include/freetype/internal/ftcalc.h: Define FT_SqrtFixed()
uncoditionally.
* src/base/ftbbox.c: Include FT_INTERNAL_CALC_H.
Fix compiler warnings.
* src/base/ftcalc.c: Fix (potential) compiler warnings.

* src/base/ftcalc.c (FT_SqrtFixed): Corrected/optimized the 32-bit
fixed-point square root computation.  It is now used even with
64-bits integers, as it is _much_ faster than calling FT_Sqrt64 :-)
* src/base/ftbbox.c: Removed invalid "#include FT_BEZIER_H" line.
* src/base/ftbbox.c (BBox_Cubic_Check): Rewrote function to use
direct computations with 16.16 values instead of sub-divisions.  It
is now slower, but proves a point :-)
* src/raster/ftraster.c, src/smooth/ftgrays.c, src/base/ftbbox.c:
Fixed the bezier stack depths.
* src/base/ftcalc.c (FT_MulFix): Minor rounding fix.
* builds/beos: Added BeOS-specific files to the old build system
(no changes were necessary to support BeOS in the Jamfile though).
* ftconfig.h, ftoption.h: Updated "ftconfig.h" to detect 64-bit int
types on platforms where Autoconf is not available).  Also removed
FTCALC_USE_LONG_LONG and replaced it with
FT_CONFIG_OPTION_FORCE_INT64.
* builds/win32/freetype.dsp: Updated the Visual C++ project file.
Doesn't create a DLL yet.
* cffgload.c: Removed a compilation warning.
2001-04-26 13:34:36 +00:00
David Turner 65abdf98fb minor optimisations in ftcalc.c 2001-04-26 00:21:48 +00:00
David Turner 27a0c21f93 * src/base/ftcalc.c (FT_SqrtFixed): corrected/optimised the 32-bit
fixed-point square root. it is now used even with 64-bits
	ints, as it's simply _much_ faster than calling FT_Sqrt64 :-)

    * src/base/ftbbox.c : removed invalid "#include FT_BEZIER_H" line
2001-04-25 22:56:30 +00:00
David Turner d6e299cd4b * src/base/ftbbox.c (BBox_Cubic_Check): rewrote function to use
direct computations with 16.16 values instead of sub-divisions.
        It is now slower, but proves a point :-)

        * src/raster/ftraster.c, src/smooth/ftgrays.c, src/base/ftbbox.c :
        fixed the bezier stack depths..

        * src/base/ftcalc.c (FT_MulFix): minor rounding fix

        * builds/beos : added BeOS-specific files to the old build system
        (no changes were necessary to support BeOS in the Jamfile though)
2001-04-25 18:11:16 +00:00
Werner Lemberg dafd312150 * builds/unix/config.guess, builds/unix/config.sub: Updated to
latest versions from gnu.org.
2001-04-24 07:03:25 +00:00
Werner Lemberg 9802a977c0 * builds/compiler/gcc-dev.mk: Add `-Wno-long-long' flag. 2001-04-22 09:49:49 +00:00
Werner Lemberg 595309468c formatting 2001-04-21 18:34:30 +00:00
David Turner e9a6ea1a78 added 64-bit check
removed Visual C++ project update
removed Makefile -> Jam transition
2001-04-21 08:10:12 +00:00
David Turner a997b43283 * ftconfig.h, ftoption.h: updated "ftconfig.h" to detect 64-bit int
types on platforms where Autoconf is not available). Also removed
	FTCALC_USE_LONG_LONG and replaced it with FT_CONFIG_OPTION_FORCE_INT64

	* builds/win32/freetype.dsp: updated the Visual C++ project file. Doesn't
	create a DLL yet..

	* cffgload.c: removed a compilation warning
2001-04-20 08:50:36 +00:00
Tom Kacvinsky 87227cc399 Fix typos (entires -> entries). 2001-04-11 18:40:27 +00:00
Werner Lemberg 01f4a453f9 formatting 2001-04-11 18:09:49 +00:00
Tom Kacvinsky 951fd5bb6f 2001-04-10 Tom Kacvinsky <tjk@ams.org>
* t1load.c (parse_charstrings): Changed code for placing .notdef
        glyph into slot 0 so that we no longer have a memory access
        violation.

        * t1load.h: In structure T1_Loader, added swap_table (of type
        PS_Table) to facilitate placing the .notdef glyph into slot 0.
2001-04-10 18:21:30 +00:00
Tom Kacvinsky a9c85bb6c3 In function parse_charstrings, changed code for placing .notdef glyph
into slot 0 so that we no longer have a memory access violation.
2001-04-10 18:15:17 +00:00
Tom Kacvinsky 697752d9ae In structure T1_Loader, added swap_table (of type PS_Table) to
facilitate placing the .notdef glyph in slot 0.
2001-04-10 18:13:28 +00:00
Werner Lemberg 66aab3c57d * src/pcf/pcfdriver.c (PCF_Get_Char_Index): Fix return value.
* builds/dos/detect.mk: Add support for bash.
2001-04-10 13:59:58 +00:00
Werner Lemberg 0bb24e74b0 * builds/os2/*.mk: These files have been forgotten to update to
the structure of similar makefiles.
* builds/dos/*.mk: Ditto.
* builds/ansi/*.mk: Ditto.

* builds/win32/win32-def.mk (BUILD): Fix typo.

* builds/compiler/*.mk (CLEAN_LIBRARY): Don't use NO_OUTPUT.
This is already used in the link_*.mk files.


* src/*/Jamfile: Slight changes	to make files more cryptic.
2001-04-06 07:05:50 +00:00
Werner Lemberg e746cdac2c * Jamfile, src/Jamfile, src/*/Jamfile: Formatted. Slight changes
to give files identical structure.
2001-04-03 21:07:36 +00:00
Werner Lemberg 005b8b998a * README: Formatting.
* Jamfile: Fix typo.

* src/cff/cffparse.c: Move error code #defines to...
* include/freetype/internal/cfferrs.h: This file.
* src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffload.c: Replaced
`FT_Err_*' with `CFF_Err_*'.
* src/cid/cidparse.c: Replaced `FT_Err_*' with `T1_Err_*'.
* src/psaux/psobjs.c, src/psaux/t1decode.c: Ditto.
* src/sfnt/sfobcs.c, src/sfnt/ttload.c: Replaced `FT_Err_*' with
`TT_Err_*'.
* src/truetype/ttgload.c, src/truetype/ttobjs.c: Ditto.
* src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1objs.c,
src/type1/t1parse.c: Replaced `FT_Err_*' with `T1_Err_*'.

* include/freetype/internal/cfferrs.h: Add
`CFF_Err_Unknown_File_Format'.
* include/freetype/internal/t1errors.h: Add
`T1_Err_Unknown_File_Format'.
* include/freetype/internal/tterrors.h: Add
`TT_Err_Unknown_File_Format'.

* src/cff/cffload.h: Add `cff_*_encoding' and `cff_*_charset'
references.
* src/psaux/psobjs.c: Include `FT_INTERNAL_TYPE1_ERRORS_H'.

* src/cff/cffobjs.c (CFF_Init_Face, CFF_Done_Face): Use
FT_LOCAL_DEF.
* src/cid/cidobjs.c (CID_Done_Driver): Ditto.
* src/trutype/ttobjs.c (TT_Init_Face, TT_Done_Face, TT_Init_Size):
Ditto.
* src/type1/t1objs.c (T1_Done_Driver): Ditto.
* src/pcf/pcfdriver.c (PCF_Done_Face): Ditto.
* src/pcf/pcf.h: Use FT_LOCAL for `PCF_Done_Face'.
2001-04-02 23:54:01 +00:00
Werner Lemberg 9e77d32f21 * CHANGES: Reformatted, minor fixes.
* TODO: Updated.
* include/freetype/freetype.h: Formatting.

* Jamrules, Jamfile, src/Jamfile, src/*/Jamfile: Adding jamfiles to
the source tree.  See www.freetype.org/jam/index.html for details.
2001-04-02 21:30:06 +00:00
Tom Kacvinsky 380662c06f Formatting 2001-04-02 17:50:08 +00:00
Tom Kacvinsky 07937315b2 2001-04-02 Tom Kacvinsky <tjk@ams.org>
* src/sfnt/ttload.c (TT_Load_Metrics): Fix an improper pointer
        dereference.  Submitted by Herbert Duerr <duerr@sun.com>
2001-04-02 17:48:43 +00:00
Tom Kacvinsky 574ed1bc97 In function TT_Load_Metrics, fix improper an improper pointer dereference.
Submitted by herbert duerr <duerr@sun.com>
2001-04-02 17:47:16 +00:00
Tom Kacvinsky e2abb1aa39 2001-03-26 Tom Kacvinsky <tjk@ams.org>
* include/freetype/config/ftconfig.h: Changed hexadecimal
        constants to use suffix U to avoid problems with HP-UX's c89
        compiler.  Submitted by G.W. Lucas <glucas@sonalysts.com>
2001-03-26 23:58:40 +00:00
Tom Kacvinsky af56dbdb92 Changed tests for sizes of short, ints, and longs to use the suffix U
on the hexdecimal constants to avoid problems with HP-UX's ANSI
compliant C compiler (c89).  The changes work well with Sun's Forte
compilers.
2001-03-26 23:46:06 +00:00
David Turner 870dc5bb97 * Jamrules, Jamfile, src/Jamfile, src/*/Jamfile: Adding jamfiles
to the source tree. see www.freetype.org/jam/index.html for details
2001-03-24 17:10:09 +00:00
Werner Lemberg 1acee48455 Add 2.0.2 version tag. 2001-03-24 15:26:12 +00:00
David Turner 95489eefe8 added small README file 2001-03-24 00:56:26 +00:00
David Turner 95167fa5d5 small Unix installation update 2001-03-24 00:42:45 +00:00
David Turner 8cc7cfc15e small documentation update 2001-03-23 18:19:04 +00:00
David Turner e572327a5b small documentation update 2001-03-23 18:09:09 +00:00
David Turner 62043889ad updated changes 2001-03-23 12:28:59 +00:00
David Turner 1389ce0188 removed obsolete documentation files
they are now moved to the "www" module, under "www/freetype2/docs"
2001-03-23 11:20:35 +00:00
Werner Lemberg 7dc15dbbd8 * builds/win32/detekt.mk: Fix .PHONY target for Intel compiler.
Renamed "ftnames.h" to "ftsnames.h", and FT_NAMES_H to
FT_SFNT_NAMES_H.
* docs/docmaker.py: Added generation of INDEX link in table of
contents.
* INSTALL, docs/BUILD: Updated documentation to indicate that the
compilation process has changed slightly (no more `src' required in
* builds/*/*-def.mk: Changed the objects directory from "obj" to
"objs".
* include/freetype/config/ftheader.h: Removed obsolete macros like
FT_SOURCE_FILE, etc. and added cache-specific macro definitions that
were previously defined in <freetype/ftcache.h>.  Added comments to
be included in a new API Reference section.

* src/*/*: Removed the use of FT_SOURCE_FILE, etc.  Now, each
component needs to add its own directory to the include path at
compile time.  Modified all "rules.mk" and "descrip.mms"
accordingly.

* src/cid/cidobjs.c, src/cid/cidload.c, src/pcf/pcfread.c,
src/type1/t1load.c, src/type1/t1objs.c: Added a few casts to remove
compiler warnings in pedantic modes.
* include/config/ft2build.h, include/config/ftheader.h: The file
top-level <ft2build.h>.

* include/config/ftheader.h: Added new section describing the #include
macros.


the Type 2 glyph charstring (used by conversion programs).
* docs/docmaker.py: Added cross-references generation as well as


seac emulation provided by the Type 2 endchar operator.


* src/cid/cidafm.c, src/cid/cidafm.h: removed un-needed files,
Added support for clipped direct rendering in the smooth renderer.


* src/cff/t2objs.c (T2_Init_Face): For pure CFF fonts, set
2001-03-20 22:58:56 +00:00
David Turner c5ec458602 fixed a small mistake 2001-03-20 17:28:02 +00:00
David Turner 131fffe827 renamed "obj" to "objs" 2001-03-20 15:04:30 +00:00
David Turner dd9291c538 * include/freetype/config/ftheader.h, include/freetype/ftsnames.h:
renamed "ftnames.h" to "ftsnames.h", and FT_NAMES_H to FT_SFNT_NAMES_H

	* docs/docmaker.py: added generation of INDEX link in table of contents
2001-03-20 14:50:04 +00:00
David Turner 7dca898c4b * builds/*/*-def.mk: changed the objects directory from "obj" to "objs"
* include/freetype/config/ftheader.h: removed obsolete macros like
	FT_SOURCE_FILE, etc.. and added cache-specific macro definitions that
	were previously defined in <freetype/ftcache.h>. Added comments to be
	included in a new API Reference section.

	* src/*/*: removed the use of FT_SOURCE_FILE, etc.. now, each component
	needs to added its own directory to the include path at compile time.
	Modified all "rules.mk" and "descrip.mms" accordingly..
2001-03-20 11:14:24 +00:00
Werner Lemberg 150f96d043 * builds/unix/configure.in: Add $ft_version.
* builds/unix/freetype-config.in: Use it.
* builds/unix/configure: Updated.
2001-03-20 07:52:52 +00:00
Tom Kacvinsky 8f7bec6f6f Added entries for changes to Type 1 and CFF drivers, related to units
per EM processing in the font matrix parsers.
2001-03-19 14:30:24 +00:00
Tom Kacvinsky e47e540acf In function parse_font_matrix(), make sure that the units per em value
is assigned an unsigned short value, first by shifting right 16 bits,
then by casting the results to FT_UShort.
2001-03-19 13:52:31 +00:00
Tom Kacvinsky 35c0e256db Change units per EM assignment in cff_parse_font_bbox(). 2001-03-19 13:44:15 +00:00
David Turner a926ff2f6d fixed a small bug 2001-03-19 11:34:49 +00:00
David Turner a4e2c5f1d7 renamed <freetype/config/ft2build.h> to 'ftheader.h' to avoid
name conflicts with top-level <ft2build.h>

added some comments for docmaker in ftheader.h in order to
document the header file macros..
2001-03-18 00:26:23 +00:00
David Turner 2160af9c61 small update to remove compiler warnings 2001-03-17 23:25:34 +00:00
Tom Kacvinsky 106adba18c Another minor typo fix in cff_parse_font_bbox(). 2001-03-17 19:01:25 +00:00
Tom Kacvinsky 3c55b304a5 Corrected a typo in function cff_parse_font_bbox(). 2001-03-17 16:46:25 +00:00
Tom Kacvinsky 80b7515e4c Added entries for changes to the BBox processing of the CFF driver. Now
the Type 1, CID, and CFF drivers match in their BBox processing.
2001-03-17 16:44:23 +00:00
Tom Kacvinsky 6456da1235 In function cff_parse_font_bbox(), obtain rounded FT_Fixed values for the
bounding box numbers.
2001-03-17 16:38:49 +00:00
Tom Kacvinsky df5cea1b3e In function CFF_Init_Face(), when we process a pure CFF font, set
`root->ascender' (`root->descender') to the integer part of the
`root->bbox.yMax' (`root->bbox.yMin', respectively).
2001-03-17 16:36:51 +00:00
Tom Kacvinsky d06d935f3b Added entries for changes to CFF driver submitted by Sander van der
Wal.  These include adding suppoort for getting a glyph name based on
glyph index, and support for the deprecated operator dotsection.
2001-03-16 15:09:52 +00:00
Tom Kacvinsky f892f09752 Added function get_cff_glyph_name() in order to facilitate getting a
glyph name for glyph index via FT_Get_Glyph_Name().

In function cff_get_interface(), added support for getting a glyph
name via the "glyph_name" module interface (used in the function
FT_Get_Glyph_Name()).  We use the new function get_cff_glyph_name().
2001-03-16 15:03:13 +00:00
Tom Kacvinsky 8e555b9731 In function CFF_Init_Face(), logical or the face flags with
FT_FACE_FLAG_GLYPH_NAMES only if FT_CONFIG_OPTION_NO_GLYPH_NAMES is
not defined.  This is to add support for getting a glyph name from a
glyph index vi FT_Get_Glyph_Name().
2001-03-16 13:40:50 +00:00
Tom Kacvinsky 941099e1e5 In function CFF_Parse_CharStrings(), added support for deprecated
operator "dotsection".

Submitted by Sander van der Wal <svdwal@xs4all.nl>
2001-03-16 13:35:56 +00:00
Werner Lemberg 90e4b6b8e5 * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix error
messages.

* INSTALL, docs/BUILD: We need GNU make 3.78.1 or newer.
2001-03-12 22:33:52 +00:00
Tom Kacvinsky 1c09b9bd58 2001-03-12 Tom Kacvinsky <tjk@ams.org>
* include/freetype/internal/psaux.h:  Changed the lenIV member of
        the T1_Decoder_ struct to be an FT_Int instead of an FT_UInt.
2001-03-12 12:06:30 +00:00
Tom Kacvinsky 98cc1f6a51 Changed the lenIV member of the T1_Decoder_ struct to be an FT_Int
instead of an FT_UInt.
2001-03-12 12:04:29 +00:00
Tom Kacvinsky 435f6102f5 Added entries for changes to the Type 1 decoder and the CID font driver (which
take into account the possibility of lenIV seed bytes at the beginning of a
subroutine).
2001-03-12 02:36:49 +00:00
Tom Kacvinsky a2fb4779c4 In cid_read_subrs, decode subroutines only if lenIV >= 0. 2001-03-12 02:17:50 +00:00
Tom Kacvinsky cc3096c086 In cid_load_glyph, decrypt charstrings only if lenIV >= 0. 2001-03-12 02:05:17 +00:00
Tom Kacvinsky cf5a841218 In function T1_Decoder_Parse_Charstrings, take into account lenIV seed
bytes at the start of a decrypted subroutine.
2001-03-12 01:42:38 +00:00
Werner Lemberg 459d7e660f * src/pcf/pcfread.c: Put READ_Fields() always in a conditional to
avoid compiler warnings.
2001-03-11 13:11:43 +00:00
Werner Lemberg 183ee0af2f * TODO: Updated.
* src/cid/cidload.c (parse_font_matrix): Added units_per_EM
* src/type1/t1load.c (parse_font_bbox): Changed to use FT_Fixed
2001-03-11 11:28:39 +00:00
Tom Kacvinsky ae6e13e7ea Added entry for TODO list. 2001-03-10 20:03:06 +00:00
Tom Kacvinsky 69844e856c Initial revision of TODO list. 2001-03-10 20:00:06 +00:00
Tom Kacvinsky 584c26a82c Myriad entires for FT_Fixed number handling in bbox parsing and
assignment code that uses bbox values.
2001-03-10 19:21:19 +00:00
Tom Kacvinsky 2d2d737e83 In function T1_Init_Face, changed the assignment code for ascender,
descender, and max_advance_width.
2001-03-10 19:10:25 +00:00
Tom Kacvinsky e354f7243a Changed parse_font_bbox to use FT_Fixed values for the bbox
assignment, and use rounded values instead.
2001-03-10 19:08:44 +00:00
Tom Kacvinsky 08c15e60de In CID_Init_Face, use calculated units_per_EM, and if that is not available, default
to 100 units per EM.  Changed assignment code for ascender and descender values.
2001-03-10 19:06:54 +00:00
Tom Kacvinsky e496962f25 Added units_per_EM processing to parse_font_matrix, and added FT_Fixed
number handling to parse_font_bbox.
2001-03-10 19:04:41 +00:00
Tom Kacvinsky 36c8728acb Added implementation of three new functions: FT_RoundFix, FT_CeilFix,
and FT_FloorFix.
2001-03-10 19:02:51 +00:00
Tom Kacvinsky 30e00c6be6 Added prototypes and notes for three new functions: FT_RoundFix,
FT_CeilFix, and FT_FloorFix.
2001-03-10 19:01:21 +00:00
Werner Lemberg 1b20ae6162 * src/*/*.c: Added many casts to make code more 64bit-safe. 2001-03-10 17:07:42 +00:00
Werner Lemberg 0778f2bf18 * INSTALL, docs/BUILD: We need GNU make 3.78 or newer.
* src/type1/t1objs.c (T1_Init_Face): Minor correction: We must wait
Submitted by Sander van der Wal <svdwal@xs4all.nl>.
2001-03-07 21:20:48 +00:00
Tom Kacvinsky 97b9fe91f5 Added entry:
* src/type1/t1objs.c (T1_Init_Face): Minor correction:  we must wait
        until parse_font_bbox is changed before we use logical shift rights
        in the assignments of `root->ascender', `root->descender', and
        `root->max_advance_width'.
2001-03-07 20:56:57 +00:00
Tom Kacvinsky 0dd69c9a66 Minor correction in T1_Init_Face: we must wait until parse_font_bbox
is changed before we use logical shift rights in the assignments of
`root->ascender', `root->descender', and `root->max_advance_width'.
2001-03-07 20:53:08 +00:00
Tom Kacvinsky 1afa4a7aa3 Added entry:
* src/type1/t1objs.c (T1_Done_Face): Free `char_name' table to
        avoid a memory leak.
        Submitted by Sander van der Wal <svdwal@xs4all.nl>
2001-03-07 20:43:38 +00:00
Tom Kacvinsky a57af6fb37 2001-03-07 Tom Kacvinsky <tjk@ams.org>
* src/type1/t1objs.c (T1_Done_Face): Free `char_name' table to
	avoid a memory leak.
	Submitted by Sander van der Wal <svdwal@xs4all.nl>
2001-03-07 20:42:18 +00:00
Werner Lemberg d78d99a1cb formatting 2001-03-06 13:56:42 +00:00
Tom Kacvinsky 79f84db817 Added entry:
2001-03-05  Tom Kacvinsky <tjk@ams.org>

        * src/cff/cffgload.c (CFF_Load_Glyph): Set glyph control data to the
        the Type 2 glyph charstring (used by conversion programs). Submitted
        by Ha Shao <hashao@chinese.com>.
2001-03-05 16:24:58 +00:00
Tom Kacvinsky 6b13179803 2001-03-05 Tom Kacvinsky <tjk@ams.org>
* src/cff/cffgload.c (CFF_Load_Glyph): Set glyph control data to the
	the Type 2 glyph charstring (used by conversion programs).
	Submitted by Ha Shao <hashao@chinese.com>.
2001-03-05 16:22:25 +00:00
Antoine Leca 5f9960976d * include/freetype/ttnameid.h: Correct a stupid typo which prevented
correct compilation (TT_MS_LANGID_TIGRIGNA_ETHIOPIA appeared twice).
I am sorry for the inconvenience :-(.
2001-03-05 00:15:37 +00:00
Werner Lemberg 150a583254 * builds/unix/detect.mk: Add test for Hurd.
* builds/hurd/detect.mk: Removed.
2001-03-04 22:10:36 +00:00
Werner Lemberg cb6ef5a41f * src/autohint/ahtypes.h (AH_Hinter): Add elements
`disable_horz_edges', `disable_vert_edges'.
* src/autohint/ahhint.c	(ah_hint_edges_3, ah_hinter_hint_edges): Use
them (and remove static variables with the same names).
* src/pcf/pcfutil.c (BitOrderInvert): Add `const'.
* docs/glnames.py: Updated to latest pstables.h changes.
* src/psnames/pstables.h: Add more `const'.
* src/pcf/pcfutil.c: Ditto.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixing typo
(FT_Glyph_Done -> FT_Done_Glyph).
* include/freetype/ttnameid.h: Added some new Microsoft language
codes and LCIDs as found in Office Xp.

* builds/hurd/detect.mk: New file.  Added support to detect the GNU
Hurd operating system as Unix-like.  Fix submitted by Anthony Fok
<foka@debian.org>.

* src/type1/t1gload.c (T1_Load_Glyph): Set glyph control data to the
the Type 1 glyph charstring (used by conversion programs).
Submitted by Ha Shao <hashao@chinese.com>.


* src/base/ftgrays.c (grays_sweep): The function didn't exit
immediately if `num_cells' was 0 as it should.  Thanks to Boris for
finding this out.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixed memory leak when
bitmap rendering fails (thanks to Graham Asher).

* docs/docmaker.py, include/freetype/*.h: Updated the DocMaker
script to support chapters and section block ordering.  Updated the
public header files accordingly.
* src/base/ftglyph.c (FT_Glyph_Copy): Advance width and glyph format
were not correctly copied.
2001-03-04 21:53:08 +00:00
Antoine Leca 5e4b738ad5 * include/freetype/ttnameid.h: added some new Microsoft language
codes and LCIDs as found in Office Xp.
2001-03-01 18:00:44 +00:00
David Turner c06ec0adbe the Type 1 glyph loader now sets the glyph control data to the
T1 charstrings program.
2001-02-28 09:36:13 +00:00
David Turner 3922e4f5d0 added automatic detection for the HURD operating system 2001-02-28 09:09:05 +00:00
David Turner 50004d7044 fixed a bug reported by Graham Asher 2001-02-23 17:47:41 +00:00
David Turner 76b88d5267 fixed a small bug in FT_Glyph_Copy 2001-02-16 16:40:59 +00:00
David Turner 532e02ad82 fixed a small bug (the advance and format were not copied in
FT_Glyph_Copy)
2001-02-16 16:27:35 +00:00
Werner Lemberg 228859b229 * builds/unix/config.{guess,sub}: Updated (from ftp.gnu.org). 2001-02-14 08:31:55 +00:00
Werner Lemberg 82b87b344c * docs/docmaker.py (DocSection::add_element): Use
`self.print_error()'.


to support chapters and section block ordering.  Updated the public
2001-02-14 04:59:57 +00:00
David Turner cb36b4a37d update docmaker.py to support chapters and section block ordering
updated public header files, as well as "ftchapters.h" which only
contains comment that hold the list of section chapters..
2001-02-13 17:42:49 +00:00
Werner Lemberg 7fcdadc17a formatting 2001-02-10 17:45:01 +00:00
Tom Kacvinsky 502f702125 minor correction to 2001-02-07 entries. 2001-02-08 23:26:09 +00:00
Tom Kacvinsky f4655dd4f6 * src/cff/cffparse.c (cff_parse_font_matrix): Removed an
unnecessary fprintf( stderr, ... ).
2001-02-08 23:25:19 +00:00
Tom Kacvinsky a359d8a698 Removed an unnecessary fprintf( stderr, ... ) from cff_parse_font_matrix 2001-02-08 23:23:46 +00:00
Tom Kacvinsky 02a16fba39 Added entry for function is_alpha. Code now makes `-' a valid
alphanumeric character.
2001-02-07 03:48:24 +00:00
Tom Kacvinsky b3e3a77c2d In function is_alpha, make `-' a legal alphanumeric character. This
is so that font names with `-' are fully parsed, etc...
2001-02-07 03:45:49 +00:00
Tom Kacvinsky 0f9eab88c3 Added entries for changes to CFF and Type 1 drivers, related to units
per EM.  That is, calculate the units per EM based on the FontMatrix.
2001-02-07 01:24:11 +00:00
Tom Kacvinsky 6ad5735a27 In function T1_Init_Face, added code to get the units_per_EM from the
value assigned in parse_font_matrix, if available.  Default to 1000 if
not available.
2001-02-07 01:14:53 +00:00
Tom Kacvinsky 91649c7a31 In struct CFF_Font_Dict_, added a units_per_em member to facilitate
passing of units_per_em form function cff_parse_font_matrix.
2001-02-07 01:13:21 +00:00
Tom Kacvinsky 91f450c295 In function cff_parse_font_matrix, added logic to get the units_per_EM
from the FontMatrix.

Added a new function (cff_parse_fixed_thousand) that gets a real
number fromt he CFF font, but multiplies by 1000 (this is to avoid
rounding errors when placing this real number into a 16.16 fixed
number).

In function cff_parse_real, added code so that the integer part is
moved into the high sixtenn bits of the 16.16 fixed number.
2001-02-07 01:11:54 +00:00
Tom Kacvinsky 9df36e4718 In function CFF_Init_Face, added logic to get the units per EM from
the CFF dictionary, if available.
2001-02-07 01:08:34 +00:00
Werner Lemberg a15e07e31c * src/psaux/psobjs.c (shift_elements): Remove if clause (which is
obsolete now).

(reallocate_t1_table, PS_Table_Done): Replace REALLOC() with ALLOC()
+ MEM_Copy() to avoid a memory bug.
2001-02-03 04:34:53 +00:00
Werner Lemberg 3b5915dee7 formatting, ChangeLog entry 2001-02-03 03:00:06 +00:00
David Turner 3fe7ba83a1 improved docmaker slightly (better indexing, support for "<order>" marker
in section blocks, see "fttypes.h")
2001-02-02 05:24:11 +00:00
Antoine Leca 51bbfa5a70 Update of ttnameid.h with the most recent informations from Microsoft's SDK 2001-01-31 03:00:22 +00:00
Tom Kacvinsky 4caaf902d6 Added entries for changes to Type 1 driver (related to FontInfo
dictionaries and units per em).
2001-01-24 22:44:22 +00:00
Tom Kacvinsky d60dbcd2a8 In function parse_font_matrix, added heuristic to get units_per_EM
from the font matrix.

In parse_dict, deleted test to see if the FontInfo keyword has been
seen.  Deletion of this test allows fonts without FontInfo
dictionaries to be parsed by the Type 1 driver.

In T1_Open_Face, deleted empty subroutines array test to make sure
fonts with no subroutines still are parsed.
2001-01-24 22:41:20 +00:00
Werner Lemberg aba6d509c4 another small update of the Unicode range comments 2001-01-22 15:26:02 +00:00
Werner Lemberg 74c0edf44c grammatical fixes 2001-01-19 03:33:30 +00:00
Werner Lemberg 57175ec7b1 * src/pcfread.c (pcf_get_properties, pcf_get_metrics,
pcf_get_bitmaps): Fix compiler errors.

* src/pcf/pcfread.c: Removed some compilation warnings related
2001-01-18 04:00:12 +00:00
Werner Lemberg 69b7937e6e formatting 2001-01-15 23:11:55 +00:00
David Turner 53dc9ca9c3 some minor changes to allow compilation in all modes, without warnings 2001-01-12 21:49:08 +00:00
Werner Lemberg b632ac6e5a * builds/unix/freetype-config.in: Fix problems with separate
--prefix and --exec-prefix.


more robust handling of pathname wildcard matching.
2001-01-12 05:32:04 +00:00
David Turner eff79e3126 added cross-reference generation 2001-01-12 00:33:30 +00:00
Werner Lemberg 6e07332f94 * docs/docmaker.py: Minor improvements to reduce unwanted spaces
and empty lines in output.
* docs/docmaker.py: Improved script to generate table of contents
and index pages.  It also supports wildcards on non Unix systems.

* include/freetype/*.h, include/freetype/cache/*.h: Updated comments
to include section definitions/delimitations for the API Reference
generator.

* include/freetype/freetype.h: Moved declaration of
`FT_Generic_Finalizer' and the `FT_Generic' structure to...
* include/freetype/fttypes.h: here.
2001-01-11 09:27:49 +00:00
David Turner dec12f44fa updated documentation in public header files 2001-01-10 11:15:48 +00:00
David Turner 691e2426f4 improved the docmaker script 2001-01-10 06:53:49 +00:00
Werner Lemberg e8c8e30163 * include/freetype/ttnameid.h: Updated Unicode code range comments. 2001-01-05 05:15:49 +00:00
Werner Lemberg 70a6b864d4 formatting 2001-01-03 07:14:12 +00:00
Tom Kacvinsky e523a254e5 Added entries for changes to CFF driver function, variable, and source
file names.
2001-01-03 07:12:49 +00:00
Werner Lemberg ddc3115f14 * builds/vms: Support files for VMS architecture added.
* descrip.mms, src/*/descrip.mms: VMS makefiles added.
* README.VMS: New file.


* LICENSE.TXT: Added info about PCF driver license.
2001-01-03 06:47:10 +00:00
Werner Lemberg 941538f54e import of vms stuff 2001-01-03 06:38:54 +00:00
Werner Lemberg 421889b300 Initial revision 2001-01-03 06:38:54 +00:00
Tom Kacvinsky 2ef3977766 Changed to use cfftypes.h instead of t2types.h. Also, we now use
cfferrs.h instead of t2errors.h.
2001-01-03 00:29:35 +00:00
Tom Kacvinsky 094db936a2 Merged in changes from t2types.h, and made this the canonical `types'
header for the CFF driver.
2001-01-03 00:27:46 +00:00
Tom Kacvinsky c3d7df1e78 This file was merged with cfftypes.h and is no longer necessary. 2001-01-03 00:26:56 +00:00
Tom Kacvinsky 879226a92c This file was previously known as t2errors.h. 2001-01-03 00:25:36 +00:00
Tom Kacvinsky 8120ad9be8 Renamed to cfferrs.h. 2001-01-03 00:24:58 +00:00
Tom Kacvinsky c1430c7069 Changed to use cffgload.{c,h} instead of t2gload.{c,h}. Also, all
occurences of t2_ (T2_) were replaced with cff_ (CFF_, resp.).
2001-01-03 00:21:59 +00:00
Tom Kacvinsky d569012ea0 This file was previously known as t2gload.h. 2001-01-03 00:17:58 +00:00
Tom Kacvinsky 25a2c18a95 Renamed to cffgload.h. 2001-01-03 00:17:15 +00:00
Tom Kacvinsky 30e827985d Changed to reflect the changes made in the source files:
we now use cffgload.{c,h} instead of t2gload.{c,h}.
2001-01-03 00:16:24 +00:00
Tom Kacvinsky 7a8c67abfb This file was previously known as t2gload.c. 2001-01-03 00:15:00 +00:00
Tom Kacvinsky 6d01e3972b Renamed t2gload.c to cffgload.c. 2001-01-03 00:14:11 +00:00
Werner Lemberg 8dddc24dea * src/pcf/*: New driver module for PCF font format (used in
X Windows).
* include/freetype/internal/ftdebug.h (FT_Trace): Added values for
PCF driver.
* include/freetype/internal/pcftypes.h: New file.
* include/freetype/config/ftmodule.h: Added PCF driver module.


* src/winfonts/winfnt.c (FNT_Get_Char_Index): Fix parameter type.


* builds/modules.mk (clean_module_list): Fixed deletion of module
file in case `make make_module_list' is called before `make setup'.
2001-01-01 17:25:21 +00:00
Werner Lemberg 8c9a006d6c import of PCF driver 2001-01-01 17:24:31 +00:00
Werner Lemberg 0f52012e40 Initial revision 2001-01-01 17:24:31 +00:00
Werner Lemberg 9682808530 * src/cff/cffload.c (CFF_Load_Charset): Improved error messages.
(CFF_Load_Charset, CFF_Load_Encoding): Remove unnecessary variable
definition.

* src/cff/t2gload.c (t2_lookup_glyph_by_stdcharcode,
t2_operator_seac): Added these functions for use in implementing the
seac emulation provided by the Type 2 endchar operator.
(T2_Parse_CharStrings): Added seac emulation for the endchar
operator.
CFF_Done_Encoding, CFF_Done_Charset): Extended to load and parse the
charset/encoding tables, and free the memory used by them when the
CFF driver is finished with them.  Added tables
2000-12-30 22:14:58 +00:00
Tom Kacvinsky 7b7384927e Added entries for changes to CFF driver sources and headers. We now
have a working charset and encoding parser, along with a working seac
emulation (the 5 argument version of endchar).
2000-12-30 01:18:22 +00:00
Tom Kacvinsky 58552580ad Changed the structures CFF_Encoding and CFF_Charset. 2000-12-30 01:13:50 +00:00
Tom Kacvinsky 05a2eb4cf3 Chnaged the structures CFF_Charset and CFF_Encoding. 2000-12-30 01:13:07 +00:00
Tom Kacvinsky d9d7be77df Added functions t2_lookup_glyph_by_stdcharcode and t2_operator_seac
for use in implementing the seac emulation provided by the Type 2
endchar operator.

Extended T2_Parse_CharStrings to add seac emulation for the endchar
operator.
2000-12-30 00:39:40 +00:00
Tom Kacvinsky 86c50ab52a Added tables
cff_isoadobe_charset
    cff_expert_charset
    cff_expertsubset_charset
    cff_standard_encoding
    cff_expert_encoding

Extended functions CFF_Load_Encoding, CFF_Load_Charset, CFF_Done_Encoding,
and CFF_Done_Charset to load and parse the charset/encoding tables, and
free the memory used by them when FreeType is finished with them.
2000-12-30 00:37:14 +00:00
Tom Kacvinsky bac5e658cc Added entries pertaining to the changes needed in the CFF/Type 2
driver for font transforms to work.
2000-12-24 10:05:04 +00:00
Tom Kacvinsky 23d1fe0878 In function T2_Load_Glyph, added code so that the font transform is
applied.
2000-12-24 10:01:54 +00:00
Tom Kacvinsky c6dec5c06d Added code to cff_parse_font_matrix so that the font matrix numbers
are scaled by 1/(matrix->yy).  Also, the offset vector now contains
integer values instead of 16.16 fixed numbers.
2000-12-24 09:57:28 +00:00
Werner Lemberg 3db6a4a807 Minor doc fix. 2000-12-23 16:55:29 +00:00
Tom Kacvinsky c079b92ab7 Fixed 2000-12-21 entry for ah_hinter_load and ah_hinter_load_glyph to
be more general.  The problem affected more than synthetic fonts.

Added an entry for changes to ahhint.c.  I mistakenly committed
ahhint.c without removing unnecessay comments.  Furthermore, I did not
remove some code that I had commented out.  Silly me!
2000-12-22 07:35:19 +00:00
Tom Kacvinsky abaa5f26c9 Removed unnecessary comments and commented-out code from ah_hinter_load_glyph. 2000-12-22 07:24:02 +00:00
David Turner c129cb011d removing obsolete "cidafm" files 2000-12-22 03:40:14 +00:00
Tom Kacvinsky ad0472531a Added entry for fixes to autohinter (related to synthetic fonts). 2000-12-21 01:34:01 +00:00
Tom Kacvinsky 68c5181cbd Changed functions ah_hinter_load and ah_hinter_load_glyph so that
synthetic fonts render correctly.  Previously, the first glyph
rendered from such a font did not have the FontMatrix applied.
2000-12-21 01:25:13 +00:00
Werner Lemberg f6fdf537e7 * *.mk: Added lots of `.PHONY' targets.
* *.mk: Implemented `platform' target to disable auto-detection.


Added support for clipped direct rendering in the smooth renderer.
This should not break binary compatibility of existing applications.
* include/freetype/fttypes.h, include/freetype/ftimage.h: Move
definition of the FT_BBox structure from the former to the latter.
* include/freetype/ftimage.h: Add `ft_raster_flag_clip' value to
FT_Raster_Flag enumeration.
Add `clip_box' element to FT_Raster_Params structure.
* src/smooth/ftgrays.c (grays_convert_glyph): Implement it.

* src/raster/ftraster.c (ft_black_render): Test for unsupported
direct rendering before testing arguments.
2000-12-20 22:09:41 +00:00
Werner Lemberg 77f5af7fb4 * INSTALL: Added info about makepp. 2000-12-14 22:57:17 +00:00
David Turner 86564229c3 fixed small bug (no need to test target pixmap in direct rendering mode) 2000-12-14 21:24:27 +00:00
Werner Lemberg 8f1d086128 * docs/design/modules.html: Removed. Covered by design-*.html.
src/smooth/ftgrays.c: Added support for clipped direct rendering in
the smooth renderer.  This should not break binary compatibility of
existing applications.
* INSTALL: Updated installation instructions on Win32, listing the
new "make setup list" target used to list supported
compilers/targets.
2000-12-14 21:22:15 +00:00
David Turner d3f742417c support for clipped direct rendering
updated INSTALL file for Win32 case
2000-12-14 18:50:40 +00:00
Werner Lemberg f23f4ad1a6 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: New files.

* 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.

* src/base/ftdebug.c: Added dummy symbol to avoid empty file if
conditionals are off.
2000-12-13 23:44:37 +00:00
David Turner 1003866897 * include/freetype/config/ft2build.h,
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..
2000-12-13 19:55:11 +00:00
Werner Lemberg b8eca20757 * builds/unix/ftsystem.c: Fixed typos. Fixed inclusion of wrong
ftconfig.h file.
2000-12-13 09:21:59 +00:00
Werner Lemberg 0f4d90d294 * include/freetype/config/ft2build.h (FT2_ROOT, FT2_CONFIG_ROOT):
Removed.  ANSI C doesn't (explicitly) allow macro expansion in
arguments using `##'.
(FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE): Use directory
names directly.  Make them configurable.  Use `##' to strip leading
and trailing spaces from arguments.

* builds/unix/ft2unix.h: Adapted.

* src/base/ftsystem.c (ft_alloc, ft_realloc, ft_free, ft_io_stream,
ft_close_stream): Use FT_CALLBACK_DEF.

* builds/unix/ftsystem.c: Use new header scheme.
(FT_Done_Memory): Use free() from FT_Memory structure.

* src/base/ftinit.c, src/base/ftmac.c: Header scheme fixes.

* include/freetype/config/ft2build.h (FT2_CONFIG_ROOT,
FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE,
FT_SOURCE_FILE): Use `##' operator to be really ANSI C compliant.
2000-12-12 22:28:12 +00:00
Werner Lemberg 282a4742cf sigh,... 2000-12-12 16:39:11 +00:00
Werner Lemberg 36bb22c7b7 next try 2000-12-12 16:29:46 +00:00
Werner Lemberg 16019eb8b0 next try 2000-12-12 16:06:49 +00:00
Werner Lemberg 60922176fb next try 2000-12-12 15:33:01 +00:00
Werner Lemberg 8c5bed7fe0 another try 2000-12-12 07:35:12 +00:00
Werner Lemberg 70d9281979 * include/freetype/config/build.h (FT2_CONFIG_ROOT, FT2_PUBLIC_FILE,
FT2_CONFIG_FILE, FT2_INTERNAL_FILE, FT_SOURCE_FILE): Use `##'
operator to be really ANSI C compliant.


* builds/unix/detect.mk: Remove unused USE_CFLAGS variable.


* src/truetype/ttinterp.c: Remove unused CALC_Length() macro.
2000-12-12 06:36:55 +00:00
Werner Lemberg de6e145b7f * */*.h: Changed body inclusion macro names to start and end with
`__' (those which haven't converted yet).  Fixed minor conversion
issues.

* src/winfonts/winfnt.c: Updated to new header inclusion scheme.

* */*.[ch]: Changed source files to adhere to the new
* src/cff/cff.c, src/cff/rules.mk: Updated.

* */*.[ch]: Now using <ft2build.h> as the default build and setup
2000-12-09 00:45:38 +00:00
Werner Lemberg 4878fe6564 cleanups 2000-12-08 16:17:16 +00:00
David Turner 15492f2785 - updated all source files to adhere to the new inclusion scheme
- the CFF loader now loads the encodings and charset tables
  though doesn't use them for now
2000-12-08 02:42:29 +00:00
David Turner 20f0291bd9 * src/cache/ftlru.c (FT_Lru_Done): fixed a small memory leak 2000-12-06 18:02:01 +00:00
Werner Lemberg 2deb3eecd0 * builds/module.mk: Replaced `xxx #' with `xxx$(space).
* builds/os2/detekt.mk, builds/win32/detekt.mk: Moved comment to
avoid trailing spaces in variable.
* builds/freetype.mk: Use $(D) instead of $D to make statement more
readable.

* docs/docmaker.py: Formatting.

* src/psaux/psauxmod.c: Fixed a broken inclusion of component
header files (an FT_FLAT_COMPILE test was missing).
* src/cache/ftcmanag.c (FTC_Manager_Done): Fixed a bug that caused
an occasional crash when the function was called (due to a dangling
pointer).
* src/base/ftsystem.c (FT_Done_Memory): Fixed an obvious bug:
The ANSI "free()" function was called instead of "memory->free()".
* docs/docmaker.py: Added section filtering, multi-page generation
(index page generation is still missing though).
* builds/unix/install.mk, builds/unix/ft2unix.h: The file "ft2unix.h"
is now installed as <ft2build.h> for Unix systems.  Note that we
still use the "freetype2/freetype" installation path for now.

* many files: Now using <ft2build.h> as the default build and setup
configuration file in all public headers.  Internal source files
still need some changes though.
* builds/devel/ft2build.h, builds/devel/ftoption.h: Created a new
Win32 developer builds.
builds/win32/w32-dev.mk: Changed the developer build targets to
"devel-gcc" and "devel-bcc" in order to be able to develop with the
Borland C++ compiler.
2000-12-06 16:31:30 +00:00
David Turner bb54f997f9 re-fixed FTC_Manager_Done :-) 2000-12-05 23:07:16 +00:00
David Turner 12c6965161 fixed a broken inclusion of header files (a FT_FLAT_COMPILE test
was missing !!)
2000-12-05 22:28:15 +00:00
David Turner 8d1779e3f2 fixed a bug in FTC_Manager_Done 2000-12-05 22:23:12 +00:00
David Turner 679fc7be7d fixed small error in last update of FT_Done_Memory 2000-12-05 21:32:02 +00:00
David Turner c226851cb6 updated DocMaker to generate section-specific pages 2000-12-05 14:49:39 +00:00
David Turner a07e763620 update 2000-12-05 08:40:54 +00:00
David Turner 0d5c29f95c fixed an obvious bug in FT_Done_Memory. The ANSI "free" function
was called, instead of "memory->free" !!
2000-12-05 08:39:14 +00:00
David Turner 7132dbdacf fixing Cygwin build 2000-12-04 23:34:42 +00:00
David Turner b44373be98 fixed Unix installation 2000-12-04 23:28:14 +00:00
David Turner 95bbba6b7d - updating the header inclusion scheme to use <ft2build.h> by
default..

- created "builds/devel" to hold developer builds options
  for both Win32 and Unix

- fixed a bug in the winfonts driver, where the glyph image format
  wasn't set correctly..
2000-12-04 22:53:55 +00:00
Werner Lemberg 42e9149f8a Added 2.0.1 entry 2000-12-02 17:08:55 +00:00
Werner Lemberg 6a351f3a82 formatting 2000-12-02 17:07:15 +00:00
David Turner 50fc8dc598 changes to allow compilation under Unix and Cygwin 2000-12-02 00:35:11 +00:00
Werner Lemberg 58e6c8ea39 minor fixes 2000-12-01 21:56:47 +00:00
David Turner 7a31c1f1da fixed a few warnings with Borland C++ 2000-12-01 21:43:05 +00:00
David Turner 5b3e03a2ae small updates to the documentation and the configure scripts to
prepare the 2.0.1 release
2000-12-01 18:55:22 +00:00
Werner Lemberg ced382a86c * INSTALL: Revised.
* builds/compiler/bcc-dev.mk, builds/compiler/visualage.mk,
builds/compiler/bcc.mk, builds/win32/w32-bcc.mk,
builds/win32/w32-bccd.mk: Revised.
* include/freetype/config/ftbuild.h,
include/freetype/internal/internal.h: Revised.
* include/freetype/ftimage.h: Updated to new header inclusion scheme.


* builds/toplevel.mk (.PHONY): Adding `distclean'.
* builds/unix/detect.mk (.PHONY): Adding `devel', `unix', `lcc',
`setup'.


* INSTALL: Slightly updated the quick starter documentation to
include IDE compilation, prevent against BSD Make, and specify "make
setup" instead of a single "make" for build configuration.
* include/config/ftbuild.h, include/internal/internal.h: Added new
configuration files used to determine the location of all public,
configuration, and internal header files for FreeType 2.  Modified
all headers under "include/freetype" to reflect this change.  Note
that we still need to change the library source files themselves
though.
builds/win32/detect.mk: Added new files to support compilation with
the free Borland C++ command-line compiler.  Modified the detection
rules to recognize the new "bcc32" target in "make setup bcc32".
src/truetype/ttobjs.c, src/truetype/ttgload.c,
src/truetype/ttinterp.c: Fixed a few comparisons that Borland C++
didn't really like.  Basically, this compiler complains when FT_UInt
is compared to FT_UShort (apparently, it promotes `UShort' to `Int'
in these cases).
2000-12-01 17:25:58 +00:00
David Turner 9b9a5ffb2d - added support for the free command-line Borland C++ compiler
in the "builds" directory

- modified a few files because BCC32 didn't like certain comparisons
  (UInt compared with a UShort, apparently the UShort is promoted to
  an Int)

- updated the INSTALL file to include IDE compilation, prevent against
  BSD Make, and clarify the use of "make setup" (instead of "make")
  for build configuration
2000-11-30 23:48:22 +00:00
David Turner 5ca75c3f9d introduced the new <freetype/config/ftbuild.h> file to determine
where is the top-level include directory for all public, configuration
and internal header files..
2000-11-30 23:12:33 +00:00
Tom Kacvinsky 6e4c779f13 Added entries for calculation of `face-height' in t1/t2objs.c. 2000-11-30 21:58:49 +00:00
Tom Kacvinsky 410a3e4646 Fixed computation of `face->height'. 2000-11-30 21:56:55 +00:00
Tom Kacvinsky 4efbfc9ba2 Added calculation of `face->height' for pure CFF fonts. 2000-11-30 21:53:39 +00:00
Werner Lemberg 61d8ed8f4d formatting 2000-11-30 06:23:45 +00:00
David Turner 5744be18a2 fixed a bug in the Conic bezier extrema computation formula.. 2000-11-29 23:59:08 +00:00
Werner Lemberg 0973e98e21 * src/base/ftcalc.c (FT_SqrtFixed), src/base/ftobjs.c
(FT_Set_Renderer): Use FT_EXPORT_DEF.
* src/cache/ftcimage.c (FTC_Image_Cache_Lookup),
src/cache/ftcmanag.c (FTC_Manager_Done, FTC_Manager_Reset,
FTC_Manager_Lookup_Face, FTC_Manager_Lookup_Size,
FTC_Manager_Register_Cache), src/cache/ftcsbits.c
(FTC_SBit_Cache_Lookup): Ditto.

* src/include/freetype/cache/ftcglyph.h (FTC_GlyphNode_Init),
src/include/freetype/ftmac.h (FT_New_Face_From_FOND): Use FT_EXPORT.
2000-11-29 17:48:57 +00:00
Werner Lemberg e9835a1926 * 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).
2000-11-29 15:18:54 +00:00
Werner Lemberg dcbfffaf0c new file 2000-11-29 15:17:44 +00:00
Werner Lemberg af9b8c9d6a * src/truetype/ttobjs.c (TT_Init_Size): Fix #ifdef's to work with
disabled interpreter also.

* src/base/ftnames.c (FT_Get_Sfnt_Name_Count): Fix incorrect
parentheses.
2000-11-29 04:45:26 +00:00
Werner Lemberg f2b2e249a3 formatting 2000-11-27 19:23:05 +00:00
Tom Kacvinsky 788d724886 Changed entry for src/cff/t2gload.c (T2_Parse_CharStrings) to reflect
changes made for even/odd argument counts.
2000-11-27 08:31:05 +00:00
Tom Kacvinsky 2c7b3c7385 T2_Parse_CharStrings: Added more logic to glyph width setting code to
take into account even/odd argument counts.
2000-11-27 08:22:23 +00:00
Tom Kacvinsky 19aeac97a4 Simplied glyph width processing code and the comments pertaining to it. 2000-11-27 03:23:50 +00:00
Tom Kacvinsky ecaa7b4ae9 Added entry for src/cff/t2gload.c (T2_Parse_CharStrings):
Modified the glyph width parsing code to be more robust.
2000-11-27 01:00:38 +00:00
Tom Kacvinsky 8fa688198c In function T2_Parse_CharStrings, modified glyph width assignment code
to be more robust.  The code now takes into account glyphs that

   1. have the width given as it is, rather than as a difference against
      `nominal_width', and

   2. have the width operand specified before one of the h/r/vmoveto
      commands or the endchar command.
2000-11-27 00:57:13 +00:00
Werner Lemberg f6ecab5858 * builds/ansi/ansi.mk: Fix inclusion order of files.
* src/type1/t1objs.c (T1_Init_Face): Compute style flags.
2000-11-26 21:25:53 +00:00
Werner Lemberg 2b71db018b * builds/compiler/ansi-cc.mk (CLEAN_LIBRARY): Fix rule and
conditional.
2000-11-26 10:12:00 +00:00
Werner Lemberg 2eb614d8d1 * src/type1/t1load.c (parse_subrs, parse_charstrings): Use decrypt
function from PSAux module.

* src/type1/t1parse.c (T1_Done_Parse): Renamed to...
(T1_Finalize_Parser): New function (to avoid name clash with a
function in the PSAux module).
(T1_Decrypt): Removed since it it duplicated in the PSAux module.
(T1_Get_Private_Dict): Added `psaux' as new parameter; use decrypt
function from PSAux module.

* src/type1/t1parse.h: Adapted.
2000-11-23 08:21:13 +00:00
Tom Kacvinsky 32820693e8 Added an entry for "off by one" error in src/cff/t2load.c (T2_Get_String). 2000-11-23 03:45:52 +00:00
Tom Kacvinsky b50b481d4c In function T2_Get_String, we called T2_Get_Name with an string id
that was off by one.
2000-11-23 03:43:14 +00:00
David Turner 36d67f89c9 adding cache manager documentation (draft) 2000-11-23 03:01:07 +00:00
Tom Kacvinsky f4f55e2159 Added entry for changes made to t2parse.c (in function parse_t2_real). 2000-11-22 23:37:31 +00:00
Tom Kacvinsky 12df1b92f1 Make sure that parse_t2_real correctly parses a CFF real number. Added more comments
to the function.
2000-11-22 23:34:56 +00:00
Tom Kacvinsky 752de1c862 Changed entry for `src/cff/t2objs.c (T2_Init_Face)' so that it is
shorter.
2000-11-22 20:40:29 +00:00
Tom Kacvinsky c2c932847c Added entry for changes to T2_Init_Face (related to pure CFF fonts). 2000-11-22 14:38:29 +00:00
Tom Kacvinsky 3eaa5d69b0 In function T2_Init_Face, make sure that root->num_faces gets
set when loading a pure CFF font, and change units_per_EM to
1000 for a pure CFF font.
2000-11-22 14:34:22 +00:00
Werner Lemberg 761edfc0e3 formatting 2000-11-18 04:42:41 +00:00
David Turner b4790b0381 added support to synthetic Type 1 fonts. Why didn't
this thing get committed ??
2000-11-16 19:06:28 +00:00
David Turner a38af21991 added auto-hinting support for synthetic (obliqued)
Type 1 fonts
2000-11-16 18:06:55 +00:00
Werner Lemberg 34ad7361bd Formatting; removing tabs. 2000-11-13 16:58:01 +00:00
Tom Kacvinsky 79e181f0b8 Added entry for src/sfnt/ttload.c: Change tracing output in functions
TT_LookUp_Table and TT_Load_Generic_Table.  Change comments preceding
TT_Load_Generic_Table.

Added entry for src/sfnt/sfobjs.c: In function SFNT_Load_Face, set
boolean variable has-outline to true only if the font has a `glyf' or
`CFF ' table.
2000-11-13 07:37:51 +00:00
Tom Kacvinsky 084b86db6c In function TT_Load_Generic_Header, change tracing output to indicate
if a `bhed' or `head' table is being read.

In function TT_LookUp_Table, change tracing output to indicate success
or failure of table loading, and place output on one line.
2000-11-13 07:31:21 +00:00
Tom Kacvinsky c33451fa5a In function SFNT_Load_Face, set has_outline to true only if
the font has a `CFF ' or `glyf' table.
2000-11-13 07:26:31 +00:00
Werner Lemberg faf1f33880 * builds/win32/visualc/freetype.dsp: Fix raster1->raster and
type1z->type1.
2000-11-12 06:49:17 +00:00
Tom Kacvinsky 781d597777 Added a --libtool option, which returns the absolute path to the
libtool convenience library.
2000-11-12 02:55:25 +00:00
Tom Kacvinsky 183524cc2c builds/unix/freetype-config.in, builds/cygwin/freetype-config.in:
Added --libtool option.
2000-11-12 02:53:35 +00:00
Werner Lemberg 0b1489f937 * builds/cygwin/cygwin-def.in: Same fix as previous.
* builds/unix/unix-def.in: Add


so that installation of freetype-config does not fail.
2000-11-11 21:48:05 +00:00
Tom Kacvinsky f260b51e94 Fixed minor type in unix-def.in entry. Oops! 2000-11-11 08:35:24 +00:00
Tom Kacvinsky dacc5fb446 Added entry for changes to builds/unix/unix-defs.mk. 2000-11-11 08:32:41 +00:00
Tom Kacvinsky dfc5c58e69 Added
INSTALL_PROGRAM := @INSTALL_PROGRAM@
  INSTALL_SCRIPT  := @INSTALL_SCRIPT@

So that the install of freetype-config does not fail.
2000-11-11 08:29:17 +00:00
Werner Lemberg bc089cd691 New file. 2000-11-11 06:27:58 +00:00
Werner Lemberg cafeb8abb2 Minor fixes. 2000-11-11 05:55:41 +00:00
Werner Lemberg 645a153c0d Small fixes and formatting. 2000-11-10 22:43:37 +00:00
Werner Lemberg 2bc7c45b5f Revising, formatting. 2000-11-10 22:39:21 +00:00
Werner Lemberg 733b2f8b0a Revised. 2000-11-10 17:10:14 +00:00
Werner Lemberg 2f84d9a836 Revised. 2000-11-10 05:45:07 +00:00
Werner Lemberg f5200d5ecf Revised. 2000-11-09 22:15:34 +00:00
David Turner 7ee52893af fixed typos in the license 2000-11-09 19:14:11 +00:00
David Turner e1d4a5867c small update 2000-11-09 19:10:22 +00:00
David Turner 1babd5db86 - moved default installation of header files to "include/freetype2"
instead of "include/freetype"

- added generation and installation of "freetype-config" script
2000-11-09 18:29:59 +00:00
David Turner 80766b137d - changing the default include path from "include/freetype"
to "include/freetype2"

- adding template for the "freetype-config" script that is installed
  in the "bin" directory. It is used to retrieve information about
  the current installation path, C flags & linker flags
2000-11-09 18:23:30 +00:00
Werner Lemberg 1bd8a62ef4 Revised. 2000-11-09 16:23:23 +00:00
Werner Lemberg 904c1e15bf Revised. 2000-11-09 08:01:18 +00:00
Werner Lemberg 9348b9fc50 Revised. 2000-11-09 06:26:30 +00:00
David Turner 201edc9513 minor warning with VC++ solved 2000-11-09 03:18:32 +00:00
David Turner ace5b20b61 updating the "Design of FreeType 2" document 2000-11-09 01:14:31 +00:00
David Turner abd7fd4fb2 fixed a bug in "docs/glnames.py" which caused he generation of an
invalid Mac names table in the file "src/psnames/pstables.h".

This caused FT_Get_Glyph_Name to return invalid glyph names
for certain TrueType fonts..
2000-11-09 00:47:05 +00:00
David Turner ba0eaedb55 major reformatting of the "Glyph Conventions" document.
It is now made of 7 different pages and has been updated
2000-11-09 00:01:38 +00:00
Werner Lemberg 7d2e40ca92 Minor fixes. 2000-11-08 20:21:38 +00:00
David Turner 9a79eb4853 fixed a small bug: the "linearHoriAdvance" and "vertHoriAdvance" were
not set correctly when the auto-hinter is used to load/hint a glyph..
2000-11-08 19:44:48 +00:00
David Turner e3258dfdae fixed max advance width for fixed-pitch T1 fonts 2000-11-08 19:40:08 +00:00
David Turner fa09119bf0 changed comments in the cache sub-system sources
to indicate that it is now BETA code, instead of ALPHA
2000-11-08 00:24:58 +00:00
David Turner 8c1b2d2c82 removed the file <freetype/internal/ftlist.h> and corrected
files that depended on it.

the ftlist.c function definitions are now FT_EXPORT_DEF
instead of FT_BASE_DEF
2000-11-08 00:20:25 +00:00
David Turner 0ed2173597 fixed a small bug in the abstract chunk cache class 2000-11-08 00:15:58 +00:00
Werner Lemberg 4966a22cda Moving doc comments for BASE functions from source to header files. 2000-11-07 23:56:02 +00:00
Werner Lemberg 9e0aabf443 All function comments are now removed from source files (and moved to the
header files if necessary).

Some minor fixes to have `make multi' run successfully (with gcc and g++).

Fixing compiler warnings.
2000-11-07 17:21:11 +00:00
Werner Lemberg ee166f01cc Complementing David's changes with formatting, adding documentation, etc.
More `*'-convention formatting, adding the `a' resp. `an' prefix to
variables.
2000-11-07 06:30:29 +00:00
David Turner e8b57cf82f removed deprecated reference to "SemTex" 2000-11-07 02:59:11 +00:00
David Turner b67dd2d4be removed incorrect comment 2000-11-07 02:44:04 +00:00
David Turner be574d8119 integrated Yamano-Uchi changes to the base source code. However,
I've made a few modifications:

  - there is no new field named "driver" in "FT_SizeRec"

  - the new fields in "TT_SizeRec" are:

       strike_index   :: value 0xFFFF means "no sbit strike selected"
       strike_metrics :: the FT_Size_Metrics structure corresponding to
                         the currently selected strike

  - the code in "ttload.c" has been somewhat cleaned up too

thanks a lot, Y-U !!

- David
2000-11-06 23:07:51 +00:00
David Turner 9fe20e0827 added simple objects relationships model to the design documentation 2000-11-06 20:37:47 +00:00
David Turner 4cb5c853d9 adding library model graphics 2000-11-06 20:21:31 +00:00
David Turner f1409686d5 some updates to the cache sub-system. some methods were moved from
the concrete "FTC_Image_Cache" and "FTC_SBit_Cache" to the abstract
"FTC_Glyph_Cache" and "FTC_Chunk_Cache", respectively..

note: this is not the end of changes to the cache sub-system
2000-11-06 19:29:06 +00:00
Werner Lemberg 591088c021 Added/restored the `*' convention for output parameters.
Some documentation fixes.
2000-11-06 04:33:56 +00:00
Werner Lemberg 3d4d50ff31 minor fixes.
Add more gcc warnings for development on UNIX.
2000-11-05 23:41:08 +00:00
Werner Lemberg 6828c90c5f Introduced $(space) in the makefiles to get rid of using the comment
separator for indicating a trailing space.
2000-11-04 23:41:02 +00:00
Werner Lemberg 65ce050bfa removed redundant checks. 2000-11-04 09:41:45 +00:00
Werner Lemberg 7a3edb723d Ignore build files. 2000-11-04 08:37:45 +00:00
Werner Lemberg 365c8fc1eb Ignore some UNIX shared build files. 2000-11-04 08:35:44 +00:00
Werner Lemberg 46f92ef2d9 Finishing David's latest changes (there were some errors in it). 2000-11-04 08:33:38 +00:00
David Turner a3d302571a defining new types to hold "internal" fields of public
objects:

  FT_Face_Internal, FT_Size_Internal, FT_Slot_Internal

these contain some fields that may change between releases
of FreeType, without affecting the size of FT_FaceRec,
FT_SizeRec, FT_GlyphSlotRec, etc.., which means that
drivers wouldn't need to be recompiled if we only add new
fields to an internal structure..

I plan to hack a few things related to the auto-hinter and
I need this move to ensure that we will not break binary
compatibility between 2.0 and 2.1 :-)

- David
2000-11-04 02:52:02 +00:00
David Turner d2d1701333 major reformatting of the sources:
FT_EXPORT_DEF    => FT_EXPORT
  FT_EXPORT_FUNC => FT_EXPORT_DEF
  BASE_DEF               => FT_BASE
  BASE_FUNC            => FT_BASE_DEF
  LOCAL_DEF             => FT_LOCAL
  LOCAL_FUNC          => FT_LOCAL_DEF
  LOCAL_FUNC_X     => FT_CALLBACK_DEF
  LOCAL_DEF_X       => FT_CALLBACK_TABLE
  FT_CPLUSPLUS     => FT_CALLBACK_TABLE_DEF
2000-11-04 01:55:49 +00:00
Werner Lemberg d2ac68bddf Don't access freed variables... 2000-11-03 07:57:51 +00:00
Werner Lemberg 350a1c1a9e Remove redundant code; fix computation of `last'. 2000-11-03 07:34:29 +00:00
Werner Lemberg cf6bc2e22d More C++ fixes. 2000-11-02 15:14:38 +00:00
Werner Lemberg ae7dc21fd1 Adding header file for labs(). 2000-11-02 08:20:15 +00:00
Werner Lemberg 19e66a8f36 Moving FreeType license to doc dir.
Adding GPL.

Explaining double license in LICENSE.TXT

Minor improvements to make system.
2000-11-02 07:53:08 +00:00
Werner Lemberg b92d66ce29 new file 2000-11-01 20:27:39 +00:00
Werner Lemberg 6a753b4e8a Adding rules for mingw32 compiler. 2000-11-01 20:27:13 +00:00
Werner Lemberg 6d437b09d5 Fixing include header for a `make multi' build.
Finishing formatting of cache stuff.

Fixed getDriverClass stuff -- added it to winfnt.c also.  Note that this
still has to be documented.
2000-10-31 22:13:54 +00:00
Werner Lemberg dcff1129fe Removing trailing whitespace. 2000-10-31 20:42:18 +00:00
Werner Lemberg b571ce70f0 Formatting.
Adding a .cvsignore file.
2000-10-31 19:42:53 +00:00
Werner Lemberg 110d236f6d Formatting.
Removed double src/cache/ftcimage.h.

Replaced FTC_Image_Type with #defines since this contains bit flags and not
enumerated values.
2000-10-31 17:49:07 +00:00
David Turner e566a9616f at last, the infamous cache bug is fixed !! 2000-10-31 10:58:23 +00:00
Werner Lemberg 687d32c05e Revised/formatted/corrected. 2000-10-31 07:36:53 +00:00
Werner Lemberg 3602c4460d Formatting/correcting the first three parts of the design docs. 2000-10-30 20:46:41 +00:00
Werner Lemberg 322a481c73 minor formatting 2000-10-30 19:22:09 +00:00
David Turner 7bfc089dc9 added page 5 of design documentation 2000-10-30 18:55:47 +00:00
Tom Kacvinsky d249ee7ac7 In function FTC_ChunkSet_Destroy, changed `manaher' to `manager'. Just
a fix for a silly typo.
2000-10-29 01:47:51 +00:00
David Turner 7d0f1137db completed the sbit cache, though it's still buggy :-(
major reformatting of the cache subsystem (again)
added substantial documentation too in header files
2000-10-28 23:34:45 +00:00
Werner Lemberg 241cc2cc4f Renamed z1* files back to t1*; the same transition for Z1_* structures
Removed obsolete raster1/* files.
2000-10-28 17:10:06 +00:00
Werner Lemberg 48397f5d60 Revised. 2000-10-28 16:59:44 +00:00
David Turner 6b4a4610eb - completed the abstract chunk cache class
- started implementin a "small-bitmaps" cache derived from it
- (soon a "metrics" cache will be written too)
2000-10-28 13:17:11 +00:00
David Turner 843997b2ca small updates:
- reworked slightly the cache manager to better
   differentiate between the abstract class in "ftcglyph.h"
   and the FT_Glyph sub-class in "ftcimage.h", and
   slightly reduced the size of FTC_GlyphNodeRec, saving
   8 bytes on a 32-bit system. Yes, I'm crazy ;-)

 - added build files to compile with LCC on Unix too
   (compile speeds _are_ insane with it). There is unfortunately
   a bug in the version I'm using (LCC 4.1) that prevents it
   to compile FT_MulTo64 correctly (in src/base/ftcalc.c)

   the generated assembly is incorrect, I don't know what
   to do ?? the build files are ok, though..

   you should invoke "make setup lcc" to select them..
2000-10-28 07:26:59 +00:00
David Turner 7974b6ec04 fixing a small bug in FT_Glyph_To_Bitmap:
the glyph advance wasn't copied to the bitmap !!
2000-10-27 00:53:16 +00:00
Werner Lemberg e4c39bf2f6 Some formatting.
Fixed some data types/added header files to remove compiler warnings.

Added trivial input data check to FT_Outline_Get_BBox().

Fixed type1z -> type1 file inclusions.
2000-10-26 10:04:16 +00:00
David Turner f81ce2c4c5 updates to the API reference generators
the basic parsing routines seem to work ok
we now generate a list of DocBlock objects from
a list of input file, we now need to sort them
by "kind" (i.e. type/macro/functions) to generate
several web pages, as well as a global index
2000-10-26 07:52:40 +00:00
David Turner ab88a56eed simple renaming of directories:
"type1z"  -> "type1"
  "raster1" -> "raster"

note that I didn't rename all files. We'll have to endure
the "z1..." crazyness unless we perform a _big_ sed on
the sources :-)
2000-10-26 00:30:33 +00:00
David Turner 782cadcacb adding "ftbbox" to build rules 2000-10-26 00:08:15 +00:00
David Turner aaef89dcff - reviving the "ftbbox" component, used to compute exact bounding
box computations

- minor update to docmaker.py, more is coming
2000-10-26 00:06:35 +00:00
David Turner 691a9571dd updating the FT2 design documentation
- note that the "modules.html" will soon disappear, it is now replaced
  by a more general and more detailed series of pages named "design-??.html"

- the images have been seriously reworked, more will come tomorrow
2000-10-25 23:42:02 +00:00
Werner Lemberg 7b028719d8 fixes for fixes :-)
formatting; compiles now without warnings on my Linux box
2000-10-24 05:44:59 +00:00
David Turner 2fab8b7fc7 - minor reformatting of "ftmodule.h"
- added missing "const" statements in the source code in order
  to really get rid of writable static variables
2000-10-23 22:46:56 +00:00
David Turner 7fd0ce4ef8 - reformatting and tiny doc update 2000-10-23 18:33:30 +00:00
David Turner 7a785934ec - added first draft of "Modules in FreeType 2"
- minor formatting / testing in docmaker.py
2000-10-23 18:32:55 +00:00
Werner Lemberg 7fc393b699 added development header files to CONFIG_H in the makefiles
increased T1_MAX_CHARSTRINGS_OPERANDS (again) to 256 -- one glyph of the
Chinese MingTiEG-Medium needs it that large
2000-10-19 15:56:22 +00:00
Werner Lemberg dc356a19af Converting tabs to spaces in z1load.
Edited FT1's convntns.txt and added it to FT2.
2000-10-19 05:12:00 +00:00
Tom Kacvinsky 968b31154f In function parse_encoding, initialize encoding_table.elements to have
.notdef in each entry.

In function parse_charstrings, place the .notdef glyph in index 0, and
add a .notdef glyph if it is missing.

In function Z1_Open_Face, only change min/max encoded char if it is not
.notdef.
2000-10-17 20:25:30 +00:00
Werner Lemberg d2e9536258 Fixed two typos spotted by Ryan Martindale <ryan@qsicorp.com>. 2000-10-17 14:29:48 +00:00
Werner Lemberg a444ee94cd Added copyright messages to all Makefiles.
Added documentation to FT_Get_Sfnt_* stuff (in ftnames.[ch])

minor other doc fixes
2000-10-17 03:38:43 +00:00
Werner Lemberg fbe54e4098 ftnames.c has been erroneously included twice. 2000-10-15 23:32:01 +00:00
Werner Lemberg 795ec46f9a Make ftsynth.c work again.
Renamed FT_*_Outline to FT_Outline_*
2000-10-15 21:59:58 +00:00
Werner Lemberg 54035b41a9 Fix typo (FT_... -> TT_...) 2000-10-15 17:59:17 +00:00
Tom Kacvinsky f5e39e2002 Minor fix in Z1_Open_Face for building char_index table 2000-10-15 08:53:27 +00:00
Werner Lemberg c5930ddbb0 updated, formatted 2000-10-14 15:24:39 +00:00
Werner Lemberg d1008823d8 Enabled TT interpreter in development version of ftoption.h 2000-10-14 05:18:59 +00:00
Werner Lemberg 07e32f6b04 More fixes to the tutorial.
Added artificial Type 1 pid/eid paors to ttnameid.h.
2000-10-13 21:00:36 +00:00
Werner Lemberg 9a2a55a48f complete revision 2000-10-13 07:08:44 +00:00
Werner Lemberg cd8cb7f5c4 Completely revised. 2000-10-12 16:09:49 +00:00
Werner Lemberg 1d4dec05e9 formatting
small fixes
2000-10-12 05:05:40 +00:00
David Turner b45b08fa39 formatting 2000-10-12 01:29:14 +00:00
David Turner 621573d1c3 formatting 2000-10-12 01:22:29 +00:00
David Turner 9abc0cd9ec the function FTC_Manager_Lookup_Size will return a valid
FT_Face handle, even if no size was found..
2000-10-12 00:28:00 +00:00
David Turner 18ab99fa7d fixed a subtle 64-bit problem that only appears with
Compaq C compiler (though it's really a bug)
2000-10-11 23:39:03 +00:00
Werner Lemberg 47dcfcce39 Added new `ft_glyph_bbox_unscaled' enum; fixing documentation of
FT_Glyph_Get_CBox().

ftnames.c has been omitted from the Makefile.
2000-10-11 23:31:12 +00:00
Werner Lemberg 1ee37a667d A fix from Yamano'uchi to get correct font names. 2000-10-11 14:59:46 +00:00
Werner Lemberg 443a976885 A fix from Tom to fix the last=first point problem if it is a control point. 2000-10-11 05:52:42 +00:00
Werner Lemberg 01bd7d5825 provide `export "C"' guard only for default fterror handling. 2000-10-10 03:58:32 +00:00
Werner Lemberg 5977c98470 patch from Tom to fix a problem with path_begun. 2000-10-09 01:44:40 +00:00
Werner Lemberg efd108b60b fix documentation 2000-10-07 15:51:50 +00:00
David Turner ea917dae6c fixed a small bug in the uninstall mode 2000-10-07 01:21:25 +00:00
Werner Lemberg c817a7ee73 minor formatting issues 2000-10-05 04:53:31 +00:00
David Turner d092659818 fixed two bugs:
- one bug in the auto-hinter that could cause some program
    crashes with certain fonts

  - fixed the loading of the font matrix "offset" parameters
    in Type 1 and CID-keyed fonts..
2000-10-03 22:03:09 +00:00
David Turner 4564ca8a2c small fix:
when in direct rendering mode, the target bitmap buffer
  is not checked..
2000-10-03 19:22:52 +00:00
David Turner 3c491067c4 small fix:
when in direct rendering mode, the target bitmap buffer
  is not checked..
2000-10-03 19:13:11 +00:00
David Turner 3ee4450879 changing the linkage type of
FT_New_GlyphSlot and FT_Done_GlyphSlot to
BASE_DEF instead of FT_EXPORT_DEF
2000-10-03 18:02:02 +00:00
David Turner cc11a05b8a updated the build system:
- new files for the "cygwin" platform
 - new workspace files for Visual C++ in "builds/win32/visualc"
 - updated "docs/BUILD" slightly
2000-10-03 17:51:29 +00:00
David Turner 3eff67185e adding missing image files 2000-10-03 17:08:42 +00:00
David Turner 43764232b8 removing obsolete files:
the design of FT2 has evolved considerably since
these documents were written, and it's better not to
include them in order to avoid confusion among
users of the library..
2000-10-03 17:07:28 +00:00
Werner Lemberg 59266f23c9 Fixing comment in unixddef.mk which caused a trailing blank.
Adding a new error, FT_Err_Invalid_Pixel_Size (used in winfnt.c)

Fixing FT_Read_Fields() which failed for ft_frame_{bytes,skip}.  This bug
disabled the Winfont driver.

Minor formatting issues.
2000-09-29 06:41:56 +00:00
David Turner 36afdb3a8b fixed a bug in the Type 1 and CID font drivers:
the value of the descent returned was positive,
  instead of being negative..
2000-09-27 01:01:10 +00:00
Werner Lemberg 0339b6849c Adding missing code for flat compiling mode. 2000-09-26 13:25:15 +00:00
Werner Lemberg fd3b8e7ca1 Clean up, formatting etc.
Fixing rules for installing cache headers on Unix.

Updating builds/unix/ftconfig.in.
2000-09-22 21:23:29 +00:00
Werner Lemberg d1242ba4bb Fixed typo in ftimage.h
Fixed sbit on/off flag in cache code.
2000-09-22 06:52:20 +00:00
Werner Lemberg 59395eca56 Applied a patch from Hidetoshi for embedded bitmap metrics support. 2000-09-22 03:37:45 +00:00
Werner Lemberg 6f3293e0b5 Added support for (3,0) pid/eid. 2000-09-21 14:10:23 +00:00
David Turner 674826fa81 fixed a bug that happened when rendering spaces
in monochrome mode..

actually, when outline.num_points == 0, it is legal
to have outline.points == 0 too. The code did return
a FT_Err_Invalid_Outline error incorrectly then because
the checks were not performed in the correct order
2000-09-19 19:44:42 +00:00
David Turner 5483e69cd8 small update, allow CONFIG_MK to be pre-defined
before inclusion
2000-09-19 18:33:20 +00:00
David Turner 214a13db23 final touches. Cache seems working after all, though the
default cache size of 300 Kb is certainly too high for
now :-)

Need to implement abstract chunk cache and bitmap chunck cache
2000-09-19 02:08:09 +00:00
David Turner 3752ad97d8 updated the cache sub-system. Major internal rewrite
please be aware that major bug persist..
2000-09-19 01:11:11 +00:00
David Turner 2905ff93b1 removed obsolete file (ftcimage.h)
updated header files
2000-09-19 01:10:25 +00:00
David Turner ac1c157d2c fixed minor bug in the smooth renderer which forced
the span callback to be called with y == -1 and count == 0
2000-09-17 17:17:16 +00:00
David Turner 05b3a9d6f8 major revamp of the build system.
Fixing the Unix Autoconf parts
2000-09-15 23:47:42 +00:00
David Turner 71441881ab adding updated cache header files 2000-09-15 22:50:59 +00:00
David Turner 2c4a21d3e3 removed obsolete files 2000-09-15 22:42:43 +00:00
David Turner 76ca167b28 major revamp of the build system 2000-09-15 22:42:06 +00:00
David Turner a3dca2781b small bug-fix, the linearHoriBearing value was not
loaded not computed correctly
2000-09-15 17:17:17 +00:00
David Turner 4e0cebbd51 small bug-fix 2000-09-15 17:16:49 +00:00
David Turner dc2cc76d62 fixed a very stupid bug that prevented FT_Outline_Render from
working correctly..
2000-09-15 03:37:16 +00:00
Werner Lemberg 3254bd1f00 small formatting issues. 2000-09-11 22:50:13 +00:00
David Turner 99fbfd9a68 - added a new function called FT_SqrtFixed to compute the
16.16 square root of a 16.16 number (this could come handy
  in a later version of the auto-hinter)

- small fixes to the smooth renderer. It used to use way too
  much line segments when drawing beziers !!
2000-09-02 00:20:42 +00:00
Werner Lemberg 4138ded5db Fixed a long outstanding bug with an incorrect offset for reading post
tables.
2000-09-01 14:36:39 +00:00
Werner Lemberg 4222466667 Small improvement. 2000-09-01 05:35:49 +00:00
David Turner 80c2a6ec1d - the file "ftlist.h" was moved from <freetype/internal/..> to
<freetype/...>

- bugfix for the cache sub-system..
2000-08-30 21:40:45 +00:00
Just van Rossum 99a69671d0 updated for new modules and sources (mainly psaux) 2000-08-29 19:10:16 +00:00
Werner Lemberg 7f7174ef2f More warnings fixed. 2000-08-29 18:58:41 +00:00
Werner Lemberg 740eb33162 Minor fixes. 2000-08-29 18:37:25 +00:00
Werner Lemberg a935908615 Introducing new macro LOCA_VAR to solve some problems with structures
containing function pointers.

FT will now compile again with C++.
2000-08-29 16:50:01 +00:00
David Turner f96983e003 fixed some bugs in the caching sub-system and improved
its API to enable many kinds of glyph images..

(note that the "ftview" program has been changed to
use the caching sub-system, "ftmulti" and "ftstring"
should come soon).
2000-08-29 16:04:28 +00:00
David Turner a84d72d1fc a small optimisation that should speed things a bit.
I'm surprised I didn't do it before..
2000-08-29 16:03:28 +00:00
David Turner 96bfe27722 a fix to the computation of the font "text height" (i.e. the
baseline-to-baseline distance).

Unfortunately, we cannot rely on the OS/2 fields, like
sTypoAscender or usWinAscent to compute it. Rather,
we only look at the horizontal header's content. In case
the "line gap" is set to 0, we compute the text height as
115% of the ascender+descender value..

(this percentage is based on the values found in many
Windows fonts).
2000-08-29 16:03:01 +00:00
Werner Lemberg 312b59b7c0 Formatting.
docmaker.py will now run with older Python versions also.  Small fix.
2000-08-27 07:12:40 +00:00
Werner Lemberg ec54ffde03 Introducing new error code FT_Err_Invalid_Cache_Handle.
Regrouping of error codes.
2000-08-26 22:16:44 +00:00
Just van Rossum 2bd5f22191 #include <freetype/internal/ftdebug.h> /* for FT_ERROR() */ 2000-08-25 20:00:58 +00:00
Werner Lemberg 1a6f111f6f Formatting, small fixes.
Adding basic input parameter checking for exported functions.
2000-08-24 16:29:15 +00:00
David Turner 1724ba2848 - fixed an horrible FT_LOAD_RENDER bug that returned empty
bitmaps !!

- tested and fixed the image cache object. I'm performing a
  few more checks though, and we'll call the cache sub-system
  completed !!
2000-08-24 12:39:40 +00:00
David Turner 0266129b63 changed the FTC_Manager_New function to accept "max_faces" and
"max_sizes" parameters

fixed some bugs. the cache manager is now tested and validated
(now, it's time for the glyph image cache)
2000-08-24 11:53:35 +00:00
Just van Rossum 6e4a0a3da7 fixed typo in FT_FLAT_COMPILE section 2000-08-24 00:43:08 +00:00
David Turner a0dfe35de1 renamed "psmodule.c" to "psauxmod.c" 2000-08-24 00:30:24 +00:00
David Turner 1504d78e07 removing obsolete files 2000-08-23 22:50:39 +00:00
David Turner 35d9da9b6b removing obsolete files. These are moved to a new
CVS module called "ftlayout"
2000-08-23 22:48:50 +00:00
David Turner 325c26417b finally, the CID and Type1z driver are finished !!
Werner, please have a look at the code and start
re-formatting it :-)
2000-08-23 22:47:44 +00:00
David Turner ce73def57c completing the FreeType Cache subsystem files 2000-08-23 21:11:13 +00:00
Werner Lemberg fcb56c9094 Formatting, small fixes.
Adding copyright notices etc.
2000-08-23 17:32:42 +00:00
David Turner ba600671f1 The FreeType Caching Subsystem - first lines of code
beware, this code is not tested, and probably doesn't compile
correctly.. more information will follow..
2000-08-23 11:22:30 +00:00
David Turner de3f4a73c8 updated "psaux" and "type1z".
The Type 1 driver now completely relies on "psaux". I
now need to change the CID driver accordingly, then
finally move the Type 2 parsing routines to "psaux"
when appropriate..
2000-08-23 02:47:57 +00:00
David Turner 59eddffa6a updating documentation to explain the use of CFG to
pass parameters to the configure script
2000-08-22 23:15:23 +00:00
David Turner 2cc800d0d8 added preliminary emboldening code.. still _very_
experimental
2000-08-22 22:53:03 +00:00
David Turner 6ff656adc3 changed the "devel" setup targets to use "builds/<system>/devel"
as the build directory. This is used to specify a specific
"ftoption.h" that toggles all traces and logging on.

Hence, the default build doesn't need the traces
2000-08-22 22:51:57 +00:00
David Turner b1baf48034 adding developer dir hierarchy 2000-08-22 22:50:32 +00:00
David Turner 7711109239 the psaux module is now nearly completed
the "type1z" driver uses it to parse Type 1 charstrings
(not to parse the Type 1 token stream yet though)..
2000-08-22 22:36:33 +00:00
David Turner 6d315e33bd significant updates. The generated HTML is now much
more pleasant..
2000-08-21 23:01:32 +00:00
David Turner 5f8fb7207b minor updates to the "psaux" module.
Werner, please do not start re-formatting my experimental
code until I declare it "finished", because I still make big
changes to it that create lots of CVS conflicts..

thanks for your work, anyway :-)
2000-08-21 04:58:49 +00:00
David Turner 4d9c9578e7 fixed a _serious_ bug in FT_Glyph_Get_CBox 2000-08-21 04:43:01 +00:00
Werner Lemberg 95ddcc0243 Minor formatting.
Adding copyright/C++ guards to psaux files.
2000-08-17 07:18:04 +00:00
David Turner f740bd6576 added draft "psaux" code
the t1 driver now reads the complete font matrix

and applies it (some fonts do not work properly without
hinting though...)
2000-08-17 01:09:06 +00:00
David Turner f89f5cdf8e fixed the bug that prevented bitmap formats to be loaded
correctly when the auto-hinter is used (symptom: "winfonts"
driver didn't load bitmaps correctly).
2000-08-16 17:04:22 +00:00
Werner Lemberg eedd97d775 Yamano-uchi added support for SFNT-wrapped CID bitmap font files (with
minor modifications from WL).
2000-08-06 19:48:47 +00:00
Werner Lemberg 0122a4a948 Updating unix/ftconfig.in to recent config/ftconfig.h changes.
More C++ fixes: Introducing LOCAL_FUNC_X for local functions used in
function pointers (there are no local anonymous functions in C++) and
FT_CPLUSPLUS (instead of FT_EXPORT_VAR) to define linkage of structures
which contain function pointers.
2000-08-03 00:03:08 +00:00
Just van Rossum 75ca147140 Added little know adx offset to t1operator_seac() -- accent positioning now seems correct. 2000-08-02 02:44:25 +00:00
Werner Lemberg 95e78ae7c7 Add missing header file. 2000-08-02 01:10:59 +00:00
Werner Lemberg 7ede0f4adf Forgot to run autoconf... 2000-08-02 00:20:04 +00:00
Just van Rossum e092162ac7 Fixed Z1_Parse_CharStrings() to work correctly with "open" paths (ie. missing closepath operator) 2000-08-01 23:37:25 +00:00
Just van Rossum 0c99641a25 fixed t1_tofixed() to handle floats of the form .001 and -.001 correctly. 2000-08-01 20:47:48 +00:00
Werner Lemberg 5845e519ab Fixed dec-osf compiler switches. From Tom. 2000-08-01 18:44:18 +00:00
Werner Lemberg 53c4de62d0 Removing FT_MAKE_OPTION_SINGLE_LIBRARY_OBJECT. It has never worked.
Instead, define BASE_DEF() and BASE_FUNC() similarly to FT_EXPORT_DEF() and
FT_EXPORT_FUNC(), respectively, allowing the programmer to define proper
types and/or export lists for multiple DLLs if necessary (e.g. ftbase.dll --
standalone, fttype1.dll -- needs ftbase.dll, etc.).

The library is finally compiling and linking natively with a C++ compiler!
2000-08-01 17:05:20 +00:00
Werner Lemberg a74e4c0dac Added #ifdef's for C++ to all header files. 2000-08-01 13:17:04 +00:00
Werner Lemberg 2366de2542 Added a `distclean' target to remove files which are produced by the UNIX
configure script (in case no config.mk has been created due to errors).
2000-08-01 08:43:44 +00:00
Just van Rossum 16b6bba241 fixed two bugs related to T2 real numbers: the "skipping" code didn't behave correctly (leaving a bad stack ptr), and the actual parsing code also parsed the code (30) as two nibbles. 2000-08-01 07:12:31 +00:00
Just van Rossum 623160b690 Some simple patches that allow synthetic fonts to be rendered. *However*: although the FontMatrix is read correctly, it does _not_ seem to be used! I don't understand this... 2000-08-01 04:29:25 +00:00
Werner Lemberg 9e2d89278f Use the ANSI offsetof() macro instead of something home-brewn. 2000-08-01 01:34:18 +00:00
Werner Lemberg 4ddddb4482 Added autoconf tests FT_MUNMAP_DECL and FT_MUNMAP_PARAM to fix some devils.
Updating unix/ftsystem.c accordingly.

More warning fixes.
2000-07-31 22:51:00 +00:00
Werner Lemberg ff0cedbb2f Simplifying the FIELD_* and FRAME_* macros. Before calling these macros,
you should #define FT_STRUCTURE to the structure which will be filled.

Replaced FT_FIELD_REF with FT_FIELD_SIZE, FT_FIELD_SIZE_DELTA, and
FT_FIELD_OFFSET to make the code more readable; additionally, it should be
more portable because we no longer cast a pointer to an FT_UShort (which
e.g. fails with Sun's C++ compiler) but computes the difference between two
pointers which is guaranteed to work.

Fixing warnings (and C++ errors) while using Sun's latest cc and CC
incarnations.  Most of them are related to variable shadowing.
2000-07-31 18:59:02 +00:00
Werner Lemberg 1376fe7841 Fixing gcc warnings on Solaris. 2000-07-31 12:14:27 +00:00
Werner Lemberg af753548e0 Making path of $INSTALL always absolute. 2000-07-31 10:56:42 +00:00
Werner Lemberg 7b0f516268 Update to latest versions. 2000-07-30 20:21:22 +00:00
Werner Lemberg 6ae4765fb1 Applied a patch from Tom Kacvinsky (taken from the curren libtool CVS) to
make it libtool run on OSF.
2000-07-30 09:26:45 +00:00
Werner Lemberg c1e05db2bf Formatting. 2000-07-29 20:38:19 +00:00
Just van Rossum f421261d9c FT_Done_Stream(): do stream->close = 0 after calling stream->close(); this makes it safe to call FT_Done_Stream() more than once.
David: please review this; I hope you agree with this minor change.
2000-07-28 03:13:31 +00:00
Just van Rossum e17f3e2125 Adapted to new external stream semantics. 2000-07-28 02:25:23 +00:00
David Turner 3a3c24a684 removed warning 2000-07-28 01:51:49 +00:00
Just van Rossum 327d330d23 Oops, I had exaggerated the warning levels a weensy bit... 2000-07-28 01:37:53 +00:00
Just van Rossum e882065d41 Updated to reflect the new Mac FOND support setup. 2000-07-28 01:14:09 +00:00
Just van Rossum 22658f8eb1 Obsolete; Mac FOND support now lives in src/base/ftmac.c. 2000-07-28 01:13:29 +00:00
Just van Rossum 657ed493c7 Put FT_New_Face() in an #ifndef macintosh switch; ftmac.c provides an extended implementation. 2000-07-28 01:12:34 +00:00
Just van Rossum f88305673f Removed Mac fond driver #ifdefs 2000-07-28 01:11:20 +00:00
Just van Rossum ccb7f762c1 Brand new Mac support -- no more muching with changing drivers and reinitializing streams, but a clean layer on top of FT_Open_Face(): an extended version of FT_New_Face(). 2000-07-28 01:10:35 +00:00
Just van Rossum 6087a93044 Header for one Mac-specific additional API call. 2000-07-28 01:08:32 +00:00
Werner Lemberg d51e088127 Formatting. 2000-07-27 23:29:08 +00:00
David Turner ee2f62d50c update to changelog 2000-07-27 21:48:48 +00:00
David Turner c289782f0b re-adding a "unix-dev.mk". Debugging libtool output
is just too much of a pain for me, I prefer a good old
static lib without optimizations :-)

"make devel" is back on Unix then..
2000-07-27 21:40:22 +00:00
Werner Lemberg e4fc656e0e *slight* formatting only. Congratulations, David! :-) 2000-07-27 16:57:35 +00:00
David Turner 661f1cdbd2 small fix to the auto-hinter:
the filling direction of each glyph is now re-computed on the
fly, given that we cannot rely on the "flags" field of the
source outline..

this fixes problems with many fonts, including the Arphic ones
(not to say that CJK fonts are handled better for now though..)
2000-07-27 15:59:08 +00:00
Werner Lemberg 4d8370c954 Adapting changes for Unix to other makefiles. 2000-07-27 11:32:13 +00:00
Werner Lemberg 6a6ad14838 Removing compiler warnings about unused portions of code.
Now unix.in uses absolute paths also to overcome problems with libtool.
To do that in a consistent way I had to modify the rules how to handle
$OBJ_DIR (and consequently $LIB_DIR): You should set $OBJ_DIR explicitly
on the command line (or environment).
2000-07-27 11:20:20 +00:00
Werner Lemberg 3694a4001a Updating to libtool 1.3.5. 2000-07-26 22:51:03 +00:00
David Turner e7ac6c4c66 small compilation fix on 64-bits machines.. 2000-07-26 22:29:22 +00:00
Werner Lemberg 8283759559 Use `patsubst' instead of `subst' in cleaning rule to avoid problems with
filenames which contain `lo' in its name (e.g. ahglobal.lo).
2000-07-26 21:47:19 +00:00
Just van Rossum 554a350e7e now that "type1z" is renamed to "type1"; revert to hardcoding "type1".. 2000-07-26 20:31:18 +00:00
David Turner 0e48d9f96c small update 2000-07-26 19:13:51 +00:00
David Turner 1cc00d9863 updated documentation 2000-07-26 19:07:15 +00:00
David Turner 2db9bc11f6 - fixed the incorrect SO extension for Visual C++
- disabled the TrueType interpreter by default
- disabled the "type1" driver, "type1z" is now used
  by default (the internal driver name is "type1" now !!)
2000-07-26 19:04:08 +00:00
Werner Lemberg 0840a9cc9f autohint:
Formatting.

  Replacing many enums with #defines since we do arithmetics (especially
  ORing which would produce undefined enum values). The ideal thing instead
  of #defines is `const int' as provided in C++...

  Adding header files to rules.mk
2000-07-26 14:11:15 +00:00
Werner Lemberg b31d00fa9e formatting 2000-07-25 17:25:32 +00:00
Just van Rossum 0e32d0616b Use the "type1z" driver instead of the old one. 2000-07-25 16:40:23 +00:00
Just van Rossum 704bf63216 Changed parse_subrs() so that it'll work correctly both with wrongly sorted subr indices *and* non-contiguous subr arrays. Thanks to Tom K. for helping to isolate the problem. 2000-07-25 16:20:57 +00:00
David Turner b1aae9194c removed obsolete file 2000-07-24 18:40:28 +00:00
Werner Lemberg 4f27de131e *** empty log message *** 2000-07-24 06:03:58 +00:00
602 changed files with 132675 additions and 57655 deletions

1
.cvsignore Normal file
View File

@ -0,0 +1 @@
config.mk

893
CHANGES
View File

@ -1,893 +0,0 @@
LATEST CHANGES
- found some bugs in the composite loader (seac) of the Type1-based
font drivers..
- renamed the directory "freetype2/config" to "freetype2/builds" and
updated all relevant files..
- found a memory leak in the "type1" driver
- incorporated Tom's patches to support flex operators correctly
in OpenType/CFF fonts.. Now all I need is to support pure CFF
and CEF fonts to be done with this driver.. :-)
- added the Windows FNT/FON driver in "src/winfonts". For now,
it always "simulates" a Unicode charmap, so it shouldn't be
considered completed right now..
It's there to be more a proof of concept than anything else
anyway. The driver is a single C source file, that compiles
to 3 Kb of code..
I'm still working on the PCF/BDF drivers.. but I'm too lazy
to finish them now..
- CHANGES TO THE HIGH-LEVEL API
o FT_Get_Kerning has a new parameter that allows you to select
the coordinates of the kerning vector ( font units, scaled,
scaled + grid-fitted ).
o the outline functions are now in <freetype/ftoutln.h> and not
part of <freetype/freetype.h> anymore
o <freetype/ftmodule.h> now contains declarations for
FT_New_Library, FT_Done_Library, FT_Add_Default_Modules
o the so-called convenience functions have moved from "ftoutln.c"
to "ftglyph.c", and are thus available with this optional component
of the library. They are declared in <freetype/ftglyph.h> now..
o anti-aliased rendering is now the default for FT_Render_Glyph
(i.e. corresponds to render_mode == 0 == ft_render_mode_normal).
To generate a monochrome bitmap, use ft_render_mode_mono, or the
FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char.
FT_LOAD_ANTI_ALIAS is still defined, but values to 0.
o <freetype/freetype.h> now include <freetype/config/ftconfig.h>,
solving a few headaches :-)
o the type FT_GlyphSlotRec has now a "library" field.
- CHANGES TO THE "ftglyph.h" API
This API has been severely modified in order to make it simpler,
clearer, and more efficient. It certainly now looks like a real
"glyph factory" object, and allows client applications to manage
(i.e. transform, bbox and render) glyph images without ever knowing
their original format.
- added support for CID-keyed fonts to the CFF driver.
maybe support for pure CFF + CEF fonts should come in ??
- cleaned up source code in order to avoid two functions with the
same name. Also changed the names of the files in "type1z" from
"t1XXXX" to "z1XXXX" in order to avoid any conflicts.
"make multi" now works well :-)
Also removed the use of "cidafm" for now, even if the source files
are still there. This functionality will certainly go into a specific
module..
- ADDED SUPPORT FOR THE AUTO-HINTER
It works :-) I have a demo program which simply is a copy of "ftview"
that does a FT_Add_Module( library, &autohinter_module_class ) after
library initialisation, and Type 1 & OpenType/CFF fonts are now hinted.
CID fonts are not hinted, as they include no charmap and the auto-hinter
doesn't include "generic" global metrics computations yet..
Now, I need to release this thing to the FreeType 2 source..
- CHANGES TO THE RENDERER MODULES
the monochrome and smooth renderers are now in two distinct directories,
namely "src/raster1" and "src/smooth". Note that the old "src/renderer"
is now gone..
I ditched the 5-gray-levels renderers. Basically, it involved a simple
#define toggle in 'src/raster1/ftraster.c'
FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now select
the best renderer available, depending on render mode. If the current
renderer for a given glyph image format isn't capable of supporting
the render mode, another one will be found in the library's list.
This means that client applications do not need to switch or set the
renderers themselves (as in the latest change), they'll get what they
want automatically... At last..
Changed the demo programs accordingly..
- MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
source in order to provide the following enhancements:
- more generic module support:
The FT_Module type is now defined to represent a handle to a given
module. The file <freetype/ftmodule.h> contains the FT_Module_Class
definition, as well as the module-loading public API
The FT_Driver type is still defined, and still represents a pointer
to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
FT_Get_Driver by FT_Get_Module, etc..
- support for generic glyph image types:
The FT_Renderer type is a pointer to a module used to perform various
operations on glyph image.
Each renderer is capable of handling images in a single format
(e.g. ft_glyph_format_outline). Its functions are used to:
- transform an glyph image
- render a glyph image into a bitmap
- return the control box (dimensions) of a given glyph image
The scan converters "ftraster.c" and "ftgrays.c" have been moved
to the new directory "src/renderer", and are used to provide two
default renderer modules.
One corresponds to the "standard" scan-converter, the other to the
"smooth" one.
The current renderer can be set through the new function
FT_Set_Renderer.
The old raster-related function FT_Set_Raster, FT_Get_Raster and
FT_Set_Raster_Mode have now disappeared, in favor of the new:
FT_Get_Renderer
FT_Set_Renderer
see the file <freetype/ftrender.h> for more details..
These changes were necessary to properly support different scalable
formats in the future, like bi-color glyphs, etc..
- glyph loader object:
A new internal object, called a 'glyph loader' has been introduced
in the base layer. It is used by all scalable format font drivers
to load glyphs and composites.
This object has been created to reduce the code size of each driver,
as each one of them basically re-implemented its functionality.
See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
more information..
- FT_GlyphSlot had new fields:
In order to support extended features (see below), the FT_GlyphSlot
structure has a few new fields:
linearHoriAdvance: this field gives the linearly scaled (i.e.
scaled but unhinted) advance width for the glyph,
expressed as a 16.16 fixed pixel value. This
is useful to perform WYSIWYG text.
linearVertAdvance: this field gives the linearly scaled advance
height for the glyph (relevant in vertical glyph
layouts only). This is useful to perform
WYSIWYG text.
Note that the two above field replace the removed "metrics2" field
in the glyph slot.
advance: this field is a vector that gives the transformed
advance for the glyph. By default, it corresponds
to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
was specified when calling FT_Load_Glyph or FT_Load_Char
bitmap_left: this field gives the distance in integer pixels from
the current pen position to the left-most pixel of
a glyph image WHEN IT IS A BITMAP. It is only valid
when the "format" field is set to
"ft_glyph_format_bitmap", for example, after calling
the new function FT_Render_Glyph.
bitmap_top: this field gives the distance in integer pixels from
the current pen position (located on the baseline) to
the top-most pixel of the glyph image WHEN IT IS A
BITMAP. Positive values correspond to upwards Y.
loader: this is a new private field for the glyph slot. Client
applications should not touch it..
- support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
moved to the core library. Hence, the following:
- a transform can be specified for a face through FT_Set_Transform.
this transform is applied by FT_Load_Glyph to scalable glyph images
(i.e. NOT TO BITMAPS) before the function returns, unless the
bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
- once a glyph image has been loaded, it can be directly converted to
a bitmap by using the new FT_Render_Glyph function. Note that this
function takes the glyph image from the glyph slot, and converts
it to a bitmap whose properties are returned in "face.glyph.bitmap",
"face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
native image might be lost after the conversion.
- when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
and FT_Load_Char functions will call FT_Render_Glyph automatically
when needed.
- reformated all modules source code in order to get rid of the basic
data types redifinitions (i.e. "TT_Int" instead of "FT_Int", "T1_Fixed"
instead of "FT_Fixed"). Hence the format-specific prefixes like "TT_",
"T1_", "T2_" and "CID_" are only used for relevant structures..
============================================================================
OLD CHANGES FOR BETA 7
- bug-fixed the OpenType/CFF parser. It now loads and displays my two
fonts nicely, but I'm pretty certain that more testing is needed :-)
- fixed the crummy Type 1 hinter, it now handles accented characters
correctly (well, the accent is not always well placed, but that's
another problem..)
- added the CID-keyed Type 1 driver in "src/cid". Works pretty well for
only 13 Kb of code ;-) Doesn't read AFM files though, nor the really
useful CMAP files..
- fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks to
Boris Letocha for spotting them and providing a fix..
- fixed potential "divide by zero" bugs in ftcalc.c.. my god..
- added source code for the OpenType/CFF driver (still incomplete though..)
- modified the SFNT driver slightly to perform more robust header
checks in TT_Load_SFNT_Header. This prevents certain font files
(e.g. some Type 1 Multiple Masters) from being incorrectly "recognized"
as TrueType font files..
- moved a lot of stuff from the TrueType driver to the SFNT module,
this allows greater code re-use between font drivers (e.g. TrueType,
OpenType, Compact-TrueType, etc..)
- added a tiny segment cache to the SFNT Charmap 4 decoder, in order
to minimally speed it up..
- added support for Multiple Master fonts in "type1z". There is also
a new file named <freetype/ftmm.h> which defines functions to
manage them from client applications.
The new file "src/base/ftmm.c" is also optional to the engine..
- various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) +
small bug fixes in FT_Load_Glyph, the "type1" driver, etc..
- a minor fix to the Type 1 driver to let them apply the font matrix
correctly (used for many oblique fonts..)
- some fixes for 64-bit systems (mainly changing some FT_TRACE calls
to use %p instead of %lx).. Thanks to Karl Robillard
- fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added
a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when
loaded from a file (maybe I should move the bitmap cropper to the
base layer ??).
- changed the default number of gray levels of the smooth renderer to
256 (instead of the previous 128). Of course, the human eye can't
see any difference ;-)
- removed TT_MAX_SUBGLYPHS, there is no static limit on the number of
subglyphs in a TrueType font now..
=============================================================================
OLD CHANGES 16 May 2000
- tagged "BETA-6" in the CVS tree. This one is a serious release candidate
even though it doesn't incorporate the auto-hinter yet..
- various obsolete files were removed, and copyright header updated
- finally updated the standard raster to fix the monochrome rendering bug
+ re-enable support for 5-gray levels anti-aliasing (suck, suck..)
- created new header files, and modified sources accordingly:
<freetype/fttypes.h> - simple FreeType types, without the API
<freetype/internal/ftmemory.h> - definition of memory-management macros
- added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h>
- light update/cleaning of the build system + changes to the sources in
order to get rid of _all_ compiler warnings with three compilers, i.e:
gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX"
and LCC
IMPORTANT NOTE FOR WIN32-LCC USERS:
|
| It seems the C pre-processor that comes with LCC is broken, it
| doesn't recognize the ANSI standard directives # and ## correctly
| when one of the argument is a macro. Also, something like:
|
| #define F(x) print##x
|
| F(("hello"))
|
| will get incorrectly translated to:
|
| print "hello")
|
| by its pre-processor. For this reason, you simply cannot build
| FreeType 2 in debug mode with this compiler..
- yet another massive grunt work. I've changed the definition of the
EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
an argument, which is the function's return value type.
This is necessary to compile FreeType as a DLL on Windows and OS/2.
Depending on the compiler used, a compiler-specific keyword like __export
or __system must be placed before (VisualC++) or after (BorlandC++)
the type..
Of course, this needed a lot of changes throughout the source code
to make it compile again... All cleaned up now, apparently..
Note also that there is a new EXPORT_VAR macro defined to allow the
_declaration_ of an exportable public (constant) variable. This is the
case of the raster interfaces (see ftraster.h and ftgrays.h), as well
as each module's interface (see sfdriver.h, psdriver.h, etc..)
- new feature: it is now possible to pass extra parameters to font
drivers when creating a new face object. For now, this
capability is unused. It could however prove to be useful
in a near future..
the FT_Open_Args structure was changes, as well as the internal
driver interface (the specific "init_face" module function has now
a different signature).
- updated the tutorial (not finished though).
- updated the top-level BUILD document
- fixed a potential memory leak that could occur when loading embedded
bitmaps.
- added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as
it was missing from the public header (the implementation was already
in "ftobjs.c").
- the file <freetype/fterrors.h> has been seriously updated in order to
allow the automatic generation of error message tables. See the comments
within it for more information.
- major directory hierarchy re-organisation. This was done for two things:
* first, to ease the "manual" compilation of the library by requiring
at lot less include paths :-)
* second, to allow external programs to effectively access internal
data fields. For example, this can be extremely useful if someone
wants to write a font producer or a font manager on top of FreeType.
Basically, you should now use the 'freetype/' prefix for header inclusion,
as in:
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
Some new include sub-directories are available:
a. the "freetype/config" directory, contains two files used to
configure the build of the library. Client applications should
not need to look at these normally, but they can if they want.
#include <freetype/config/ftoption.h>
#include <freetype/config/ftconfig.h>
b. the "freetype/internal" directory, contains header files that
describes library internals. These are the header files that were
previously found in the "src/base" and "src/shared" directories.
As usual, the build system and the demos have been updated to reflect
the change..
Here's a layout of the new directory hierarchy:
TOP
include/
freetype/
freetype.h
...
config/
ftoption.h
ftconfig.h
ftmodule.h
internal/
ftobjs.h
ftstream.h
ftcalc.h
...
src/
base/
...
sfnt/
psnames/
truetype/
type1/
type1z/
Compiling a module is now much easier, for example, the following should
work when in the TOP directory on an ANSI build:
gcc -c -I./include -I./src/base src/base/ftbase.c
gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
etc..
(of course, using -Iconfig/<system> if you provide system-specific
configuration files).
- updated the structure of FT_Outline_Funcs in order to allow
direct coordinate scaling within the outline decomposition routine
(this is important for virtual "on" points with TrueType outlines)
+ updates to the rasters to support this..
- updated the OS/2 table loading code in "src/sfnt/ttload.c" in order
to support version 2 of the table (see OpenType 1.2 spec)
- created "include/tttables.h" and "include/t1tables.h" to allow
client applications to access some of the SFNT and T1 tables of a
face with a procedural interface (see FT_Get_Sfnt_Table())
+ updates to internal source files to reflect the change..
- some cleanups in the source code to get rid of warnings when compiling
with the "-Wall -W -ansi -pedantic" options in gcc.
- debugged and moved the smooth renderer to "src/base/ftgrays.c" and
its header to "include/ftgrays.h"
- updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with
up to 80 sub-glyphs !! Thanks to Werner
================================================================================
OLD CHANGES - 14-apr-2000
- fixed a bug in the TrueType glyph loader that prevented the correct
loading of some CJK glyphs in mingli.ttf
- improved the standard Type 1 hinter in "src/type1"
- fixed two bugs in the experimental Type 1 driver in "src/type1z"
to handle the new XFree86 4.0 fonts (and a few other ones..)
- the smooth renderer is now complete and supports sub-banding
to render large glyphs at high speed. However, it is still located
in "demos/src/ftgrays.c" and should move to the library itself
in the next beta.. NOTE: The smooth renderer doesn't compile in
stand-alone mode anymore, but this should be fixed RSN..
- introduced convenience functions to more easily deal with glyph
images, see "include/ftglyph.h" for more details, as well as the
new demo program named "demos/src/ftstring.c" that demonstrates
its use
- implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
drivers (this is required by the auto-hinter to improve its results).
- changed the raster interface, in order to allow client applications
to provide their own span-drawing callbacks. However, only the
smooth renderer supports this. See "FT_Raster_Params" in the
file "include/ftimage.h"
- fixed a small bug in FT_MulFix that caused incorrect transform
computation !!
- Note: The tutorial is out-of-date, grumpf.. :-(
================================================================================
OLD CHANGES - 12-mar-2000
- changed the layout of configuration files : now, all ANSI configuration
files are located in "freetype2/config". System-specific over-rides
can be placed in "freetype2/config/<system>".
- moved all configuration macros to "config/ftoption.h"
- improvements in the Type 1 driver with AFM support
- changed the fields in the FT_Outline structure : the old "flags"
array is re-named "tags", while all ancient flags are encoded into
a single unsigned int named "flags".
- introduced new flags in FT_Outline.flags (see ft_outline_.... enums in
"ftimage.h").
- changed outline functions to "FT_Outline_<action>" syntax
- added a smooth anti-alias renderer to the demonstration programs
- added Mac graphics driver (thanks Just)
- FT_Open_Face changed in order to received a pointer to a FT_Open_Args
descriptor..
- various cleanups, a few more API functions implemented (see FT_Attach_File)
- updated some docs
================================================================================
OLD CHANGES - 22-feb-2000
- introduced the "psnames" module. It is used to:
o convert a Postscript glyph name into the equivalent Unicode
character code (used by the Type 1 driver(s) to synthetize
on the fly a Unicode charmap).
o provide an interface to retrieve the Postscript names of
the Macintosh, Adobe Standard & Adobe Expert character codes.
(the Macintosh names are used by the SFNT-module postscript
names support routines, while the other two tables are used
by the Type 1 driver(s)).
- introduced the "type1z" alternate Type 1 driver. This is a (still
experimental) driver for the Type 1 format that will ultimately
replace the one in "src/type1". It uses pattern matching to load
data from the font, instead of a finite state analyzer. It works
much better than the "old" driver with "broken" fonts. It is also
much smaller (under 15 Kb).
- the Type 1 drivers (both in "src/type1" and "src/type1z") are
nearly complete. They both provide automatic Unicode charmap
synthesis through the "psnames" module. No re-encoding vector
is needed. (note that they still leak memory due to some code
missing, and I'm getting lazy).
Trivial AFM support has been added to read kerning information
but wasn't exactly tested as it should ;-)
- The TrueType glyph loader has been seriously rewritten (see the
file "src/truetype/ttgload.c". It is now much, much simpler as
well as easier to read, maintain and understand :-) Preliminary
versions introduced a memory leak that has been reported by Jack
Davis, and is now fixed..
- introduced the new "ft_glyph_format_plotter", used to represent
stroked outlines like Windows "Vector" fonts, and certain Type 1
fonts like "Hershey". The corresponding raster will be written
soon.
- FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
interface that uses a structure to describe the input stream,
the driver (if required), etc..
TODO
- Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
- Add a function like FT_Load_Character( face, char_code, load_flags )
that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph
to ease developer's work.
- Update the tutorial !!
- consider adding support for Multiple Master fonts in the Type 1
drivers.
- Test the AFM routines of the Type 1 drivers to check that kerning
information is returned correctly.
- write a decent auto-gridding component !! We need this to release
FreeType 2.0 gold !
----- less urgent needs : ----------
- add a CFF/Type2 driver
- add a BDF driver
- add a FNT/PCF/HBF driver
- add a Speedo driver from the X11 sources
==============================================================================
OLDER CHANGES - 27-jan-2000
- updated the "sfnt" module interface to allow several SFNT-based
drivers to co-exist peacefully
- updated the "T1_Face" type to better separate Postscript font content
from the rest of the FT_Face structure. Might be used later by the
CFF/Type2 driver..
- added an experimental replacement Type 1 driver featuring advanced
(and speedy) pattern matching to retrieve the data from postscript
fonts.
- very minor changes in the implementation of FT_Set_Char_Size and
FT_Set_Pixel_Sizes (they now implement default to ligthen the
font driver's code).
=============================================================================
OLD MESSAGE
This file summarizes the changes that occured since the last "beta" of FreeType 2.
Because the list is important, it has been divided into separate sections:
Table Of Contents:
I High-Level Interface (easier !)
II Directory Structure
III Glyph Image Formats
IV Build System
V Portability
VI Font Drivers
-----------------------------------------------------------------------------------------
High-Level Interface :
The high-level API has been considerably simplified. Here is how :
- resource objects have disappeared. this means that face objects can
now be created with a single function call (see FT_New_Face and
FT_Open_Face)
- when calling either FT_New_Face & FT_Open_Face, a size object and a
glyph slot object are automatically created for the face, and can be
accessed through "face->glyph" and "face->size" if one really needs to.
In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
- similarly, FT_Load_Glyph now only takes a "face" argument (instead of
a glyph slot and a size). Also, it's "result" parameter is gone, as
the glyph image type is returned in the field "face->glyph.format"
- the list of available charmaps is directly accessible through
"face->charmaps", counting "face->num_charmaps" elements. Each
charmap has an 'encoding' field which specifies which known encoding
it deals with. Valid values are, for example :
ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
ft_encoding_apple_roman
ft_encoding_sjis
ft_encoding_adobe_standard
ft_encoding_adobe_expert
other values may be added in the future. Each charmap still holds its
"platform_id" and "encoding_id" values in case the encoding is too
exotic for the current library
-----------------------------------------------------------------------------------------
Directory Structure:
Should seem obvious to most of you:
freetype/
config/ -- configuration sub-makefiles
ansi/
unix/ -- platform-specific configuration files
win32/
os2/
msdos/
include/ -- public header files, those to be included directly
by client apps
src/ -- sources of the library
base/ -- the base layer
sfnt/ -- the sfnt "driver" (see the drivers section below)
truetype/ -- the truetype driver
type1/ -- the type1 driver
shared/ -- some header files shared between drivers
demos/ -- demos/tools
docs/ -- documentation (a bit empty for now)
-----------------------------------------------------------------------------------------
Glyph Image Formats :
Drivers are now able to register new glyph image formats within the library.
For now, the base layer supports of course bitmaps and vector outlines, but
one could imagine something different like colored bitmaps, bi-color
vectors or wathever else (Metafonts anyone ??).
See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is
gone, and is now replaced by FT_Bitmap, which should encompass all known
bitmap types.
Each new image format must provide at least one "raster", i.e. a module
capable of transforming the glyph image into a bitmap. It's also possible
to change the default raster used for a given glyph image format.
The default outline scan-converter now uses 128 levels of grays by default,
which tends to smooth many things. Note that the demo programs have been
updated significantly in order to display these..
-----------------------------------------------------------------------------------------
Build system :
You still need GNU Make to build the library. The build system has been
very seriously re-vamped in order to provide things like :
- automatic host platform detection (reverting to 'config/ansi'
if it is not detected, with pseudo-standard compilation flags)
- the ability to compile from the Makefiles with very different and
exotic compilers. Note that linking the library can be difficult for
some platforms.
For example, the file `config/win32/lcclib.bat' is invoked by the
build system to create the ".lib" file with LCC-Win32 because its
librarian has too many flaws to be invoked directly from the Makefile.
Here's how it works :
- the first time you type `make', the build system runs a series of
sub-makefiles in order to detect your host platform. It then dumps
what it found, and creates a file called `config.mk' in the current
directory. This is a sub-Makefile used to define many important Make
variables used to build the library.
- the second time, the build system detects the `config.mk' then use it
to build the library. All object files go into 'obj' by default, as
well as the library file, but this can easily be changed.
Note that you can run "make setup" to force another host platform detection
even if a `config.mk' is present in the current directory. Another solution
is simply to delete the file, then re-run make.
Finally, the default compiler for all platforms is gcc (for now, this will
hopefully changed in the future). You can however specify a different
compiler by specifying it after the 'setup' target as in :
gnumake setup lcc on Win32 to use the LCC compiler
gnumake setup visualc on Win32 to use Visual C++
See the file `config/<system>/detect.mk' for a list of supported compilers
for your platforms.
It should be relatively easy to write new detection rules files and
config.mk..
Finally, to build the demo programs, go to `demos' and launch GNU Make,
it will use the `config.mk' in the top directory to build the test
programs..
-----------------------------------------------------------------------------------------
Portability :
In the previous beta, a single FT_System object was used to encompass
all low-level operations like thread synchronisation, memory management
and i/o access. This has been greatly simplified :
- thread synchronisation has been dropped, for the simple reason that
the library is already re-entrant, and that if you really need two
threads accessing the same FT_Library, you should really synchronize
access to it yourself with a simple mutex.
- memory management is performed through a very simple object called
"FT_Memory", which really is a table containing a table of pointers
to functions like malloc, realloc and free as well as some user data
(closure).
- resources have disappeared (they created more problems than they
solved), and i/o management have been simplified greatly as a
result. Streams are defined through FT_Stream objects, which can
be either memory-based or disk-based.
Note that each face has its own stream, which is closed only when
the face object is destroyed. Hence, a function like TT_Flush_Face
in 1.x cannot be directly supported. However, if you really need
something like this, you can easily tailor your own streams to achieve
the same feature at a lower level (and use FT_Open_Face instead of
FT_New_Face to create the face).
See the file "include/ftsystem.h" for more details, as well as the
implementations found in "config/unix" and "config/ansi".
-----------------------------------------------------------------------------------------
Font Drivers :
The Font Driver interface has been modified in order to support
extensions & versioning.
The list of the font drivers that are statically linked to the
library at compile time is managed through a new configuration file
called `config/<platform>/ftmodule.h'.
This file is autogenerated when invoking `make modules'. This target
will parse all sub-directories of 'src', looking for a "module.mk"
rules file, used to describe the driver to the build system.
Hence, one should call `make modules' each time a font driver is added
or removed from the `src' directory.
Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
driver doesn't support font files directly, but provides services used
by all TrueType-like font drivers. Hence, its code is shared between
the TrueType & OpenType font formats, and possibly more formats to
come if we're lucky..
-----------------------------------------------------------------------------------------
Extensions support :
The extensions support is inspired by the one found in 1.x.
Now, each font driver has its own "extension registry", which lists
which extensions are available for the font faces managed by the driver.
Extension ids are now strings, rather than 4-byte tags, as this is
usually more readable..
Each extension has:
- some data, associated to each face object
- an interface (table of function pointers)
An extension that is format-specific should simply register itself
to the correct font driver. Here is some example code:
// Registering an extensions
//
FT_Error FT_Init_XXXX_Extension( FT_Library library )
{
FT_DriverInterface* tt_driver;
driver = FT_Get_Driver( library, "truetype" );
if (!driver) return FT_Err_Unimplemented_Feature;
return FT_Register_Extension( driver, &extension_class );
}
// Implementing the extensions
//
FT_Error FT_Proceed_Extension_XXX( FT_Face face )
{
FT_XXX_Extension ext;
FT_XXX_Extension_Interface ext_interface;
ext = FT_Get_Extension( face, "extensionid", &ext_interface );
if (!ext) return error;
return ext_interface->do_it(ext);
}

7329
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
We do not provide INSTALLATION instructions for now, as FreeType 2 is
still in beta.
Note however that you'll find instructions on how to compile the library
in the "BUILD" document in the "docs" directory..

155
Jamfile Normal file
View File

@ -0,0 +1,155 @@
# FreeType 2 top Jamfile (c) 2001, 2002, 2003 David Turner
#
# The HDRMACRO is already defined in FTJam and is used to add
# the content of certain macros to the list of included header
# files.
#
# We can compile FreeType 2 with classic Jam however thanks to
# the following code
#
if ! $(JAM_TOOLSET)
{
rule HDRMACRO
{
# nothing
}
}
# We need to invoke a SubDir rule if the FT2 source directory top is not the
# current directory. This allows us to build FreeType 2 as part of a larger
# project easily.
#
if $(FT2_TOP) != $(DOT)
{
SubDir FT2_TOP ;
}
# The following macros define the include directory, the source directory,
# and the final library name (without library extensions). They can be
# replaced by other definitions when the library is compiled as part of
# a larger project.
#
# Name of FreeType include directory during compilation.
# This is relative to FT2_TOP.
#
FT2_INCLUDE_DIR ?= include ;
# Name of FreeType source directory during compilation.
# This is relative to FT2_TOP.
#
FT2_SRC_DIR ?= src ;
# Name of final library, without extension.
#
FT2_LIB ?= $(LIBPREFIX)freetype ;
# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
# the location of a custom <ft2build.h> which will point to custom
# versions of "ftmodule.h" and "ftoption.h", for example.
#
FT2_BUILD_INCLUDE ?= ;
# The list of modules to compile on any given build of the library.
# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
#
# IMPORTANT: You'll need to change the content of "ftmodule.h" as well
# if you modify this list or provide your own.
#
FT2_COMPONENTS ?= gzip # support for gzip-compressed files
autohint # auto-hinter
base # base component (public APIs)
bdf # BDF font driver
cache # cache sub-system
cff # CFF/CEF font driver
cid # PostScript CID-keyed font driver
pcf # PCF font driver
pfr # PFR/TrueDoc font driver
psaux # common PostScript routines module
pshinter # PostScript hinter module
psnames # PostScript names handling
raster # monochrome rasterizer
smooth # anti-aliased rasterizer
sfnt # SFNT-based format support routines
truetype # TrueType font driver
type1 # PostScript Type 1 font driver
type42 # PostScript Type 42 (embedded TrueType) driver
winfonts # Windows FON/FNT font driver
;
# Don't touch.
#
FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
[ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
# Location of API Reference Documentation
#
if $(DOC_DIR)
{
DOC_DIR = $(DOCDIR:T) ;
}
else
{
DOC_DIR = docs/reference ;
}
# Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
CCFLAGS += -DDEBUG_HINTER ;
}
# We need "freetype2/include" in the current include path in order to
# compile any part of FreeType 2.
#
HDRS += $(FT2_INCLUDE) ;
# Uncomment the following line if you want to build individual source files
# for each FreeType 2 module. This is only useful during development, and
# is better defined as an environment variable anyway!
#
# FT2_MULTI = true ;
# The file <freetype/config/ftheader.h> is used to define macros that are
# later used in #include statements. It needs to be parsed in order to
# record these definitions.
#
HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
# Now include the Jamfile in "freetype2/src", used to drive the compilation
# of each FreeType 2 component and/or module.
#
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
# Test files (hinter debugging). Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
SubInclude FT2_TOP tests ;
}
actions RefDoc
{
python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.1.5 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h $(FT2_INCLUDE)/freetype/cache/*.h
}
RefDoc refdoc ;
# end of top Jamfile

135
Jamfile.in Normal file
View File

@ -0,0 +1,135 @@
# FreeType 2 top Jamfile (c) 2001, 2002, 2003 David Turner
#
# The HDRMACRO is already defined in FTJam and is used to add
# the content of certain macros to the list of included header
# files.
#
# We can compile FreeType 2 with classic Jam however thanks to
# the following code
#
if ! $(JAM_TOOLSET)
{
rule HDRMACRO
{
# nothing
}
}
# We need to invoke a SubDir rule if the FT2 source directory top is not the
# current directory. This allows us to build FreeType 2 as part of a larger
# project easily.
#
if $(FT2_TOP) != $(DOT)
{
SubDir FT2_TOP ;
}
# The following macros define the include directory, the source directory,
# and the final library name (without library extensions). They can be
# replaced by other definitions when the library is compiled as part of
# a larger project.
#
# Name of FreeType include directory during compilation.
# This is relative to FT2_TOP.
#
FT2_INCLUDE_DIR ?= include ;
# Name of FreeType source directory during compilation.
# This is relative to FT2_TOP.
#
FT2_SRC_DIR ?= src ;
# Name of final library, without extension.
#
FT2_LIB ?= $(LIBPREFIX)freetype ;
# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
# the location of a custom <ft2build.h> which will point to custom
# versions of "ftmodule.h" and "ftoption.h", for example.
#
FT2_BUILD_INCLUDE ?= ;
# The list of modules to compile on any given build of the library.
# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
#
# IMPORTANT: You'll need to change the content of "ftmodule.h" as well
# if you modify this list or provide your own.
#
FT2_COMPONENTS ?= gzip # support for gzip-compressed files
autohint # auto-hinter
base # base component (public APIs)
bdf # BDF font driver
cache # cache sub-system
cff # CFF/CEF font driver
cid # PostScript CID-keyed font driver
pcf # PCF font driver
pfr # PFR/TrueDoc font driver
psaux # common PostScript routines module
pshinter # PostScript hinter module
psnames # PostScript names handling
raster # monochrome rasterizer
smooth # anti-aliased rasterizer
sfnt # SFNT-based format support routines
truetype # TrueType font driver
type1 # PostScript Type 1 font driver
type42 # PostScript Type 42 (embedded TrueType) driver
winfonts # Windows FON/FNT font driver
;
# Don't touch.
#
FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
[ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
# Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
CCFLAGS += -DDEBUG_HINTER ;
}
# We need "freetype2/include" in the current include path in order to
# compile any part of FreeType 2.
#
HDRS += $(FT2_INCLUDE) ;
# Uncomment the following line if you want to build individual source files
# for each FreeType 2 module. This is only useful during development, and
# is better defined as an environment variable anyway!
#
# FT2_MULTI = true ;
# The file <freetype/config/ftheader.h> is used to define macros that are
# later used in #include statements. It needs to be parsed in order to
# record these definitions.
#
HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
# Now include the Jamfile in "freetype2/src", used to drive the compilation
# of each FreeType 2 component and/or module.
#
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
# Test files (hinter debugging). Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
SubInclude FT2_TOP tests ;
}
# end of top Jamfile

61
Jamrules Normal file
View File

@ -0,0 +1,61 @@
# FreeType 2 JamRules (c) 2001, 2002, 2003 David Turner
#
# This file contains the Jam rules needed to build the FreeType 2 library.
# It is shared by all Jamfiles and is included only once in the build
# process.
#
# Call SubDirHdrs on a list of directories.
#
rule AddSubDirHdrs
{
local x ;
for x in $(<)
{
SubDirHdrs $(x) ;
}
}
# Determine prefix of library file. We must use "libxxxxx" on Unix systems,
# while all other simply use the real name.
#
if $(UNIX)
{
LIBPREFIX ?= lib ;
}
else
{
LIBPREFIX ?= "" ;
}
# FT2_TOP contains the location of the FreeType source directory. You can
# set it to a specific value if you want to compile the library as part of a
# larger project.
#
FT2_TOP ?= $(DOT) ;
# Define a new rule used to declare a sub directory of the Nirvana source
# tree.
#
rule FT2_SubDir
{
if $(FT2_TOP) = $(DOT)
{
return [ FDirName $(<) ] ;
}
else
{
return [ FDirName $(FT2_TOP) $(<) ] ;
}
}
# We also set ALL_LOCATE_TARGET in order to place all object and library
# files in "objs".
#
ALL_LOCATE_TARGET ?= [ FT2_SubDir objs ] ;
# end of Jamrules

View File

@ -8,96 +8,25 @@
#
# 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
# 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.
# This file is designed for GNU Make, do not use it with another Make tool!
# Project names
#
# It works as follows:
#
# - When invoked for the first time, this Makefile will include the rules
# found in `freetype/config/detect.mk'. They are in charge of detecting
# the current platform.
#
# A summary of the detection will be displayed, and the file `config.mk'
# will be created in the current directory.
#
# - When invoked later, this Makefile will include the rules found in
# `config.mk'. This sub-Makefile will define some system-specific
# variables (like compiler, compilation flags, object suffix, etc.), then
# include the rules found in `freetype/config/freetype.mk', used to build
# the library.
#
# See the comments in `config/detect.mk' and `config/freetype.mk' for more
# details on host platform detection and library builds.
PROJECT := freetype
PROJECT_TITLE := FreeType
USE_MODULES := 1
.PHONY: setup
# The variable TOP holds the path to the topmost directory in the FreeType
# The variable TOP_DIR holds the path to the topmost directory in the project
# engine source hierarchy. If it is not defined, default it to `.'.
#
ifndef TOP
TOP := .
ifndef TOP_DIR
TOP_DIR := .
endif
CONFIG_MK := config.mk
# If no configuration sub-makefile is present, or if `setup' is the target
# to be built, run the auto-detection rules to figure out which
# configuration rules file to use.
#
# Note that the configuration file is put in the current directory, which is
# not necessarily $(TOP).
# If `config.mk' is not present, set `check_platform'.
#
ifeq ($(wildcard $(CONFIG_MK)),)
check_platform := 1
endif
# If `setup' is one of the targets requested, set `check_platform'.
#
ifneq ($(findstring setup,$(MAKECMDGOALS)),)
check_platform := 1
endif
# Include the automatic host platform detection rules when we need to
# check the platform.
#
ifdef check_platform
all: setup
# If the module list $(FT_MODULE_LIST) file is not present, generate it.
#
modules: make_module_list setup
include $(TOP)/builds/detect.mk
include $(TOP)/builds/modules.mk
ifeq ($(wildcard $(FT_MODULE_LIST)),)
setup: make_module_list
endif
# IMPORTANT:
#
# `setup' must be defined by the host platform detection rules to create
# the `config.mk' file in the current directory.
else
# A configuration sub-Makefile is present -- simply run it.
#
all: single
modules: make_module_list
BUILD_FREETYPE := yes
include $(CONFIG_MK)
endif # test check_platform
include $(TOP_DIR)/builds/toplevel.mk
# EOF

39
README Normal file
View File

@ -0,0 +1,39 @@
Special notes to Unix users
===========================
Please read the file "docs/UPGRADE.UNX". It contains important
information regarding the installation of FreeType on Unix systems,
especially GNU based operating systems like GNU/Linux.
FreeType 2's library is called `libfreetype', FreeType 1's library
is called `libttf'. They are *not* compatible!
FreeType 2.1.5
==============
Please read the docs/CHANGES file, it contains IMPORTANT INFORMATION.
Read the files "docs/INSTALL" for installation instructions.
Note that the FreeType 2 documentation is now available as a
separate package from our sites. See:
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.5.tar.bz2
ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.5.tar.gz
ftp://ftp.freetype.org/pub/freetype2/ftdoc215.zip
Bugs
====
Please report bugs by e-mail to `devel@freetype.org'. Don't forget
to send a detailed explanation of the problem -- there is nothing
worse than receiving a terse message that only says "it doesn't
work".
Enjoy!
The FreeType Team

90
builds/amiga/README Normal file
View File

@ -0,0 +1,90 @@
The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted
on 68k-Amiga producing MorphOS-PPC-binaries from
http://www.morphos.de). To use it, type "make assign", then "make";
it produces a link library libft2_ppc.a.
The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
latest sold version was 6.50, updates can be found in Aminet). It is
based on the version found in the sourcecode of ttf.library 0.83b for
FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
http://ragriffi.home.sprynet.com).
You will also need the latest include files and amiga.lib from the
Amiga web site (http://www.amiga.com/3.9/download/NDK3.9.lha) for
AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
To use it, call "smake assign" and then "smake" from the builds/amiga
directory. The results are:
- A link library "ft2_680x0.lib" (where x depends on the setting of
the CPU entry in the smakefile) containing all FreeType2 parts
except of the init code, debugging code, and the system interface
code.
- ftsystem.o, an object module containing the standard version of the
system interface code which uses fopen() fclose() fread() fseek()
ftell() malloc() realloc() and free() from lib:sc.lib (not pure).
- ftsystempure.o, an object module containing the pure version of the
system interface code which uses Open() Close() Read() Seek()
ExamineFH() AsmAllocPooled() AsmFreePooled() etc. This version can
be used in both normal programs and in Amiga run-time shared system
librarys (can be linked with lib:libinit.o, no copying of DATA and
BSS hunks for each OpenLibrary() necessary). Source code is in
src/base/ftsystem.c.
- ftdebug.o, an object module containing the standard version of the
debugging code which uses vprintf() and exit() (not pure).
Debugging can be turned on in FT:include/freetype/config/ftoption.h
and with FT_SetTraceLevel().
- ftdebugpure.o, an object module containing the pure version of the
debugging code which uses KVPrintf() from lib:debug.lib and no
exit(). For debugging of Amiga run-time shared system libraries.
Source code is in src/base/ftdebug.c.
- NO ftinit.o. Since linking with a link library should result in
linking only the needed object modules in it, but standard
ftsystem.o would force ALL FreeType2 modules to be linked to your
program, I decided to use a different scheme: You must #include
FT:src/base/ftinit.c in your sourcecode and specify with #define
statements which modules you need. See
include/freetype/config/ftmodule.h.
To use in your own programs:
- Insert the #define and #include statements from top of
include/freetype/config/ftmodule.h in your source code and uncomment
the #define statements for the FreeType2 modules you need.
- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
calling the FreeType2 functions, since the link library and the
object files are compiled with PARAMETERS=BOTH.
- "smake assign" (assign "FT:" to the FreeType2 main directory).
- Compile your program.
- Link with either ftsystem.o or ftsystempure.o, if debugging enabled
with either ftdebug.o or (ftdebugpure.o and lib:debug.lib), and with
ft2_680x0.lib as link library.
To adapt to other compilers:
- The standard ANSI C maximum length of 31 significant characters in
identifiers is not enough for FreeType2. Check if your compiler has
a minimum length of 40 significant characters or can be switched to
it. "idlen=40" is the option for SAS/C. Setting #define
HAVE_LIMIT_ON_IDENTS in an include file may also work (not tested).
- Make sure that the include directory in builds/amiga is searched
before the normal FreeType2 include directory, so you are able to
replace problematic include files with your own version (same may be
useful for the src directory).
- An example of how to replace/workaround a problematic include file
is include/config/ftconfig.h; it changes a #define that would
prevent SAS/C from generating XDEF's where it should do that and
then includes the standard FreeType2 include file.

View File

@ -0,0 +1,20 @@
// TetiSoft: We must change FT_BASE_DEF and FT_EXPORT_DEF
//#define FT_BASE_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
//#define FT_EXPORT_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
#undef FT_BASE_DEF
#define FT_BASE_DEF( x ) x
#undef FT_EXPORT_DEF
#define FT_EXPORT_DEF( x ) x
// TetiSoft: now include original file
#ifndef __MORPHOS__
#include "FT:include/freetype/config/ftconfig.h"
#else
// We must define that, it seems that
// lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
// ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
// binaries from http://www.morphos.de)
#define _LIBC_LIMITS_H_
#include "/FT/include/freetype/config/ftconfig.h"
#endif

View File

@ -0,0 +1,123 @@
// TetiSoft: To specify which modules you need,
// insert the following in your source file and uncomment as needed:
/*
//#define FT_USE_AUTOHINT // autohinter
//#define FT_USE_RASTER // monochrome rasterizer
//#define FT_USE_SMOOTH // anti-aliasing rasterizer
//#define FT_USE_TT // truetype font driver
//#define FT_USE_T1 // type1 font driver
//#define FT_USE_T42 // type42 font driver
//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support
//#define FT_USE_CFF // opentype font driver
//#define FT_USE_BDF // bdf bitmap font driver
//#define FT_USE_PCF // pcf bitmap font driver
//#define FT_USE_PFR // pfr font driver
//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#include "FT:src/base/ftinit.c"
*/
// TetiSoft: make sure that needed support modules are built in.
// Dependencies can be found by searching for FT_Get_Module.
#ifdef FT_USE_T42
#define FT_USE_TT
#endif
#ifdef FT_USE_TT
#define FT_USE_SFNT
#endif
#ifdef FT_USE_CFF
#define FT_USE_SFNT
#define FT_USE_PSHINT
#define FT_USE_PSNAMES
#endif
#ifdef FT_USE_T1
#define FT_USE_PSAUX
#define FT_USE_PSHINT
#define FT_USE_PSNAMES
#endif
#ifdef FT_USE_T1CID
#define FT_USE_PSAUX
#define FT_USE_PSHINT
#define FT_USE_PSNAMES
#endif
#ifdef FT_USE_PSAUX
#define FT_USE_PSNAMES
#endif
#ifdef FT_USE_SFNT
#define FT_USE_PSNAMES
#endif
// TetiSoft: Now include the modules
#ifdef FT_USE_AUTOHINT
FT_USE_MODULE(autohint_module_class)
#endif
#ifdef FT_USE_PSHINT
FT_USE_MODULE(pshinter_module_class)
#endif
#ifdef FT_USE_CFF
FT_USE_MODULE(cff_driver_class)
#endif
#ifdef FT_USE_T1CID
FT_USE_MODULE(t1cid_driver_class)
#endif
#ifdef FT_USE_BDF
FT_USE_MODULE(bdf_driver_class)
#endif
#ifdef FT_USE_PCF
FT_USE_MODULE(pcf_driver_class)
#endif
#ifdef FT_USE_PFR
FT_USE_MODULE(pfr_driver_class)
#endif
#ifdef FT_USE_PSAUX
FT_USE_MODULE(psaux_module_class)
#endif
#ifdef FT_USE_PSNAMES
FT_USE_MODULE(psnames_module_class)
#endif
#ifdef FT_USE_RASTER
FT_USE_MODULE(ft_raster1_renderer_class)
#endif
#ifdef FT_USE_SFNT
FT_USE_MODULE(sfnt_module_class)
#endif
#ifdef FT_USE_SMOOTH
FT_USE_MODULE(ft_smooth_renderer_class)
FT_USE_MODULE(ft_smooth_lcd_renderer_class)
FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
#endif
#ifdef FT_USE_TT
FT_USE_MODULE(tt_driver_class)
#endif
#ifdef FT_USE_T1
FT_USE_MODULE(t1_driver_class)
#endif
#ifdef FT_USE_T42
FT_USE_MODULE(t42_driver_class)
#endif
#ifdef FT_USE_WINFNT
FT_USE_MODULE(winfnt_driver_class)
#endif

207
builds/amiga/makefile Normal file
View File

@ -0,0 +1,207 @@
#
# Makefile for FreeType2 link library using ppc-morphos-gcc-2.95.3-bin.tgz
# (gcc 2.95.3 hosted on 68k-Amiga producing MorphOS-PPC-binaries from
# http://www.morphos.de)
#
# to build from the builds/amiga directory call
#
# make assign
# make
#
# Your programs source code should start with this
# (uncomment the parts you do not need to keep the program small):
# ---8<---
#define FT_USE_AUTOHINT // autohinter
#define FT_USE_RASTER // monochrome rasterizer
#define FT_USE_SMOOTH // anti-aliasing rasterizer
#define FT_USE_TT // truetype font driver
#define FT_USE_T1 // type1 font driver
#define FT_USE_T42 // type42 font driver
#define FT_USE_T1CID // cid-keyed type1 font driver
#define FT_USE_CFF // opentype font driver
#define FT_USE_BDF // bdf bitmap font driver
#define FT_USE_PCF // pcf bitmap font driver
#define FT_USE_PFR // pfr font driver
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#include "FT:src/base/ftinit.c"
# ---8<---
#
# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
assign:
assign FT: //
FTSRC = /FT/src
CC = ppc-morphos-gcc
AR = ppc-morphos-ar rc
RANLIB = ppc-morphos-ranlib
LD = ppc-morphos-ld
CFLAGS = -O2 -I/emu/emulinclude/includegcc -I/emu/include -Iinclude -I$(FTSRC) -I/FT/include
#
# FreeType2 library base
#
ftbase.ppc.o: $(FTSRC)/base/ftbase.c
$(CC) -c $(CFLAGS) -o $@ $<
ftinit.ppc.o: $(FTSRC)/base/ftinit.c
$(CC) -c $(CFLAGS) -o $@ $<
ftsystem.ppc.o: $(FTSRC)/base/ftsystem.c
$(CC) -c $(CFLAGS) -o $@ $<
# pure version for use in run-time library etc
ftsystempure.ppc.o: src/base/ftsystem.c
$(CC) -c $(CFLAGS) -o $@ $<
ftdebug.ppc.o: $(FTSRC)/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ $<
# pure version for use in run-time library etc
ftdebugpure.ppc.o: src/base/ftdebug.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library base extensions
#
ftglyph.ppc.o: $(FTSRC)/base/ftglyph.c
$(CC) -c $(CFLAGS) -o $@ $<
ftbbox.ppc.o: $(FTSRC)/base/ftbbox.c
$(CC) -c $(CFLAGS) -o $@ $<
ftmm.ppc.o: $(FTSRC)/base/ftmm.c
$(CC) -c $(CFLAGS) -o $@ $<
ftsynth.ppc.o: $(FTSRC)/base/ftsynth.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library autohinting module
#
autohint.ppc.o: $(FTSRC)/autohint/autohint.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library autohinting module extensions
#
ahoptim.ppc.o: $(FTSRC)/autohint/ahoptim.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library postscript hinting module
#
pshinter.ppc.o: $(FTSRC)/pshinter/pshinter.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PS support module
#
psaux.ppc.o: $(FTSRC)/psaux/psaux.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PS glyph names module
#
psnames.ppc.o: $(FTSRC)/psnames/psnames.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library monochrome raster module
#
raster.ppc.o: $(FTSRC)/raster/raster.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library anti-aliasing raster module
#
smooth.ppc.o: $(FTSRC)/smooth/smooth.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library 'sfnt' module
#
sfnt.ppc.o: $(FTSRC)/sfnt/sfnt.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library glyph and image caching system (still experimental)
#
ftcache.ppc.o: $(FTSRC)/cache/ftcache.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library OpenType font driver
#
cff.ppc.o: $(FTSRC)/cff/cff.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library TrueType font driver
#
truetype.ppc.o: $(FTSRC)/truetype/truetype.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library Type1 font driver
#
type1.ppc.o: $(FTSRC)/type1/type1.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library Type42 font driver
#
type42.ppc.o: $(FTSRC)/type42/type42.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library CID-keyed Type1 font driver
#
type1cid.ppc.o: $(FTSRC)/cid/type1cid.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library BDF bitmap font driver
#
bdf.ppc.o: $(FTSRC)/bdf/bdf.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PCF bitmap font driver
#
pcf.ppc.o: $(FTSRC)/pcf/pcf.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library PFR font driver
#
pfr.ppc.o: $(FTSRC)/pfr/pfr.c
$(CC) -c $(CFLAGS) -o $@ $<
#
# FreeType2 library Windows FNT/FON bitmap font driver
#
winfnt.ppc.o: $(FTSRC)/winfonts/winfnt.c
$(CC) -c $(CFLAGS) -o $@ $<
BASEPPC = ftbase.ppc.o ftglyph.ppc.o ftbbox.ppc.o ftmm.ppc.o ftsynth.ppc.o
DEBUGPPC = ftdebug.ppc.o ftdebugpure.ppc.o
AHINTPPC = autohint.ppc.o ahoptim.ppc.o
PSPPC = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
RASTERPPC = raster.ppc.o smooth.ppc.o
FONTDPPC = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
libft2_ppc.a: $(BASEPPC) $(AHINTPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC)
$(AR) $@ $(BASEPPC) $(AHINTPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1

236
builds/amiga/smakefile Normal file
View File

@ -0,0 +1,236 @@
#
# Makefile for FreeType2 link library using Amiga SAS/C 6.58
#
# to build from the builds/amiga directory call
#
# smake assign
# smake
#
# Your programs source code should start with this
# (uncomment the parts you do not need to keep the program small):
# ---8<---
#define FT_USE_AUTOHINT // autohinter
#define FT_USE_RASTER // monochrome rasterizer
#define FT_USE_SMOOTH // anti-aliasing rasterizer
#define FT_USE_TT // truetype font driver
#define FT_USE_T1 // type1 font driver
#define FT_USE_T42 // type42 font driver
#define FT_USE_T1CID // cid-keyed type1 font driver
#define FT_USE_CFF // opentype font driver
#define FT_USE_BDF // bdf bitmap font driver
#define FT_USE_PCF // pcf bitmap font driver
#define FT_USE_PFR // pfr font driver
#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#include "FT:src/base/ftinit.c"
# ---8<---
#
# link your programs with ft2_680x0.lib and either ftsystem.o or ftsystempure.o
# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
OBJBASE = ftbase.o ftglyph.o ftbbox.o ftmm.o ftsynth.o
OBJSYSTEM = ftsystem.o ftsystempure.o
OBJDEBUG = ftdebug.o ftdebugpure.o
OBJAHINT = autohint.o ahoptim.o
OBJPSHINT = pshinter.o
OBJPSAUX = psaux.o
OBJPSNAM = psnames.o
OBJRAST = raster.o
OBJSMOOTH = smooth.o
OBJSFNT = sfnt.o
OBJCACHE = ftcache.o
OBJPS = $(OBJPSAUX) $(OBJPSNAM) $(OBJPSHINT)
OBJRASTER = $(OBJRAST) $(OBJSMOOTH)
OBJFONTD = cff.o type1.o type42.o type1cid.o\
truetype.o winfnt.o bdf.o pcf.o pfr.o
CORE = FT:src/
CPU = 68000
#CPU = 68020
#CPU = 68030
#CPU = 68040
#CPU = 68060
OPTIMIZER = optinlocal
SCFLAGS = optimize opttime optsched strmerge strsect=near idlen=40 cpu=$(CPU)\
idir=include/ idir=$(CORE) idir=FT:include/ nostackcheck nochkabort\
noicons ignore=79,85,110,306 parameters=both
LIB = ft2_$(CPU).lib
# sample linker options
OPTS = link lib=$(LIB),lib:sc.lib,lib:amiga.lib,lib:debug.lib\
smallcode smalldata noicons utillib
# sample program entry
#myprog: myprog.c ftsystem.o $(LIB)
# sc $< programname=$@ ftsystem.o $(SCFLAGS) $(OPTS)
all: $(LIB) $(OBJSYSTEM) $(OBJDEBUG)
assign:
assign FT: //
# uses separate object modules in lib to make for easier debugging
# also, can make smaller programs if entire engine is not used
ft2_$(CPU).lib: $(OBJBASE) $(OBJAHINT) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD)
oml $@ r $(OBJBASE) $(OBJAHINT) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD)
clean:
-delete \#?.o
realclean: clean
-delete ft2$(CPU).lib
#
# freetype library base
#
ftbase.o: $(CORE)base/ftbase.c
sc $(SCFLAGS) objname=$@ $<
ftinit.o: $(CORE)base/ftinit.c
sc $(SCFLAGS) objname=$@ $<
ftsystem.o: $(CORE)base/ftsystem.c
sc $(SCFLAGS) objname=$@ $<
ftsystempure.o: src/base/ftsystem.c ## pure version for use in run-time library etc
sc $(SCFLAGS) objname=$@ $<
ftdebug.o: $(CORE)base/ftdebug.c
sc $(SCFLAGS) objname=$@ $<
ftdebugpure.o: src/base/ftdebug.c ## pure version for use in run-time library etc
sc $(SCFLAGS) objname=$@ $<
#
# freetype library base extensions
#
ftglyph.o: $(CORE)base/ftglyph.c
sc $(SCFLAGS) objname=$@ $<
ftbbox.o: $(CORE)base/ftbbox.c
sc $(SCFLAGS) objname=$@ $<
ftmm.o: $(CORE)base/ftmm.c
sc $(SCFLAGS) objname=$@ $<
ftsynth.o: $(CORE)base/ftsynth.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library autohinting module
#
autohint.o: $(CORE)autohint/autohint.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library autohinting module extensions
#
ahoptim.o: $(CORE)autohint/ahoptim.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library PS hinting module
#
pshinter.o: $(CORE)pshinter/pshinter.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library PS support module
#
psaux.o: $(CORE)psaux/psaux.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library PS glyph names module
#
psnames.o: $(CORE)psnames/psnames.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library monochrome raster module
#
raster.o: $(CORE)raster/raster.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library anti-aliasing raster module
#
smooth.o: $(CORE)smooth/smooth.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library 'sfnt' module
#
sfnt.o: $(CORE)sfnt/sfnt.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library glyph and image caching system (still experimental)
#
ftcache.o: $(CORE)cache/ftcache.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library OpenType font driver
#
cff.o: $(CORE)cff/cff.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library TrueType font driver
#
truetype.o: $(CORE)truetype/truetype.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library Type1 font driver
#
type1.o: $(CORE)type1/type1.c
sc $(SCFLAGS) objname=$@ $<
#
# FreeType2 library Type42 font driver
#
type42.o: $(CORE)type42/type42.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library CID-keyed Type1 font driver
#
type1cid.o: $(CORE)cid/type1cid.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library CID-keyed Type1 font driver extensions
#
#cidafm.o: $(CORE)cid/cidafm.c
# sc $(SCFLAGS) objname=$@ $<
#
# freetype library BDF bitmap font driver
#
bdf.o: $(CORE)bdf/bdf.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library PCF bitmap font driver
#
pcf.o: $(CORE)pcf/pcf.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library PFR font driver
#
pfr.o: $(CORE)pfr/pfr.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library Windows FNT/FON bitmap font driver
#
winfnt.o: $(CORE)winfonts/winfnt.c
sc $(SCFLAGS) objname=$@ $<

View File

@ -0,0 +1,185 @@
// TetiSoft: replaced vprintf() with KVPrintF() and commented out exit()
extern void __stdargs KVPrintF( const char *formatString, const void *values );
/***************************************************************************/
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component (body). */
/* */
/* Copyright 1996-2001 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. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This component contains various macros and functions used to ease the */
/* debugging of the FreeType engine. Its main purpose is in assertion */
/* checking, tracing, and error detection. */
/* */
/* There are now three debugging modes: */
/* */
/* - trace mode */
/* */
/* Error and trace messages are sent to the log file (which can be the */
/* standard error output). */
/* */
/* - error mode */
/* */
/* Only error messages are generated. */
/* */
/* - release mode: */
/* */
/* No error message is sent or generated. The code is free from any */
/* debugging parts. */
/* */
/*************************************************************************/
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#ifdef FT_DEBUG_LEVEL_TRACE
char ft_trace_levels[trace_max];
#endif
#if defined( FT_DEBUG_LEVEL_ERROR ) || defined( FT_DEBUG_LEVEL_TRACE )
#include <stdarg.h>
#include <stdlib.h>
FT_EXPORT_DEF( void )
FT_Message( const char* fmt, ... )
{
va_list ap;
va_start( ap, fmt );
// vprintf( fmt, ap );
KVPrintF( fmt, ap );
va_end( ap );
}
FT_EXPORT_DEF( void )
FT_Panic( const char* fmt, ... )
{
va_list ap;
va_start( ap, fmt );
// vprintf( fmt, ap );
KVPrintF( fmt, ap );
va_end( ap );
// exit( EXIT_FAILURE );
}
/* since I don't know wether "getenv" is available on the Amiga */
/* I prefer to simply disable this code for now in all builds */
/* */
/* #ifdef FT_DEBUG_LEVEL_TRACE */
#if 0
FT_BASE_DEF( void )
ft_debug_init( void )
{
const char* ft2_debug = getenv( "FT2_DEBUG" );
if ( ft2_debug )
{
const char* p = ft2_debug;
const char* q;
for ( ; *p; p++ )
{
/* skip leading whitespace and separators */
if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
continue;
/* read toggle name, followed by '=' */
q = p;
while ( *p && *p != ':' )
p++;
if ( *p == ':' && p > q )
{
int n, i, len = p - q;
int level = -1, found = -1;
for ( n = 0; n < trace_count; n++ )
{
const char* toggle = ft_trace_toggles[n];
for ( i = 0; i < len; i++ )
{
if ( toggle[i] != q[i] )
break;
}
if ( i == len && toggle[i] == 0 )
{
found = n;
break;
}
}
/* read level */
p++;
if ( *p )
{
level = *p++ - '0';
if ( level < 0 || level > 6 )
level = -1;
}
if ( found >= 0 && level >= 0 )
{
if ( found == trace_any )
{
/* special case for "any" */
for ( n = 0; n < trace_count; n++ )
ft_trace_levels[n] = level;
}
else
ft_trace_levels[found] = level;
}
}
}
}
}
#else /* !FT_DEBUG_LEVEL_TRACE */
FT_BASE_DEF( void )
ft_debug_init( void )
{
/* nothing */
}
#endif /* !FT_DEBUG_LEVEL_TRACE */
/* END */

View File

@ -0,0 +1,450 @@
/***************************************************************************/
/* */
/* ftsystem.c */
/* */
/* Amiga-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2001, 2002 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. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This file contains the Amiga interface used by FreeType to access */
/* low-level, i.e. memory management, i/o access as well as thread */
/* synchronisation. */
/* */
/*************************************************************************/
// Maintained by Detlef Würkner <TetiSoft@apg.lahn.de>
// TetiSoft: Modified to avoid fopen() fclose() fread() fseek() ftell()
// malloc() realloc() and free() which can't be used in an amiga
// shared run-time library linked with libinit.o
#include <exec/memory.h>
#ifdef __GNUC__
// Avoid warnings "struct X declared inside parameter list"
#include <exec/devices.h>
#include <exec/io.h>
#include <exec/semaphores.h>
#include <dos/exall.h>
#endif
// Necessary with OS3.9 includes
#define __USE_SYSBASE
#include <proto/exec.h>
#include <proto/dos.h>
#ifndef __GNUC__
/* TetiSoft: Missing in alib_protos.h, see amiga.lib autodoc
* (These amiga.lib functions work under AmigaOS V33 and up)
*/
extern APTR __asm
AsmCreatePool( register __d0 ULONG memFlags,
register __d1 ULONG puddleSize,
register __d2 ULONG threshSize,
register __a6 struct ExecBase* SysBase );
extern VOID __asm
AsmDeletePool( register __a0 APTR poolHeader,
register __a6 struct ExecBase* SysBase );
extern APTR __asm
AsmAllocPooled( register __a0 APTR poolHeader,
register __d0 ULONG memSize,
register __a6 struct ExecBase* SysBase );
extern VOID __asm
AsmFreePooled( register __a0 APTR poolHeader,
register __a1 APTR memory,
register __d0 ULONG memSize,
register __a6 struct ExecBase* SysBase);
#endif
// TetiSoft: C implementation of AllocVecPooled (see autodoc exec/AllocPooled)
APTR
AllocVecPooled( APTR poolHeader,
ULONG memSize )
{
ULONG newSize = memSize + sizeof ( ULONG );
#ifdef __GNUC__
ULONG *mem = AllocPooled( poolHeader, newSize );
#else
ULONG *mem = AsmAllocPooled( poolHeader, newSize, SysBase );
#endif
if ( !mem )
return NULL;
*mem = newSize;
return mem + 1;
}
// TetiSoft: C implementation of FreeVecPooled (see autodoc exec/AllocPooled)
void
FreeVecPooled( APTR poolHeader,
APTR memory )
{
ULONG *realmem = (ULONG *)memory - 1;
#ifdef __GNUC__
FreePooled( poolHeader, realmem, *realmem );
#else
AsmFreePooled( poolHeader, realmem, *realmem, SysBase );
#endif
}
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*************************************************************************/
/* */
/* MEMORY MANAGEMENT INTERFACE */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* It is not necessary to do any error checking for the */
/* allocation-related functions. This will be done by the higher level */
/* routines like FT_Alloc() or FT_Realloc(). */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Function> */
/* ft_alloc */
/* */
/* <Description> */
/* The memory allocation function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* size :: The requested size in bytes. */
/* */
/* <Return> */
/* The address of newly allocated block. */
/* */
FT_CALLBACK_DEF( void* )
ft_alloc( FT_Memory memory,
long size )
{
// FT_UNUSED( memory );
// return malloc( size );
return AllocVecPooled( memory->user, size );
}
/*************************************************************************/
/* */
/* <Function> */
/* ft_realloc */
/* */
/* <Description> */
/* The memory reallocation function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* cur_size :: The current size of the allocated memory block. */
/* */
/* new_size :: The newly requested size in bytes. */
/* */
/* block :: The current address of the block in memory. */
/* */
/* <Return> */
/* The address of the reallocated memory block. */
/* */
FT_CALLBACK_DEF( void* )
ft_realloc( FT_Memory memory,
long cur_size,
long new_size,
void* block )
{
// FT_UNUSED( memory );
// FT_UNUSED( cur_size );
// return realloc( block, new_size );
void* new_block;
new_block = AllocVecPooled ( memory->user, new_size );
if ( new_block != NULL )
{
CopyMem ( block, new_block,
( new_size > cur_size ) ? cur_size : new_size );
FreeVecPooled ( memory->user, block );
}
return new_block;
}
/*************************************************************************/
/* */
/* <Function> */
/* ft_free */
/* */
/* <Description> */
/* The memory release function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* block :: The address of block in memory to be freed. */
/* */
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
void* block )
{
// FT_UNUSED( memory );
// free( block );
FreeVecPooled( memory->user, block );
}
/*************************************************************************/
/* */
/* RESOURCE MANAGEMENT INTERFACE */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
/* messages during execution. */
/* */
#undef FT_COMPONENT
#define FT_COMPONENT trace_io
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
// #define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
#define STREAM_FILE( stream ) ( (BPTR)stream->descriptor.pointer ) // TetiSoft
/*************************************************************************/
/* */
/* <Function> */
/* ft_close_stream */
/* */
/* <Description> */
/* The function to close a stream. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
FT_CALLBACK_DEF( void )
ft_close_stream( FT_Stream stream )
{
// fclose( STREAM_FILE( stream ) );
Close( STREAM_FILE( stream ) ); // TetiSoft
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = 0;
}
/*************************************************************************/
/* */
/* <Function> */
/* ft_io_stream */
/* */
/* <Description> */
/* The function to open a stream. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
/* offset :: The position in the data stream to start reading. */
/* */
/* buffer :: The address of buffer to store the read data. */
/* */
/* count :: The number of bytes to read from the stream. */
/* */
/* <Return> */
/* The number of bytes actually read. */
/* */
FT_CALLBACK_DEF( unsigned long )
ft_io_stream( FT_Stream stream,
unsigned long offset,
unsigned char* buffer,
unsigned long count )
{
// FILE* file;
BPTR file; // TetiSoft
file = STREAM_FILE( stream );
// fseek( file, offset, SEEK_SET );
Seek( file, offset, OFFSET_BEGINNING ); // TetiSoft
// return (unsigned long)fread( buffer, 1, count, file );
return (unsigned long)FRead( file, buffer, 1, count);
}
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( FT_Error )
FT_Stream_Open( FT_Stream stream,
const char* filepathname )
{
// FILE* file;
BPTR file; // TetiSoft
struct FileInfoBlock* fib; // TetiSoft
if ( !stream )
return FT_Err_Invalid_Stream_Handle;
// file = fopen( filepathname, "rb" );
file = Open( filepathname, MODE_OLDFILE ); // TetiSoft
if ( !file )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
// fseek( file, 0, SEEK_END );
// astream->size = ftell( file );
// fseek( file, 0, SEEK_SET );
fib = AllocDosObject( DOS_FIB, NULL );
if ( !fib )
{
Close ( file );
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
if ( !( ExamineFH( file, fib ) ) )
{
FreeDosObject( DOS_FIB, fib );
Close ( file );
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
stream->size = fib->fib_Size;
FreeDosObject( DOS_FIB, fib );
// stream->descriptor.pointer = file;
stream->descriptor.pointer = (void *)file;
stream->pathname.pointer = (char*)filepathname;
stream->pos = 0;
stream->read = ft_io_stream;
stream->close = ft_close_stream;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;
}
#ifdef FT_DEBUG_MEMORY
extern FT_Int
ft_mem_debug_init( FT_Memory memory );
extern void
ft_mem_debug_done( FT_Memory memory );
#endif
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( FT_Memory )
FT_New_Memory( void )
{
FT_Memory memory;
// memory = (FT_Memory)malloc( sizeof ( *memory ) );
memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_PUBLIC );
if ( memory )
{
// memory->user = 0;
#ifdef __GNUC__
memory->user = CreatePool( MEMF_PUBLIC, 2048, 2048 );
#else
memory->user = AsmCreatePool( MEMF_PUBLIC, 2048, 2048, SysBase );
#endif
if ( memory->user == NULL )
{
FreeVec( memory );
memory = NULL;
}
else
{
memory->alloc = ft_alloc;
memory->realloc = ft_realloc;
memory->free = ft_free;
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_init( memory );
#endif
}
}
return memory;
}
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( void )
FT_Done_Memory( FT_Memory memory )
{
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_done( memory );
#endif
#ifdef __GNUC__
DeletePool( memory->user );
#else
AsmDeletePool( memory->user, SysBase );
#endif
FreeVec( memory );
}
/* END */

93
builds/ansi/ansi-def.mk Normal file
View File

@ -0,0 +1,93 @@
#
# FreeType 2 configuration rules for a `normal' ANSI system
#
# Copyright 1996-2000, 2003 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 TOP_DIR
TOP_DIR := .
endif
DELETE := rm -f
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/ansi
PLATFORM := ansi
# The directory where all object files are placed.
#
# This lets you build the library in your own directory with something like
#
# set TOP_DIR=.../path/to/freetype2/top/dir...
# set OBJ_DIR=.../path/to/obj/dir
# make -f $TOP_DIR/Makefile setup [options]
# make -f $TOP_DIR/Makefile
#
ifndef OBJ_DIR
OBJ_DIR := $(TOP_DIR)/objs
endif
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := lib$(PROJECT)
# 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 := -o$(space)
# 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 := -c
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS :=
# EOF

View File

@ -1,5 +1,5 @@
#
# FreeType 2 configuration rules for a `normal' ANSI compiler
# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system
#
@ -13,122 +13,9 @@
# fully.
ifndef TOP
TOP := .
endif
include $(TOP_DIR)/builds/ansi/ansi-def.mk
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
include $(TOP_DIR)/builds/link_std.mk
DELETE := rm -f
SEP := /
HOSTSEP := $(SEP)
BUILD := $(TOP)/builds/ansi
PLATFORM := ansi
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f $TOP/Makefile setup [options]
# make -f $TOP/Makefile
#
OBJ_DIR := obj
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := libfreetype
# 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 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 := -o # Don't remove this comment line! We need the space after `-o'.
# 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 := -c
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS :=
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_std
distclean_freetype: distclean_freetype_std
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $@
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
# EOF

View File

@ -1,142 +0,0 @@
/***************************************************************************/
/* */
/* memdebug.c */
/* */
/* Memory debugging functions (body 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. */
/* */
/***************************************************************************/
#include <stdio.h>
#include <stdlib.h>
typedef struct TBlockRec_
{
char* base;
long size;
} TBlockRec;
static TBlockRec* mem_blocks;
static int num_mem_blocks;
static int max_mem_blocks;
void DM_Init_Mem()
{
num_mem_blocks = 0;
max_mem_blocks = 4096;
mem_blocks = (TBlockRec*)malloc( max_mem_blocks *
sizeof ( *mem_blocks ) );
}
void DM_Done_Mem()
{
/* Now print the remaining blocks */
if ( num_mem_blocks == 0 )
fprintf( stderr, "No memory leaked!\n" );
else
{
int i;
fprintf( stderr, "There were %d leaked memory blocks\n\n",
num_mem_blocks );
fprintf( stderr, "base size\n" );
fprintf( stderr, "------------------\n" );
for ( i = 0; i < num_mem_blocks; i++ )
{
fprintf( stderr, "%08lx %04lx\n",
(long)mem_blocks[i].base, mem_blocks[i].size );
}
}
free( mem_blocks );
}
void DM_Record( char* base,
long size )
{
TBlockRec* block;
#if 0
/* First, check that the block is not located within one of the */
/* recorded blocks */
for ( i = 0; i < num_mem_blocks; i++ )
{
char *start, *end, *_limit, *_base;
_base = mem_blocks[i].base;
_limit = _base + mem_blocks[i].size;
start = base;
end = base + size - 1;
if ( ( start >= base && start < limit ) ||
( end >= base && end < limit ) )
{
fprintf( stderr, "Warning: Recording an invalid block!\n" );
}
}
#endif
/* Add block to list */
if ( num_mem_blocks >= max_mem_blocks )
{
max_mem_blocks *= 2;
mem_blocks = realloc( mem_blocks,
max_mem_blocks * sizeof ( *mem_blocks ) );
}
block = mem_blocks + num_mem_blocks;
block->base = base;
block->size = size;
num_mem_blocks++;
}
void DM_Forget( char* base )
{
TBlockRec* block = mem_blocks;
int i;
for ( i = 0; i < num_mem_blocks; i++, block++ )
{
if ( block->base == base )
{
/* simply move last block to the current position */
if ( num_mem_blocks > 1 )
*block = mem_blocks[num_mem_blocks - 1];
num_mem_blocks--;
return;
}
#if 1
if ( base >= block->base && base < block->base + block->size )
{
fprintf( stderr, "Invalid block forgotten!\n" );
}
#endif
}
}
/* END */

95
builds/beos/beos-def.mk Normal file
View File

@ -0,0 +1,95 @@
#
# FreeType 2 configuration rules for a BeOS system
#
# this is similar to the "ansi-def.mk" file, except for BUILD and PLATFORM
#
# Copyright 1996-2000, 2003 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 TOP_DIR
TOP_DIR := .
endif
DELETE := rm -f
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/beos
PLATFORM := beos
# The directory where all object files are placed.
#
# This lets you build the library in your own directory with something like
#
# set TOP_DIR=.../path/to/freetype2/top/dir...
# set OBJ_DIR=.../path/to/obj/dir
# make -f $TOP_DIR/Makefile setup [options]
# make -f $TOP_DIR/Makefile
#
ifndef OBJ_DIR
OBJ_DIR := $(TOP_DIR)/objs
endif
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := lib$(PROJECT)
# 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 := -o$(space)
# 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 := -c
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS :=
# EOF

19
builds/beos/beos.mk Normal file
View File

@ -0,0 +1,19 @@
#
# FreeType 2 configuration rules for a BeOS system
#
# Copyright 1996-2000, 2002 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.
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
include $(TOP_DIR)/builds/beos/beos-def.mk
include $(TOP_DIR)/builds/link_std.mk
# EOF

40
builds/beos/detect.mk Normal file
View File

@ -0,0 +1,40 @@
#
# FreeType 2 configuration file to detect an BeOS host platform.
#
# Copyright 1996-2000, 2003 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.
.PHONY: setup
ifeq ($(PLATFORM),ansi)
ifdef BE_HOST_CPU
PLATFORM := beos
endif # test MACHTYPE beos
endif
ifeq ($(PLATFORM),beos)
DELETE := rm -f
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/beos
CONFIG_FILE := beos.mk
setup: std_setup
endif # test PLATFORM beos
# EOF

View File

@ -0,0 +1,84 @@
#
# FreeType 2 generic pseudo ANSI compiler
#
# Copyright 1996-2000, 2003 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 := cc
COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# 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 := -o$(space)
# 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 := -c
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
# we assume the compiler is already strictly ANSI
#
ANSIFLAGS :=
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(subst /,$(COMPILER_SEP),$(OBJECTS_LIST))
# EOF

View File

@ -0,0 +1,82 @@
#
# FreeType 2 Borland C++-specific with NO OPTIMIZATIONS + DEBUGGING
#
# Copyright 1996-2000, 2003 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 := bcc32
COMPILER_SEP := $(SEP)
# 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 :=
# Target flag -- no trailing space.
#
T := -o
# 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 := -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -A
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
# EOF

82
builds/compiler/bcc.mk Normal file
View File

@ -0,0 +1,82 @@
#
# FreeType 2 Borland C++-specific rules
#
# Copyright 1996-2000, 2003 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 := bcc32
COMPILER_SEP := $(SEP)
# 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 :=
# Target flag -- no trailing space.
#
T := -o
# 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 := -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -A
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
# EOF

81
builds/compiler/emx.mk Normal file
View File

@ -0,0 +1,81 @@
#
# FreeType 2 emx-specific definitions
#
# Copyright 2003 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 := set GCCOPT="-ansi -pedantic"; gcc
COMPILER_SEP := /
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# 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 := -o$(space)
# 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 := -c -g -O6 -Wall
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS :=
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(foreach m,$(OBJECTS_LIST),$(AR) -r $@ $(m);) echo > nul
# EOF

View File

@ -0,0 +1,93 @@
#
# FreeType 2 gcc-specific with NO OPTIMIZATIONS + DEBUGGING
#
# Copyright 1996-2000, 2003 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 := gcc
COMPILER_SEP := /
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# 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 := -o$(space)
# 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 := -c -g -O0 \
-fno-strict-aliasing \
-Wall \
-W \
-Wundef \
-Wshadow \
-Wpointer-arith \
-Wwrite-strings \
-Wstrict-prototypes \
-Wredundant-decls \
-Wnested-externs \
-Wno-long-long
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
# EOF

81
builds/compiler/gcc.mk Normal file
View File

@ -0,0 +1,81 @@
#
# FreeType 2 gcc-specific definitions
#
# Copyright 1996-2000, 2003 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 := gcc
COMPILER_SEP := /
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# 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 := -o$(space)
# 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 := -c -g -O6 -Wall -fno-strict-aliasing
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic
# Library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
# EOF

86
builds/compiler/intelc.mk Normal file
View File

@ -0,0 +1,86 @@
#
# FreeType 2 Intel C/C++ definitions (VC++ compatibility mode)
#
# Copyright 1996-2000, 2003 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
COMPILER_SEP := $(SEP)
# 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:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
# EOF

View File

@ -0,0 +1,87 @@
#
# FreeType 2 Unix LCC specific definitions
#
# Copyright 1996-2000, 2003 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.
# Command line name
#
CC := lcc
COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# 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 := -o$(space)
# 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 := -c -g
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
# LCC is pure ANSI anyway!
#
# the "-A" flag simply increments verbosity about non ANSI code
#
ANSIFLAGS := -A
# library linking
#
ifndef CLEAN_LIBRARY
CLEAN_LIBRARY = $(DELETE) $(PROJECT_LIBRARY)
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
# EOF

View File

@ -0,0 +1,78 @@
#
# FreeType 2 Visual Age C++ specific definitions
#
# Copyright 1996-2000, 2003 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.
# command line compiler name
#
CC := icc
COMPILER_SEP := $(SEP)
# 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.
#
ifndef CFLAGS
CFLAGS := /Q- /Gd+ /O2 /G5 /W3 /C
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSI_FLAGS := /Sa
# Library linking
#
#CLEAN_LIBRARY :=
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
# EOF

View File

@ -0,0 +1,81 @@
#
# FreeType 2 Visual C++ definitions
#
# Copyright 1996-2000, 2003 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 := cl
COMPILER_SEP := $(SEP)
# 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.
#
ifndef CFLAGS
CFLAGS := /nologo /c /Ox /G5 /W3 /WX
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := /Za
# Library linking
#
#CLEAN_LIBRARY =
LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
# EOF

85
builds/compiler/watcom.mk Normal file
View File

@ -0,0 +1,85 @@
#
# FreeType 2 Watcom-specific definitions
#
# Copyright 1996-2000, 2003 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
COMPILER_SEP := $(SEP)
# 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),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
wlib -q -n $@; \
$(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
echo > nul)
# EOF

View File

@ -0,0 +1,83 @@
#
# FreeType 2 Win32-LCC specific definitions
#
# Copyright 1996-2000, 2003 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.
# Command line name
#
CC := lcc
COMPILER_SEP := $(SEP)
# 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.
#
ifndef CFLAGS
CFLAGS := -c -g2 -O
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
# LCC is pure ANSI anyway!
#
ANSIFLAGS :=
# library linking
#
#CLEAN_LIBRARY :=
LINK_LIBRARY = lcclib /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2001, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -16,7 +16,7 @@
# This sub-Makefile is in charge of detecting the current platform. It sets
# the following variables:
#
# BUILD The configuration and system-specific directory. Usually
# BUILD_DIR The configuration and system-specific directory. Usually
# `freetype/builds/$(PLATFORM)' but can be different for
# custom builds of the library.
#
@ -30,31 +30,32 @@
# DELETE The shell command used to remove a given file.
# COPY The shell command used to copy one file.
# SEP The platform-specific directory separator.
# COMPILER_SEP The separator used in arguments of the compilation tools.
# CC The compiler to use.
#
# You need to set the following variable(s) before calling it:
#
# TOP The top-most directory in the FreeType library source
# TOP_DIR The top-most directory in the FreeType library source
# hierarchy. If not defined, it will default to `.'.
# If TOP is not defined, default it to `.'
# If TOP_DIR is not defined, default it to `.'
#
ifndef TOP
TOP := .
ifndef TOP_DIR
TOP_DIR := .
endif
# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
# Note that we delay the evaluation of $(BUILD_CONFIG_), $(BUILD), and
# $(CONFIG_RULES).
#
PLATFORM := ansi
DELETE := $(RM)
COPY := cp
SEP := /
PLATFORM := ansi
DELETE := $(RM)
COPY := cp
SEP := /
BUILD_CONFIG_ = $(TOP)$(SEP)builds$(SEP)
BUILD = $(BUILD_CONFIG_)$(PLATFORM)
CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
BUILD_CONFIG := $(TOP_DIR)/builds
# These two assignments must be delayed.
BUILD_DIR = $(BUILD_CONFIG)/$(PLATFORM)
CONFIG_RULES = $(BUILD_DIR)/$(CONFIG_FILE)
# We define the BACKSLASH variable to hold a single back-slash character.
# This is needed because a line like
@ -70,17 +71,39 @@ CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
#
BACKSLASH := $(strip \ )
# Now, include all detection rule files found in the `builds/<system>'
# directories. Note that the calling order of the various `detect.mk' files
# isn't predictable.
# Find all auto-detectable platforms.
#
include $(wildcard $(BUILD_CONFIG_)*/detect.mk)
PLATFORMS := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG)/*/detect.mk)))
.PHONY: $(PLATFORMS) ansi
# Filter out platform specified as setup target.
#
PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS)))
# If no setup target platform was specified, enable auto-detection/
# default platform.
#
ifeq ($(PLATFORM),)
PLATFORM := ansi
endif
# If the user has explicitly asked for `ansi' on the command line,
# disable auto-detection.
#
ifeq ($(findstring ansi,$(MAKECMDGOALS)),)
# Now, include all detection rule files found in the `builds/<system>'
# directories. Note that the calling order of the various `detect.mk'
# files isn't predictable.
#
include $(wildcard $(BUILD_CONFIG)/*/detect.mk)
endif
# In case no detection rule file was successful, use the default.
#
ifndef CONFIG_FILE
CONFIG_FILE := ansi.mk
setup: std_setup
.PHONY: setup
endif
# The following targets are equivalent, with the exception that they use
@ -93,38 +116,44 @@ endif
std_setup:
@echo ""
@echo "FreeType build system -- automatic system detection"
@echo "$(PROJECT_TITLE) build system -- automatic system detection"
@echo ""
@echo "The following settings are used:"
@echo ""
@echo " platform $(PLATFORM)"
@echo " compiler $(CC)"
@echo " configuration directory $(BUILD)"
@echo " configuration directory $(BUILD_DIR)"
@echo " configuration rules $(CONFIG_RULES)"
@echo ""
@echo "If this does not correspond to your system or settings please remove the file"
@echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
@echo ""
@echo "Otherwise, simply type \`make' again to build the library."
@echo "Otherwise, simply type \`$(MAKE)' again to build the library,"
@echo "or \`$(MAKE) refdoc' to build the API reference (the latter needs python)."
@echo ""
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
# Special case for Dos, Windows, OS/2, where echo "" doesn't work correctly!
#
dos_setup:
@echo ÿ
@echo FreeType build system -- automatic system detection
@echo ÿ
@type builds\newline
@echo $(PROJECT_TITLE) build system -- automatic system detection
@type builds\newline
@echo The following settings are used:
@echo ÿ
@echo ÿÿplatformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
@echo ÿÿcompilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
@echo ÿÿconfiguration directoryÿÿÿÿÿÿ$(BUILD)
@echo ÿÿconfiguration rulesÿÿÿÿÿÿÿÿÿÿ$(CONFIG_RULES)
@echo ÿ
@type builds\newline
@echo platformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
@echo compilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
@echo configuration directoryÿÿÿÿÿÿ$(subst /,\,$(BUILD_DIR))
@echo configuration rulesÿÿÿÿÿÿÿÿÿÿ$(subst /,\,$(CONFIG_RULES))
@type builds\newline
@echo If this does not correspond to your system or settings please remove the file
@echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
@echo ÿ
@type builds\newline
@echo Otherwise, simply type 'make' again to build the library.
@echo ÿ
@echo or 'make refdoc' to build the API reference (the latter needs python).
@type builds\newline
@$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,75 +13,105 @@
# fully.
# We test for the COMSPEC environment variable, then run the `ver'
# command-line program to see if its output contains the word `Dos'.
#
# If this is true, we are running a Dos-ish platform (or an emulation).
#
.PHONY: setup
ifeq ($(PLATFORM),ansi)
ifdef COMSPEC
# Test for DJGPP by checking the DJGPP environment variable, which must be
# set in order to use the system (ie. it will always be present when the
# `make' utility is run).
#
# We test for the COMSPEC environment variable, then run the `ver'
# command-line program to see if its output contains the word `Dos' or
# `DOS'.
#
# If this is true, we are running a Dos-ish platform (or an emulation).
#
ifdef DJGPP
PLATFORM := dos
else
ifdef COMSPEC
is_dos := $(findstring DOS,$(subst Dos,DOS,$(shell ver)))
is_dos := $(findstring Dos,$(shell ver))
# We try to recognize a Dos session under OS/2. The `ver' command
# returns `Operating System/2 ...' there, so `is_dos' should be empty.
#
# To recognize a Dos session under OS/2, we check COMSPEC for the
# substring `MDOS\COMMAND'
#
ifeq ($(is_dos),)
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
endif
# We try to recognize a Dos session under OS/2. The `ver' command
# returns `Operating System/2 ...' there, so `is_dos' should be empty.
#
# To recognize a Dos session under OS/2, we check COMSPEC for the
# substring `MDOS\COMMAND'
#
ifeq ($(is_dos),)
is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
endif
endif # test COMSPEC
ifneq ($(is_dos),)
PLATFORM := dos
DELETE := del
COPY := copy
# Use DJGPP (i.e. gcc) by default.
#
CONFIG_FILE := dos-gcc.mk
SEP := /
ifndef CC
CC := gcc
endif
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
CONFIG_FILE := dos-tcc.mk
SEP := $(BACKSLASH)
CC := tcc
.PHONY: turboc
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := dos-wat.mk
SEP := $(BACKSLASH)
CC := wcc386
.PHONY: watcom
endif
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
CONFIG_FILE := dos-bcc.mk
SEP := $(BACKSLASH)
CC := bcc
.PHONY: borlandc16
endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
CONFIG_FILE := dos-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
.PHONY: borlandc
endif
setup: dos_setup
endif # test Dos
endif # test COMSPEC
endif # test PLATFORM
endif # test DJGPP
endif # test PLATFORM ansi
ifeq ($(PLATFORM),dos)
# Use DJGPP (i.e. gcc) by default.
#
CONFIG_FILE := dos-gcc.mk
ifndef CC
CC := gcc
endif
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring emx,$(MAKECMDGOALS)),) # EMX gcc
CONFIG_FILE := dos-emx.mk
CC := gcc
emx: setup
.PHONY: emx
endif
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
CONFIG_FILE := dos-tcc.mk
CC := tcc
turboc: setup
.PHONY: turboc
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := dos-wat.mk
CC := wcc386
watcom: setup
.PHONY: watcom
endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
CONFIG_FILE := dos-bcc.mk
CC := bcc32
borlandc: setup
.PHONY: borlandc
endif
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
CONFIG_FILE := dos-bcc.mk
CC := bcc
borlandc16: setup
.PHONY: borlandc16
endif
ifneq ($(findstring bash,$(SHELL)),) # check for bash
SEP := /
DELETE := rm
COPY := cp
setup: std_setup
else
SEP := $(BACKSLASH)
DELETE := del
COPY := copy
setup: dos_setup
endif
endif # test PLATFORM dos
# EOF

54
builds/dos/dos-def.mk Normal file
View File

@ -0,0 +1,54 @@
#
# FreeType 2 DOS specific definitions
#
# Copyright 1996-2000, 2003 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.
DELETE := del
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/dos
PLATFORM := dos
# The directory where all object files are placed.
#
# This lets you build the library in your own directory with something like
#
# set TOP_DIR=.../path/to/freetype2/top/dir...
# set OBJ_DIR=.../path/to/obj/dir
# make -f %TOP_DIR%/Makefile setup [options]
# make -f %TOP_DIR%/Makefile
#
ifndef OBJ_DIR
OBJ_DIR := $(TOP_DIR)/objs
endif
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := $(PROJECT)
# The NO_OUTPUT macro is used to ignore the output of commands.
#
NO_OUTPUT = > nul
# EOF

21
builds/dos/dos-emx.mk Normal file
View File

@ -0,0 +1,21 @@
#
# FreeType 2 configuration rules for the EMX gcc compiler
#
# Copyright 2003 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.
include $(TOP_DIR)/builds/dos/dos-def.mk
include $(TOP_DIR)/builds/compiler/emx.mk
include $(TOP_DIR)/builds/link_dos.mk
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,122 +13,9 @@
# fully.
ifndef TOP
TOP := .
endif
include $(TOP_DIR)/builds/dos/dos-def.mk
include $(TOP_DIR)/builds/compiler/gcc.mk
include $(TOP_DIR)/builds/link_dos.mk
DELETE := rm -f
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/builds/dos
PLATFORM := dos
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := libfreetype
# 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 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 := -o # Don't remove this comment line! We need the space after `-o'.
# 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 := -c -g -O6 -Wall
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like:
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $@
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
# EOF

17
builds/dos/dos-wat.mk Normal file
View File

@ -0,0 +1,17 @@
#
# FreeType 2 configuration rules for the Watcom C/C++ compiler
#
# 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.
include $(TOP_DIR)/builds/dos/dos-def.mk
include $(TOP_DIR)/builds/compiler/watcom.mk
include $(TOP_DIR)/builds/link_dos.mk
# EOF

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2001, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -20,13 +20,15 @@
# The following variables (set by other Makefile components, in the
# environment, or on the command line) are used:
#
# BUILD The architecture dependent directory,
# e.g. `$(TOP)/builds/unix'.
# BUILD_DIR The architecture dependent directory,
# e.g. `$(TOP_DIR)/builds/unix'.
#
# OBJ_DIR The directory in which object files are created.
#
# LIB_DIR The directory in which the library is created.
#
# DOC_DIR The directory in which the API reference is created.
#
# INCLUDES A list of directories to be included additionally.
# Usually empty.
#
@ -62,7 +64,8 @@
# variables which is to be removed for the `clean' resp.
# `distclean' target.
#
# TOP, SEP,
# TOP_DIR, SEP,
# COMPILER_SEP,
# LIBRARY, CC,
# A, I, O, T Check `config.mk' for details.
@ -70,7 +73,7 @@
# The targets `objects' and `library' are defined at the end of this
# Makefile after all other rules have been included.
#
.PHONY: single objects library
.PHONY: single multi objects library refdoc
# default target -- build single objects and library
#
@ -83,33 +86,29 @@ multi: objects library
# The FreeType source directory, usually `./src'.
#
SRC := $(TOP)$(SEP)src
SRC_DIR := $(TOP_DIR)/src
# The directory where the base layer components are placed, usually
# `./src/base'.
#
BASE_DIR := $(SRC)$(SEP)base
BASE_DIR := $(SRC_DIR)/base
# Other derived directories.
#
PUBLIC_DIR := $(TOP_DIR)/include/freetype
INTERNAL_DIR := $(PUBLIC_DIR)/internal
CONFIG_DIR := $(PUBLIC_DIR)/config
CACHE_DIR := $(PUBLIC_DIR)/cache
# A few short-cuts in order to avoid typing $(SEP) all the time for the
# directory separator.
# The documentation directory.
#
# For example: $(SRC_) equals to `./src/' where `.' is $(TOP).
#
#
SRC_ := $(SRC)$(SEP)
BASE_ := $(BASE_DIR)$(SEP)
OBJ_ := $(OBJ_DIR)$(SEP)
LIB_ := $(LIB_DIR)$(SEP)
PUBLIC_ := $(TOP)$(SEP)include$(SEP)freetype$(SEP)
INTERNAL_ := $(PUBLIC_)internal$(SEP)
CONFIG_ := $(PUBLIC_)config$(SEP)
ifndef DOC_DIR
DOC_DIR := $(TOP_DIR)/docs/reference
endif
# The final name of the library file.
#
FT_LIBRARY := $(LIB_)$(LIBRARY).$A
PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
# include paths
@ -120,7 +119,8 @@ FT_LIBRARY := $(LIB_)$(LIBRARY).$A
# in the `freetype/builds/<system>' directory, as these
# files will override the default sources.
#
INCLUDES := $(BUILD) $(TOP)$(SEP)include $(SRC)
INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) $(BUILD_DIR) \
$(TOP_DIR)/include)
INCLUDE_FLAGS = $(INCLUDES:%=$I%)
@ -129,14 +129,17 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# least the paths for the `base' and `builds/<system>' directories;
# debug/optimization/warning flags + ansi compliance if needed.
#
FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
# old FreeType versions.
#
FT_CFLAGS = $(INCLUDE_FLAGS) $(CFLAGS)
FT_CC = $(CC) $(FT_CFLAGS)
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
# Include the `modules' rules file.
#
include $(TOP)/builds/modules.mk
include $(TOP_DIR)/builds/modules.mk
# Initialize the list of objects.
@ -145,50 +148,53 @@ OBJECTS_LIST :=
# Define $(PUBLIC_H) as the list of all public header files located in
# `$(TOP)/include/freetype'. $(BASE_H) and $(CONFIG_H) are defined
# similarly.
# `$(TOP_DIR)/include/freetype'. $(BASE_H), $(CACHE_H), and $(CONFIG_H) are
# defined similarly.
#
# This is used to simplify the dependency rules -- if one of these files
# changes, the whole library is recompiled.
#
PUBLIC_H := $(wildcard $(PUBLIC_)*.h)
BASE_H := $(wildcard $(INTERNAL_)*.h)
CONFIG_H := $(wildcard $(CONFIG_)*.h)
PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
BASE_H := $(wildcard $(INTERNAL_DIR)/*.h)
CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
$(wildcard $(BUILD_DIR)/freetype/config/*.h)
CACHE_H := $(wildcard $(CACHE_DIR)/*.h)
DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H)
FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H) $(CACHE_H) $(DEVEL_H)
# ftsystem component
#
ifndef FTSYS_SRC
FTSYS_SRC = $(BASE_)ftsystem.c
FTSYS_SRC = $(BASE_DIR)/ftsystem.c
endif
FTSYS_OBJ = $(OBJ_)ftsystem.$O
FTSYS_OBJ = $(OBJ_DIR)/ftsystem.$O
OBJECTS_LIST += $(FTSYS_OBJ)
$(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H)
$(FT_COMPILE) $T$@ $<
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# ftdebug component
#
ifndef FTDEBUG_SRC
FTDEBUG_SRC = $(BASE_)ftdebug.c
FTDEBUG_SRC = $(BASE_DIR)/ftdebug.c
endif
FTDEBUG_OBJ = $(OBJ_)ftdebug.$O
FTDEBUG_OBJ = $(OBJ_DIR)/ftdebug.$O
OBJECTS_LIST += $(FTDEBUG_OBJ)
$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H)
$(FT_COMPILE) $T$@ $<
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# Include all rule files from FreeType components.
#
include $(wildcard $(SRC)/*/rules.mk)
include $(wildcard $(SRC_DIR)/*/rules.mk)
# ftinit component
@ -202,13 +208,13 @@ include $(wildcard $(SRC)/*/rules.mk)
# which contain additional include paths and macros used to compile the
# single `ftinit.c' source.
#
FTINIT_SRC := $(BASE_)ftinit.c
FTINIT_OBJ := $(OBJ_)ftinit.$O
FTINIT_SRC := $(BASE_DIR)/ftinit.c
FTINIT_OBJ := $(OBJ_DIR)/ftinit.$O
OBJECTS_LIST += $(FTINIT_OBJ)
$(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H) $(FT_MODULE_LIST)
$(FT_COMPILE) $T$@ $<
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# All FreeType library objects
@ -237,43 +243,68 @@ endif
objects: $(OBJECTS_LIST)
library: $(FT_LIBRARY)
library: $(PROJECT_LIBRARY)
.c.$O:
$(FT_COMPILE) $T$@ $<
$(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
refdoc:
python $(SRC_DIR)/tools/docmaker/docmaker.py \
--prefix=ft2 \
--title=FreeType-2.1.5 \
--output=$(DOC_DIR) \
$(PUBLIC_DIR)/*.h \
$(PUBLIC_DIR)/config/*.h \
$(PUBLIC_DIR)/cache/*.h
.PHONY: clean_project_std distclean_project_std
# Standard cleaning and distclean rules. These are not accepted
# on all systems though.
#
clean_freetype_std:
clean_project_std:
-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) $(CLEAN)
distclean_freetype_std: clean_freetype_std
-$(DELETE) $(FT_LIBRARY)
distclean_project_std: clean_project_std
-$(DELETE) $(PROJECT_LIBRARY)
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
.PHONY: clean_project_dos distclean_project_dos
# The Dos command shell does not support very long list of arguments, so
# we are stuck with wildcards.
#
clean_freetype_dos:
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O $(CLEAN) 2> nul
# Don't break the command lines with \; this prevents the "del" command from
# working correctly on Win9x.
#
clean_project_dos:
-$(DELETE) $(subst /,\,$(OBJ)/*.$O $(CLEAN) $(NO_OUTPUT))
distclean_freetype_dos: clean_freetype_dos
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) $(DISTCLEAN) 2> nul
distclean_project_dos: clean_project_dos
-$(DELETE) $(subst /,\,$(PROJECT_LIBRARY) $(DISTCLEAN) $(NO_OUTPUT))
.PHONY: remove_config_mk
# Remove configuration file (used for distclean).
#
remove_config_mk:
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK))
-$(DELETE) $(subst /,$(SEP),$(CONFIG_MK) $(NO_OUTPUT))
.PHONY: clean distclean
# The `config.mk' file must define `clean_freetype' and
# `distclean_freetype'. Implementations may use to relay these to either
# the `std' or `dos' versions from above, or simply provide their own
# implementation.
#
clean: clean_freetype
distclean: distclean_freetype remove_config_mk
clean: clean_project
distclean: distclean_project remove_config_mk
-$(DELETE) $(subst /,$(SEP),$(DOC_DIR)/*.html $(NO_OUTPUT))
# EOF

42
builds/link_dos.mk Normal file
View File

@ -0,0 +1,42 @@
#
# Link instructions for Dos-like systems (Dos, Win32, OS/2)
#
# 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.
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP_DIR)/builds/$(PROJECT).mk
# The cleanup targets.
#
clean_project: clean_project_dos
distclean_project: distclean_project_dos
# This final rule is used to link all object files into a single library.
# this is compiler-specific
#
$(PROJECT_LIBRARY): $(OBJECTS_LIST)
ifdef CLEAN_LIBRARY
-$(CLEAN_LIBRARY) $(NO_OUTPUT)
endif
$(LINK_LIBRARY)
endif
# EOF

42
builds/link_std.mk Normal file
View File

@ -0,0 +1,42 @@
#
# Link instructions for standard systems
#
# 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.
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP_DIR)/builds/$(PROJECT).mk
# The cleanup targets.
#
clean_project: clean_project_std
distclean_project: distclean_project_std
# This final rule is used to link all object files into a single library.
# this is compiler-specific
#
$(PROJECT_LIBRARY): $(OBJECTS_LIST)
ifdef CLEAN_LIBRARY
-$(CLEAN_LIBRARY) $(NO_OUTPUT)
endif
$(LINK_LIBRARY)
endif
# EOF

View File

@ -1,11 +1,14 @@
This folder contains supporting code and CodeWarrior Pro 4 project
files to build the FreeType library.
This folder contains
. a Makefile for Apple MPW build environment (currently PPC only)
. supporting code and CodeWarrior Pro 7 project files to build the
FreeType library.
Notes:
The library will be built as a static lib in the obj/ folder.
Just van Rossum, <just@letterror.com>
Current maintainer: Leonard Rosenthol, <leonardr@lazerware.com>
Originally prepared by Just van Rossum, <just@letterror.com>
DISCLAIMER: this subdirectory is *not* being maintained by the
FreeType team, but by Just van Rossum. It's being released under
the same terms as FreeType (see LICENSE.TXT).
This directory is now actively maintained as part of the FreeType Project.

109
builds/mac/freetype.make Normal file
View File

@ -0,0 +1,109 @@
# Makefile for Apple MPW build environment (currently PPC only)
MAKEFILE = Makefile
ÿMondoBuildÿ = #{MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
SymÿPPC = #-sym on
ObjDirÿPPC = :obj:
CFLAGS = -i :include -i :src -includes unix {SymÿPPC}
OBJS = ÿ
"{ObjDirÿPPC}ftsystem.c.x" ÿ
"{ObjDirÿPPC}ftdebug.c.x" ÿ
"{ObjDirÿPPC}ftinit.c.x" ÿ
"{ObjDirÿPPC}ftbase.c.x" ÿ
"{ObjDirÿPPC}ftglyph.c.x" ÿ
"{ObjDirÿPPC}ftmm.c.x" ÿ
"{ObjDirÿPPC}ftbbox.c.x" ÿ
"{ObjDirÿPPC}autohint.c.x" ÿ
"{ObjDirÿPPC}ftcache.c.x" ÿ
"{ObjDirÿPPC}cff.c.x" ÿ
"{ObjDirÿPPC}type1cid.c.x" ÿ
"{ObjDirÿPPC}pcf.c.x" ÿ
"{ObjDirÿPPC}psaux.c.x" ÿ
"{ObjDirÿPPC}psmodule.c.x" ÿ
"{ObjDirÿPPC}raster.c.x" ÿ
"{ObjDirÿPPC}sfnt.c.x" ÿ
"{ObjDirÿPPC}smooth.c.x" ÿ
"{ObjDirÿPPC}truetype.c.x" ÿ
"{ObjDirÿPPC}type1.c.x" ÿ
"{ObjDirÿPPC}winfnt.c.x" ÿ
"{ObjDirÿPPC}ftmac.c.x" ÿ
# Main target - build a library
freetype ÿÿ {ÿMondoBuildÿ} directories freetype.o
# This is used to build the library
freetype.o ÿÿ {ÿMondoBuildÿ} {OBJS}
PPCLink ÿ
-o :lib:{Targ} {SymÿPPC} ÿ
{OBJS} -c '????' -xm l
# This is used to create the directories needed for build
directories ÿ
if !`Exists obj` ; NewFolder obj ; end
if !`Exists lib` ; NewFolder lib ; end
"{ObjDirÿPPC}ftsystem.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftsystem.c"
{PPCC} ":src:base:ftsystem.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftdebug.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftdebug.c"
{PPCC} ":src:base:ftdebug.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftinit.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftinit.c"
{PPCC} ":src:base:ftinit.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftbase.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftbase.c"
{PPCC} ":src:base:ftbase.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftglyph.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftglyph.c"
{PPCC} ":src:base:ftglyph.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftmm.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftmm.c"
{PPCC} ":src:base:ftmm.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftbbox.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftbbox.c"
{PPCC} ":src:base:ftbbox.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}autohint.c.x" ÿ {ÿMondoBuildÿ} ":src:autohint:autohint.c"
{PPCC} ":src:autohint:autohint.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftcache.c.x" ÿ {ÿMondoBuildÿ} ":src:cache:ftcache.c"
{PPCC} ":src:cache:ftcache.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}cff.c.x" ÿ {ÿMondoBuildÿ} ":src:cff:cff.c"
{PPCC} ":src:cff:cff.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}type1cid.c.x" ÿ {ÿMondoBuildÿ} ":src:cid:type1cid.c"
{PPCC} ":src:cid:type1cid.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}pcf.c.x" ÿ {ÿMondoBuildÿ} ":src:pcf:pcf.c"
{PPCC} ":src:pcf:pcf.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}psaux.c.x" ÿ {ÿMondoBuildÿ} ":src:psaux:psaux.c"
{PPCC} ":src:psaux:psaux.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}psmodule.c.x" ÿ {ÿMondoBuildÿ} ":src:psnames:psmodule.c"
{PPCC} ":src:psnames:psmodule.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}raster.c.x" ÿ {ÿMondoBuildÿ} ":src:raster:raster.c"
{PPCC} ":src:raster:raster.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}sfnt.c.x" ÿ {ÿMondoBuildÿ} ":src:sfnt:sfnt.c"
{PPCC} ":src:sfnt:sfnt.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}smooth.c.x" ÿ {ÿMondoBuildÿ} ":src:smooth:smooth.c"
{PPCC} ":src:smooth:smooth.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}truetype.c.x" ÿ {ÿMondoBuildÿ} ":src:truetype:truetype.c"
{PPCC} ":src:truetype:truetype.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}type1.c.x" ÿ {ÿMondoBuildÿ} ":src:type1:type1.c"
{PPCC} ":src:type1:type1.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}winfnt.c.x" ÿ {ÿMondoBuildÿ} ":src:winfonts:winfnt.c"
{PPCC} ":src:winfonts:winfnt.c" -o {Targ} {CFLAGS}
"{ObjDirÿPPC}ftmac.c.x" ÿ {ÿMondoBuildÿ} ":src:base:ftmac.c"
{PPCC} ":src:base:ftmac.c" -o {Targ} {CFLAGS}

Binary file not shown.

View File

@ -2,7 +2,8 @@
# FreeType 2 modules sub-Makefile
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -19,57 +20,58 @@
# This file is in charge of handling the generation of the modules list
# file.
.PHONY: make_module_list clean_module_list remake_module_list
.PHONY: make_module_list clean_module_list
# MODULE_LIST, as its name suggests, indicates where the modules list
# resides. For now, it is in `include/freetype/config/ftmodule.h'.
#
ifndef FT_MODULE_LIST
FT_MODULE_LIST := $(TOP)$(SEP)include$(SEP)freetype$(SEP)config$(SEP)ftmodule.h
ifndef MODULE_LIST
MODULE_LIST := $(TOP_DIR)/include/$(PROJECT)/config/ftmodule.h
endif
# To build the modules list, we invoke the `make_module_list' target.
#
# This rule is commented out by default since FreeType comes already with
# a ftmodule.h file.
# an ftmodule.h file.
#
#$(FT_MODULE_LIST): make_module_list
#$(MODULE_LIST): make_module_list
ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
OPEN_MODULE := @echo$(space)
CLOSE_MODULE := >> $(subst /,\,$(MODULE_LIST))
REMOVE_MODULE := @-$(DELETE) $(subst /,\,$(MODULE_LIST))
else
OPEN_MODULE := @echo "
CLOSE_MODULE := " >> $(MODULE_LIST)
REMOVE_MODULE := @-$(DELETE) $(MODULE_LIST)
endif
# Before the modules list file can be generated, we must remove the file in
# order to `clean' the list.
#
clean_module_list:
@-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_MODULE_LIST))
@-echo Regenerating the modules list in $(FT_MODULE_LIST)...
$(REMOVE_MODULE)
@-echo Regenerating modules list in $(MODULE_LIST)...
make_module_list: clean_module_list
@echo done.
# Trailing spaces are protected with a `#' sign to avoid accidental
# removing.
#
ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
OPEN_MODULE := @echo #
CLOSE_MODULE := >> $(subst $(SEP),$(HOSTSEP),$(FT_MODULE_LIST))
else
OPEN_MODULE := @echo "
CLOSE_MODULE := " >> $(FT_MODULE_LIST)
endif
# $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
# in the `module.mk' rules file.
#
OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE(
CLOSE_DRIVER := )$(CLOSE_MODULE)
ECHO_DRIVER := @echo "* module: #
ECHO_DRIVER := @echo "* module:$(space)
ECHO_DRIVER_DESC := (
ECHO_DRIVER_DONE := )"
# Each `module.mk' in the `src' sub-dirs is used to add one rule to the
# target `make_module_list'.
#
include $(wildcard $(TOP)/src/*/module.mk)
include $(wildcard $(TOP_DIR)/src/*/module.mk)
# EOF

1
builds/newline Normal file
View File

@ -0,0 +1 @@

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,50 +13,60 @@
# fully.
.PHONY: setup
ifeq ($(PLATFORM),ansi)
ifdef OS2_SHELL
PLATFORM := os2
COPY := copy
DELETE := del
CONFIG_FILE := os2-gcc.mk # gcc-emx by default
SEP := /
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := os2-icc.mk
SEP := $(BACKSLASH)
CC := icc
.PHONY: visualage
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := os2-wat.mk
SEP := $(BACKSLASH)
CC := wcc386
.PHONY: watcom
endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit
CONFIG_FILE := os2-bcc.mk
SEP := $(BACKSLASH)
CC := bcc32
.PHONY: borlandc
endif
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := os2-dev.mk
CC := gcc
SEP := /
devel: setup
endif
setup: dos_setup
endif # test OS2_SHELL
endif # test PLATFORM
endif
#EOF
ifeq ($(PLATFORM),os2)
COPY := copy
DELETE := del
SEP := $(BACKSLASH)
# gcc-emx by default
CONFIG_FILE := os2-gcc.mk
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := os2-icc.mk
CC := icc
visualage: setup
.PHONY: visualage
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := os2-wat.mk
CC := wcc386
watcom: setup
.PHONY: watcom
endif
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit
CONFIG_FILE := os2-bcc.mk
CC := bcc32
borlandc: setup
.PHONY: borlandc
endif
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := os2-dev.mk
CC := gcc
devel: setup
.PHONY: devel
endif
setup: dos_setup
endif # test PLATFORM os2
# EOF

54
builds/os2/os2-def.mk Normal file
View File

@ -0,0 +1,54 @@
#
# FreeType 2 OS/2 specific definitions
#
# Copyright 1996-2000, 2003 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.
DELETE := del
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/os2
PLATFORM := os2
# The directory where all object files are placed.
#
# This lets you build the library in your own directory with something like
#
# set TOP_DIR=.../path/to/freetype2/top/dir...
# set OBJ_DIR=.../path/to/obj/dir
# make -f %TOP_DIR%/Makefile setup [options]
# make -f %TOP_DIR%/Makefile
#
ifndef OBJ_DIR
OBJ_DIR := $(TOP_DIR)/objs
endif
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := $(PROJECT)
# The NO_OUTPUT macro is used to ignore the output of commands.
#
NO_OUTPUT = 2> nul
# EOF

View File

@ -1,11 +1,11 @@
#
# FreeType 2 configuration rules for OS/2 + gcc
# FreeType 2 configuration rules for OS/2 + GCC
#
# Development version without optimizations.
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -15,123 +15,17 @@
# fully.
ifndef TOP
TOP := .
ifndef TOP_DIR
TOP_DIR := .
endif
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/builds/os2
PLATFORM := os2
CC := gcc
include $(TOP_DIR)/builds/os2/os2-def.mk
BUILD_DIR := $(TOP_DIR)/devel
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := libfreetype
# 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 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 := -o # Don't remove this comment line! We need the space after `-o'.
# 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 := -c -g -O0 -Wall
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
# EOF

View File

@ -1,5 +1,5 @@
#
# FreeType 2 configuration rules for OS/2 + gcc
# FreeType 2 configuration rules for the OS/2 + gcc
#
@ -13,123 +13,14 @@
# fully.
ifndef TOP
TOP := .
endif
# include OS/2-specific definitions
include $(TOP_DIR)/builds/os2/os2-def.mk
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/builds/os2
PLATFORM := os2
CC := gcc
# include gcc-specific definitions
include $(TOP_DIR)/builds/compiler/gcc.mk
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := libfreetype
# 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 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 := -o # Don't remove this comment line! We need the space after `-o'.
# 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 := -c -g -O6 -Wall
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
# EOF

138
builds/toplevel.mk Normal file
View File

@ -0,0 +1,138 @@
#
# FreeType build system -- top-level sub-Makefile
#
# Copyright 1996-2000, 2001, 2003 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.
# This file is designed for GNU Make, do not use it with another Make tool!
#
# It works as follows:
#
# - When invoked for the first time, this Makefile will include the rules
# found in `PROJECT/builds/detect.mk'. They are in charge of detecting
# the current platform.
#
# A summary of the detection will be displayed, and the file `config.mk'
# will be created in the current directory.
#
# - When invoked later, this Makefile will include the rules found in
# `config.mk'. This sub-Makefile will define some system-specific
# variables (like compiler, compilation flags, object suffix, etc.), then
# include the rules found in `PROJECT/builds/PROJECT.mk', used to build
# the library.
#
# See the comments in `builds/detect.mk' and `builds/PROJECT.mk' for more
# details on host platform detection and library builds.
.PHONY: all setup distclean modules
# The `space' variable is used to avoid trailing spaces in defining the
# `T' variable later.
#
empty :=
space := $(empty) $(empty)
ifndef CONFIG_MK
CONFIG_MK := config.mk
endif
# If no configuration sub-makefile is present, or if `setup' is the target
# to be built, run the auto-detection rules to figure out which
# configuration rules file to use.
#
# Note that the configuration file is put in the current directory, which is
# not necessarily $(TOP_DIR).
# If `config.mk' is not present, set `check_platform'.
#
ifeq ($(wildcard $(CONFIG_MK)),)
check_platform := 1
endif
# If `setup' is one of the targets requested, set `check_platform'.
#
ifneq ($(findstring setup,$(MAKECMDGOALS)),)
check_platform := 1
endif
# Include the automatic host platform detection rules when we need to
# check the platform.
#
ifdef check_platform
# This is the first rule `make' sees.
#
all: setup
ifdef USE_MODULES
# If the module list $(MODULE_LIST) file is not present, generate it.
#
#modules: make_module_list setup
endif
include $(TOP_DIR)/builds/detect.mk
ifdef USE_MODULES
include $(TOP_DIR)/builds/modules.mk
ifeq ($(wildcard $(MODULE_LIST)),)
setup: make_module_list
endif
endif
# This rule makes sense for Unix only to remove files created by a run
# of the configure script which hasn't been successful (so that no
# `config.mk' has been created). It uses the built-in $(RM) command of
# GNU make. Similarly, `nul' is created if e.g. `make setup win32' has
# been erroneously used.
#
# note: This test is duplicated in "builds/toplevel.mk".
#
is_unix := $(strip $(wildcard /sbin/init) \
$(wildcard /usr/sbin/init) \
$(wildcard /hurd/auth))
ifneq ($(is_unix),)
distclean:
$(RM) builds/unix/config.cache
$(RM) builds/unix/config.log
$(RM) builds/unix/config.status
$(RM) builds/unix/unix-def.mk
$(RM) builds/unix/unix-cc.mk
$(RM) nul
endif # test is_unix
# IMPORTANT:
#
# `setup' must be defined by the host platform detection rules to create
# the `config.mk' file in the current directory.
else
# A configuration sub-Makefile is present -- simply run it.
#
all: single
ifdef USE_MODULES
modules: make_module_list
endif
BUILD_PROJECT := yes
include $(CONFIG_MK)
endif # test check_platform
# EOF

8
builds/unix/.cvsignore Normal file
View File

@ -0,0 +1,8 @@
unix-def.mk
unix-cc.mk
config.status
config.cache
config.log
libtool
ftconfig.h
freetype-config

3527
builds/unix/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

428
builds/unix/config.sub vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
version='2000-06-20'
timestamp='2003-01-03'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -29,7 +29,8 @@ version='2000-06-20'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@ -60,16 +61,30 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-V, --version print version number, then exit"
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case "$1" in
--version | --vers* | -V )
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit 0 ;;
--version | -v )
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
@ -78,9 +93,7 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
exec >&2
echo "$me: invalid option $1"
echo "$help"
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
@ -105,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu*)
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@ -145,6 +158,14 @@ case $os in
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
@ -203,31 +224,62 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | sh[34] \
| powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v | fr30 | avr)
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[234567]86)
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@ -236,28 +288,58 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here.
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| hppa2.0n-* | hppa64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
| bs2000-* | tic54x-* | c54x-*)
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* \
| m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| ymp-* \
| z8k-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@ -294,14 +376,14 @@ case $basic_machine in
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-cbm
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-cbm
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
@ -320,6 +402,10 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@ -340,16 +426,8 @@ case $basic_machine in
basic_machine=c38-convex
os=-bsd
;;
cray | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[ctj]90-cray)
basic_machine=c90-cray
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
crds | unos)
@ -364,6 +442,14 @@ case $basic_machine in
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
@ -405,6 +491,10 @@ case $basic_machine in
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@ -480,19 +570,19 @@ case $basic_machine in
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[34567]86v4*)
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[34567]86v)
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[34567]86sol2)
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
@ -504,14 +594,6 @@ case $basic_machine in
basic_machine=i386-unknown
os=-vsta
;;
i386-go32 | go32)
basic_machine=i386-unknown
os=-go32
;;
i386-mingw32 | mingw32)
basic_machine=i386-unknown
os=-mingw32
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@ -537,6 +619,10 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
miniframe)
basic_machine=m68000-convergent
;;
@ -544,14 +630,6 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@ -566,8 +644,12 @@ case $basic_machine in
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos)
basic_machine=i386-unknown
basic_machine=i386-pc
os=-msdos
;;
mvs)
@ -631,9 +713,17 @@ case $basic_machine in
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -641,6 +731,10 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@ -663,45 +757,59 @@ case $basic_machine in
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexen)
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
basic_machine=i686-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexen-*)
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=rs6000-ibm
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@ -712,10 +820,22 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sequent)
basic_machine=i386-sequent
;;
@ -723,7 +843,7 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sparclite-wrs)
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@ -790,9 +910,17 @@ case $basic_machine in
os=-dynix
;;
t3e)
basic_machine=t3e-cray
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tic4x | c4x*)
basic_machine=tic4x-unknown
os=-coff
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@ -803,6 +931,10 @@ case $basic_machine in
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
@ -827,8 +959,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@ -849,13 +981,13 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
@ -876,13 +1008,6 @@ case $basic_machine in
op60c)
basic_machine=hppa1.1-oki
;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
@ -892,19 +1017,26 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh3 | sh4)
base_machine=sh-unknown
sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
basic_machine=sh-unknown
;;
sparc | sparcv9)
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
cydra)
basic_machine=cydra-cydrome
;;
orion)
@ -919,9 +1051,8 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
c4x*)
basic_machine=c4x-none
os=-coff
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
@ -979,23 +1110,30 @@ case $os in
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit*)
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -microbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i[34567]86-*)
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=-nto-qnx
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@ -1034,16 +1172,22 @@ case $os in
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
-nova*)
os=-rtmk-nova
;;
-nsk)
-ns2 )
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
@ -1080,8 +1224,8 @@ case $os in
-xenix)
os=-xenix
;;
-*mint | -*MiNT)
os=-mint
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-none)
;;
@ -1114,7 +1258,11 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
pdp11-*)
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
@ -1141,6 +1289,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
@ -1204,25 +1355,25 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
*-gould)
*-gould)
os=-sysv
;;
*-highlevel)
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
*-sgi)
os=-irix
;;
*-siemens)
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f301-fujitsu)
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
@ -1288,7 +1439,7 @@ case $basic_machine in
-ptx*)
vendor=sequent
;;
-vxsim* | -vxworks*)
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
@ -1300,9 +1451,12 @@ case $basic_machine in
-mpw* | -macos*)
vendor=apple
;;
-*mint | -*MiNT)
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
@ -1313,7 +1467,7 @@ exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "version='"
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:

10281
builds/unix/configure vendored

File diff suppressed because it is too large Load Diff

128
builds/unix/configure.ac Normal file
View File

@ -0,0 +1,128 @@
dnl This file is part of the FreeType project.
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT
AC_CONFIG_SRCDIR([ftconfig.in])
dnl configuration file -- stay in 8.3 limit
AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
dnl Don't forget to update VERSION.DLL!
version_info='9:4:3'
AC_SUBST(version_info)
ft_version=`echo $version_info | tr : .`
AC_SUBST(ft_version)
dnl checks for system type
AC_CANONICAL_TARGET([])
dnl checks for programs
AC_PROG_CC
AC_PROG_CPP
dnl get Compiler flags right.
if test "x$CC" = xgcc; then
XX_CFLAGS="-Wall"
XX_ANSIFLAGS="-pedantic -ansi"
else
case "$host" in
*-dec-osf*)
CFLAGS=
XX_CFLAGS="-std1 -g3"
XX_ANSIFLAGS=
;;
*)
XX_CFLAGS=
XX_ANSIFLAGS=
;;
esac
fi
AC_SUBST(XX_CFLAGS)
AC_SUBST(XX_ANSIFLAGS)
AC_CHECK_PROG(RMF, rm, rm -f)
AC_CHECK_PROG(RMDIR, rmdir, rmdir)
dnl Since this file will be finally moved to another directory we make
dnl the path of the install script absolute. This small code snippet has
dnl been taken from automake's `ylwrap' script.
AC_PROG_INSTALL
case "$INSTALL" in
/*)
;;
*/*)
INSTALL="`pwd`/$INSTALL" ;;
esac
dnl checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h)
dnl checks for typedefs, structures, and compiler characteristics
AC_C_CONST
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
dnl checks for library functions
dnl Here we check whether we can use our mmap file component.
AC_FUNC_MMAP
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
else
FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
FT_MUNMAP_DECL
FT_MUNMAP_PARAM
fi
AC_SUBST(FTSYS_SRC)
AC_CHECK_FUNCS(memcpy memmove)
dnl Check for system zlib
AC_ARG_WITH(zlib,
[ --without-zlib use internal zlib instead of system-wide])
if test x$with_zlib != xno && test -z "$LIBZ"; then
AC_CHECK_LIB(z, gzsetparams, [AC_CHECK_HEADER(zlib.h, LIBZ='-lz')])
fi
if test x$with_zlib != xno && test -n "$LIBZ"; then
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
LDFLAGS="$LDFLAGS $LIBZ"
SYSTEM_ZLIB=yes
fi
dnl Whether to use Mac OS resource-based fonts or not
AC_ARG_WITH(old-mac-fonts,
[ --with-old-mac-fonts allow Mac resource-based fonts to be used])
if test x$with_old_mac_fonts = xyes; then
CFLAGS="$CFLAGS -DTARGET_API_MAC_CARBON"
LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \
-Xlinker -framework -Xlinker ApplicationServices"
else
CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
fi
AC_SUBST(LIBZ)
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(SYSTEM_ZLIB)
AC_PROG_LIBTOOL
dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
dnl and 'builds/unix/unix-cc.mk' that will be used by the build system
dnl
AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
unix-def.mk:unix-def.in
freetype-config
freetype2.pc:freetype2.in])
dnl re-generate the Jamfile to use libtool now
dnl
dnl AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
AC_OUTPUT
dnl end of configure.ac

View File

@ -1,74 +0,0 @@
dnl This file is part of the FreeType project.
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT(ftconfig.in)
dnl Configuration file -- stay in 8.3 limit
AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
version_info='6:0:0'
AC_SUBST(version_info)
dnl checks for system type
AC_CANONICAL_SYSTEM
dnl checks for programs
AC_PROG_CC
AC_PROG_CPP
dnl get Compiler flags right.
if test "x$CC" = xgcc; then
XX_CFLAGS="-Wall"
XX_ANSIFLAGS="-pedantic -ansi"
else
case "$host" in
*-dec-osf*)
XX_CFLAGS="-std1 -O2 -g3"
XX_ANSIFLAGS=
;;
*)
XX_CFLAGS=
XX_ANSIFLAGS=
;;
esac
fi
AC_SUBST(XX_CFLAGS)
AC_SUBST(XX_ANSIFLAGS)
AC_CHECK_PROG(RMF, rm, rm -f)
AC_CHECK_PROG(RMDIR, rmdir, rmdir)
AC_PROG_INSTALL
dnl checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h)
dnl checks for typedefs, structures, and compiler characteristics
AC_C_CONST
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
dnl Checks for library functions.
dnl Here we check whether we can use our mmap file component.
AC_FUNC_MMAP
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
FTSYS_SRC='$(BASE_)ftsystem.c'
else
FTSYS_SRC='$(BUILD)/ftsystem.c'
fi
AC_SUBST(FTSYS_SRC)
AC_CHECK_FUNCS(memcpy memmove)
AM_PROG_LIBTOOL
dnl create the Unix-specific sub-Makefile `builds/unix/unix.mk' that will be
dnl used by the build system
dnl
AC_OUTPUT(unix.mk:unix.in)
dnl end of configure.in

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -12,48 +12,79 @@
# indicate that you have read the license and understand and accept it
# fully.
.PHONY: setup
ifeq ($(PLATFORM),ansi)
has_init := $(strip $(wildcard /sbin/init))
ifneq ($(has_init),)
# Note: this test is duplicated in "builds/toplevel.mk".
#
is_unix := $(strip $(wildcard /sbin/init) \
$(wildcard /usr/sbin/init) \
$(wildcard /hurd/auth))
ifneq ($(is_unix),)
PLATFORM := unix
COPY := cp
DELETE := rm -f
# If a Unix platform is detected, the configure script is called and
# `unix.mk' is created.
#
# Arguments to `configure' should be in the CFG variable. Example:
#
# make CFG="--prefix=/usr --disable-static"
#
# If you need to set CFLAGS or LDFLAGS, do it here also.
#
# Feel free to add support for other platform specific compilers in this
# directory (e.g. solaris.mk + changes here to detect the platform).
#
CONFIG_FILE := unix.mk
setup: unix.mk
unix: setup
endif # test is_unix
endif # test PLATFORM ansi
# If `devel' is the requested target, use `-g -O0' as the default value
# for CFLAGS if CFLAGS isn't set.
ifeq ($(PLATFORM),unix)
COPY := cp
DELETE := rm -f
# If `devel' is the requested target, we use a special configuration
# file named `unix-dev.mk'. It disables optimization and libtool.
#
ifneq ($(findstring devel,$(MAKECMDGOALS)),)
CONFIG_FILE := unix-dev.mk
CC := gcc
devel: setup
.PHONY: devel
else
# If `lcc' is the requested target, we use a special configuration
# file named `unix-lcc.mk'. It disables libtool for LCC.
#
ifneq ($(findstring devel,$(MAKECMDGOALS)),)
ifndef CFLAGS
USE_CFLAGS := CFLAGS="-g -O0"
endif
devel: setup
ifneq ($(findstring lcc,$(MAKECMDGOALS)),)
CONFIG_FILE := unix-lcc.mk
CC := lcc
lcc: setup
.PHONY: lcc
else
# If a Unix platform is detected, the configure script is called and
# `unix-def.mk' together with `unix-cc.mk' is created.
#
# Arguments to `configure' should be in the CFG variable. Example:
#
# make CFG="--prefix=/usr --disable-static"
#
# If you need to set CFLAGS or LDFLAGS, do it here also.
#
# Feel free to add support for other platform specific compilers in
# this directory (e.g. solaris.mk + changes here to detect the
# platform).
#
CONFIG_FILE := unix.mk
setup: unix-def.mk
unix: setup
.PHONY: unix
endif
endif
setup: std_setup
setup: std_setup
unix.mk: builds/unix/unix.in
cd builds/unix; $(USE_CFLAGS) ./configure $(CFG)
have_mk := $(strip $(wildcard $(OBJ_DIR)/Makefile))
ifneq ($(have_mk),)
# we are building FT2 not in the src tree
unix-def.mk: $(TOP_DIR)/builds/unix/unix-def.in
$(TOP_DIR)/builds/unix/configure $(CFG)
else
unix-def.mk: $(TOP_DIR)/builds/unix/unix-def.in
cd builds/unix; ./configure $(CFG)
endif
endif # test PLATFORM unix
endif # test Unix
endif # test PLATFORM
# EOF

View File

@ -0,0 +1,104 @@
#! /bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
usage()
{
cat <<EOF
Usage: freetype-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--libtool]
[--cflags]
EOF
exit $1
}
if test $# -eq 0 ; then
usage 1 1>&2
fi
while test $# -gt 0 ; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
local_prefix=yes
;;
--prefix)
echo_prefix=yes
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
local_prefix=yes
;;
--exec-prefix)
echo_exec_prefix=yes
;;
--version)
echo @ft_version@
exit 0
;;
--cflags)
echo_cflags=yes
;;
--libs)
echo_libs=yes
;;
--libtool)
echo_libtool=yes
;;
*)
usage 1 1>&2
;;
esac
shift
done
if test "$local_prefix" = "yes" ; then
if test "$exec_prefix_set" != "yes" ; then
exec_prefix=$prefix
fi
fi
if test "$echo_prefix" = "yes" ; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes" ; then
echo $exec_prefix
fi
if test "$echo_cflags" = "yes" ; then
cflags="-I@includedir@/freetype2"
if test "@includedir@" != "/usr/include" ; then
echo $cflags -I@includedir@
else
echo $cflags
fi
fi
if test "$echo_libs" = "yes" ; then
libs="-lfreetype @LIBZ@"
if test "@libdir@" != "/usr/lib" ; then
echo -L@libdir@ $libs
else
echo $libs
fi
fi
if test "$echo_libtool" = "yes" ; then
convlib="libfreetype.la"
echo @libdir@/$convlib
fi
# EOF

11
builds/unix/freetype2.in Normal file
View File

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: FreeType 2
Description: A free, high-quality, and portable font engine.
Version: @ft_version@
Requires:
Libs: -L${libdir} -lfreetype @LIBZ@
Cflags: -I${includedir}/freetype2

143
builds/unix/freetype2.m4 Normal file
View File

@ -0,0 +1,143 @@
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS
dnl
AC_DEFUN(AC_CHECK_FT2,
[dnl
dnl Get the cflags and libraries from the freetype-config script
dnl
AC_ARG_WITH(ft-prefix,
[ --with-ft-prefix=PREFIX
Prefix where FreeType is installed (optional)],
ft_config_prefix="$withval", ft_config_prefix="")
AC_ARG_WITH(ft-exec-prefix,
[ --with-ft-exec-prefix=PREFIX
Exec prefix where FreeType is installed (optional)],
ft_config_exec_prefix="$withval", ft_config_exec_prefix="")
AC_ARG_ENABLE(freetypetest,
[ --disable-freetypetest Do not try to compile and run
a test FreeType program],
[], enable_fttest=yes)
if test x$ft_config_exec_prefix != x ; then
ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
if test x${FT2_CONFIG+set} != xset ; then
FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
fi
fi
if test x$ft_config_prefix != x ; then
ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
if test x${FT2_CONFIG+set} != xset ; then
FT2_CONFIG=$ft_config_prefix/bin/freetype-config
fi
fi
AC_PATH_PROG(FT2_CONFIG, freetype-config, no)
min_ft_version=ifelse([$1], ,6.1.0,$1)
AC_MSG_CHECKING(for FreeType - version >= $min_ft_version)
no_ft=""
if test "$FT2_CONFIG" = "no" ; then
no_ft=yes
else
FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
ft_min_major_version=`echo $min_ft_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
ft_min_minor_version=`echo $min_ft_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
ft_min_micro_version=`echo $min_ft_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test x$enable_fttest = xyes ; then
ft_config_is_lt=""
if test $ft_config_major_version -lt $ft_min_major_version ; then
ft_config_is_lt=yes
else
if test $ft_config_major_version -eq $ft_min_major_version ; then
if test $ft_config_minor_version -lt $ft_min_minor_version ; then
ft_config_is_lt=yes
else
if test $ft_config_minor_version -eq $ft_min_minor_version ; then
if test $ft_config_micro_version -lt $ft_min_micro_version ; then
ft_config_is_lt=yes
fi
fi
fi
fi
fi
if test x$ft_config_is_lt = xyes ; then
no_ft=yes
else
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $FT2_CFLAGS"
LIBS="$FT2_LIBS $LIBS"
dnl
dnl Sanity checks for the results of freetype-config to some extent
dnl
AC_TRY_RUN([
#include <ft2build.h>
#include FT_FREETYPE_H
#include <stdio.h>
#include <stdlib.h>
int
main()
{
FT_Library library;
FT_Error error;
error = FT_Init_FreeType(&library);
if (error)
return 1;
else
{
FT_Done_FreeType(library);
return 0;
}
}
],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi # test $ft_config_version -lt $ft_min_version
fi # test x$enable_fttest = xyes
fi # test "$FT2_CONFIG" = "no"
if test x$no_ft = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$FT2_CONFIG" = "no" ; then
echo "*** The freetype-config script installed by FreeType 2 could not be found."
echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the FT2_CONFIG environment variable to the"
echo "*** full path to freetype-config."
else
if test x$ft_config_is_lt = xyes ; then
echo "*** Your installed version of the FreeType 2 library is too old."
echo "*** If you have different versions of FreeType 2, make sure that"
echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix"
echo "*** are used, or set the FT2_CONFIG environment variable to the"
echo "*** full path to freetype-config."
else
echo "*** The FreeType test program failed to run. If your system uses"
echo "*** shared libraries and they are installed outside the normal"
echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
echo "*** (or whatever is appropiate for your system) is correctly set."
fi
fi
FT2_CFLAGS=""
FT2_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(FT2_CFLAGS)
AC_SUBST(FT2_LIBS)
])

31
builds/unix/ft-munmap.m4 Normal file
View File

@ -0,0 +1,31 @@
## FreeType specific autoconf tests
# serial 1 FT_MUNMAP_DECL
AC_DEFUN(FT_MUNMAP_DECL,
[AC_MSG_CHECKING([whether munmap must be declared])
AC_CACHE_VAL(ft_cv_munmap_decl,
[AC_TRY_COMPILE([
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/mman.h>],
[char *(*pfn) = (char *(*))munmap],
ft_cv_munmap_decl=no,
ft_cv_munmap_decl=yes)])
AC_MSG_RESULT($ft_cv_munmap_decl)
if test $ft_cv_munmap_decl = yes; then
AC_DEFINE(NEED_MUNMAP_DECL,,
[Define to 1 if munmap() is not defined in <sys/mman.h>])
fi])
AC_DEFUN(FT_MUNMAP_PARAM,
[AC_MSG_CHECKING([for munmap's first parameter type])
AC_TRY_COMPILE([
#include <unistd.h>
#include <sys/mman.h>
int munmap(void *, size_t);],,
AC_MSG_RESULT([void *]);AC_DEFINE(MUNMAP_USES_VOIDP,,
[Define to 1 if the first argument of munmap is of type void *]),
AC_MSG_RESULT([char *]))
])

60
builds/unix/ft2unix.h Normal file
View File

@ -0,0 +1,60 @@
/***************************************************************************/
/* */
/* ft2build.h */
/* */
/* Build macros of the FreeType 2 library. */
/* */
/* Copyright 1996-2001 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. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This is a Unix-specific version of <ft2build.h> that should be used */
/* exclusively *after* installation of the library. */
/* */
/* It assumes that "/usr/local/include/freetype2" (or wathever is */
/* returned by the "freetype-config --cflags" command) is in your */
/* compilation include path. */
/* */
/* We don't need to do anything special in this release. However, for */
/* FreeType 2.1, the following installation changes will be performed: */
/* */
/* - The contents of "freetype-2.1/include/freetype" will be installed */
/* to "/usr/local/include/freetype2" instead of */
/* "/usr/local/include/freetype2/freetype". */
/* */
/* - This file will #include <freetype2/config/ftheader.h>, instead */
/* of <freetype/config/ftheader.h>. */
/* */
/* - The contents of "ftheader.h" will be processed with `sed' to */
/* replace all "<freetype/xxx>" with "<freetype2/xxx>". */
/* */
/* - Adding "/usr/local/include/freetype2" to your compilation include */
/* path will not be necessary anymore. The command */
/* "freetype-config --cflags" will return an empty string. */
/* */
/* - Client applications which adhere to the new inclusion scheme */
/* WILL NOT NEED TO BE MODIFIED to compile with FT 2.1! */
/* */
/*************************************************************************/
#ifndef __FT2_BUILD_UNIX_H__
#define __FT2_BUILD_UNIX_H__
/* "/usr/local/include/freetype2" must be in your current inclusion path */
#include <freetype/config/ftheader.h>
#endif /* __FT2_BUILD_UNIX_H__ */
/* END */

View File

@ -4,7 +4,7 @@
/* */
/* UNIX-specific configuration file (specification only). */
/* */
/* Copyright 1996-2000 by */
/* Copyright 1996-2000, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -34,12 +34,15 @@
/*************************************************************************/
#ifndef FTCONFIG_H
#define FTCONFIG_H
#ifndef __FTCONFIG_H__
#define __FTCONFIG_H__
#include <ft2build.h>
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H
/* Include the header file containing all developer build options */
#include <freetype/config/ftoption.h>
FT_BEGIN_HEADER
/*************************************************************************/
@ -60,7 +63,6 @@
#define SIZEOF_INT 2
#define SIZEOF_LONG 2
#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG
@ -69,8 +71,8 @@
#define FT_ALIGNMENT 8
/* UNUSED is a macro used to indicate that a given parameter is not used */
/* -- this is only used to get rid of unpleasant compiler warnings */
/* FT_UNUSED is a macro used to indicate that a given parameter is not */
/* used -- this is only used to get rid of unpleasant compiler warnings */
#ifndef FT_UNUSED
#define FT_UNUSED( arg ) ( (arg) = (arg) )
#endif
@ -118,7 +120,6 @@
#else
/*************************************************************************/
/* */
/* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
@ -139,34 +140,122 @@
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define LOCAL_DEF static
#define LOCAL_FUNC static
#define FT_LOCAL( x ) static x
#define FT_LOCAL_DEF( x ) static x
#else
#define LOCAL_DEF extern
#define LOCAL_FUNC /* nothing */
#endif
#ifdef FT_MAKE_OPTION_SINGLE_LIBRARY_OBJECT
#define BASE_DEF( x ) static x
#define BASE_FUNC( x ) static x
#ifdef __cplusplus
#define FT_LOCAL( x ) extern "C" x
#define FT_LOCAL_DEF( x ) extern "C" x
#else
#define BASE_DEF( x ) extern x
#define BASE_FUNC( x ) extern x
#define FT_LOCAL( x ) extern x
#define FT_LOCAL_DEF( x ) extern x
#endif
#ifndef FT_EXPORT_DEF
#define FT_EXPORT_DEF( x ) extern x
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
#ifndef FT_BASE
#ifdef __cplusplus
#define FT_BASE( x ) extern "C" x
#else
#define FT_BASE( x ) extern x
#endif
#ifndef FT_EXPORT_FUNC
#define FT_EXPORT_FUNC( x ) extern x
#endif /* !FT_BASE */
#ifndef FT_BASE_DEF
#ifdef __cplusplus
#define FT_BASE_DEF( x ) extern "C" x
#else
#define FT_BASE_DEF( x ) extern x
#endif
#ifndef FT_EXPORT_VAR
#define FT_EXPORT_VAR( x ) extern x
#endif /* !FT_BASE_DEF */
#ifndef FT_EXPORT
#ifdef __cplusplus
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#endif
#endif /* FTCONFIG_H */
#endif /* !FT_EXPORT */
#ifndef FT_EXPORT_DEF
#ifdef __cplusplus
#define FT_EXPORT_DEF( x ) extern "C" x
#else
#define FT_EXPORT_DEF( x ) extern x
#endif
#endif /* !FT_EXPORT_DEF */
#ifndef FT_EXPORT_VAR
#ifdef __cplusplus
#define FT_EXPORT_VAR( x ) extern "C" x
#else
#define FT_EXPORT_VAR( x ) extern x
#endif
#endif /* !FT_EXPORT_VAR */
/* The following macros are needed to compile the library with a */
/* C++ compiler and with 16bit compilers. */
/* */
/* This is special. Within C++, you must specify `extern "C"' for */
/* functions which are used via function pointers, and you also */
/* must do that for structures which contain function pointers to */
/* assure C linkage -- it's not possible to have (local) anonymous */
/* functions which are accessed by (global) function pointers. */
/* */
/* */
/* FT_CALLBACK_DEF is used to _define_ a callback function. */
/* */
/* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
/* contains pointers to callback functions. */
/* */
/* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
/* that contains pointers to callback functions. */
/* */
/* */
/* Some 16bit compilers have to redefine these macros to insert */
/* the infamous `_cdecl' or `__fastcall' declarations. */
/* */
#ifndef FT_CALLBACK_DEF
#ifdef __cplusplus
#define FT_CALLBACK_DEF( x ) extern "C" x
#else
#define FT_CALLBACK_DEF( x ) static x
#endif
#endif /* FT_CALLBACK_DEF */
#ifndef FT_CALLBACK_TABLE
#ifdef __cplusplus
#define FT_CALLBACK_TABLE extern "C"
#define FT_CALLBACK_TABLE_DEF extern "C"
#else
#define FT_CALLBACK_TABLE extern
#define FT_CALLBACK_TABLE_DEF /* nothing */
#endif
#endif /* FT_CALLBACK_TABLE */
FT_END_HEADER
#endif /* __FTCONFIG_H__ */
/* END */

View File

@ -4,7 +4,7 @@
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2000 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -16,18 +16,16 @@
/***************************************************************************/
#include <ft2build.h>
/* we use our special ftconfig.h file, not the standard one */
#include <ftconfig.h>
#include <freetype/internal/ftdebug.h>
#include <freetype/ftsystem.h>
#include <freetype/fterrors.h>
#include <freetype/fttypes.h>
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H
#include FT_INTERNAL_OBJECTS_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* memory-mapping includes and definitions */
/* memory-mapping includes and definitions */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -37,17 +35,29 @@
#define MAP_FILE 0x00
#endif
/*************************************************************************/
/* */
/* The prototype for munmap() is not provided on SunOS. This needs to */
/* have a check added later to see if the GNU C library is being used. */
/* If so, then this prototype is not needed. */
/* */
#if defined( __sun__ ) && !defined( SVR4 ) && !defined( __SVR4 )
extern int munmap( caddr_t addr,
int len );
#ifdef MUNMAP_USES_VOIDP
#define MUNMAP_ARG_CAST void *
#else
#define MUNMAP_ARG_CAST char *
#endif
#ifdef NEED_MUNMAP_DECL
#ifdef __cplusplus
extern "C"
#else
extern
#endif
int
munmap( char* addr,
int len );
#define MUNMAP_ARG_CAST char *
#endif /* NEED_DECLARATION_MUNMAP */
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_FCNTL_H
@ -76,14 +86,15 @@
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* size :: The requested size in bytes. */
/* */
/* <Return> */
/* block :: The address of newly allocated block. */
/* The address of newly allocated block. */
/* */
static
void* ft_alloc( FT_Memory memory,
long size )
FT_CALLBACK_DEF( void* )
ft_alloc( FT_Memory memory,
long size )
{
FT_UNUSED( memory );
@ -111,11 +122,11 @@
/* <Return> */
/* The address of the reallocated memory block. */
/* */
static
void* ft_realloc( FT_Memory memory,
long cur_size,
long new_size,
void* block )
FT_CALLBACK_DEF( void* )
ft_realloc( FT_Memory memory,
long cur_size,
long new_size,
void* block )
{
FT_UNUSED( memory );
FT_UNUSED( cur_size );
@ -133,13 +144,13 @@
/* The memory release function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* memory :: A pointer to the memory object. */
/* */
/* block :: The address of block in memory to be freed. */
/* block :: The address of block in memory to be freed. */
/* */
static
void ft_free( FT_Memory memory,
void* block )
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
void* block )
{
FT_UNUSED( memory );
@ -179,36 +190,22 @@
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
static
void ft_close_stream( FT_Stream stream )
FT_CALLBACK_DEF( void )
ft_close_stream( FT_Stream stream )
{
munmap ( stream->descriptor.pointer, stream->size );
munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = 0;
}
/*************************************************************************/
/* */
/* <Function> */
/* FT_New_Stream */
/* */
/* <Description> */
/* Creates a new stream object. */
/* */
/* <Input> */
/* filepathname :: The name of the stream (usually a file) to be */
/* opened. */
/* */
/* stream :: A pointer to the stream object. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
FT_EXPORT_FUNC( FT_Error ) FT_New_Stream( const char* filepathname,
FT_Stream stream )
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( FT_Error )
FT_Stream_Open( FT_Stream stream,
const char* filepathname )
{
int file;
struct stat stat_buf;
@ -221,30 +218,43 @@
file = open( filepathname, O_RDONLY );
if ( file < 0 )
{
FT_ERROR(( "FT_New_Stream:" ));
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
/* Here we ensure that a "fork" will _not_ duplicate */
/* our opened input streams on Unix. This is critical */
/* since it avoids some (possible) access control */
/* issues and cleans up the kernel file table a bit. */
/* */
#ifdef F_SETFD
#ifdef FD_CLOEXEC
(void)fcntl( file, F_SETFD, FD_CLOEXEC );
#else
(void)fcntl( file, F_SETFD, 1 );
#endif /* FD_CLOEXEC */
#endif /* F_SETFD */
if ( fstat( file, &stat_buf ) < 0 )
{
FT_ERROR(( "FT_New_Stream:" ));
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `fstat' file `%s'\n", filepathname ));
goto Fail_Map;
}
stream->size = stat_buf.st_size;
stream->pos = 0;
stream->base = mmap( NULL,
stream->size,
PROT_READ,
MAP_FILE | MAP_PRIVATE,
file,
0 );
stream->base = (unsigned char *)mmap( NULL,
stream->size,
PROT_READ,
MAP_FILE | MAP_PRIVATE,
file,
0 );
if ( (long)stream->base == -1 )
{
FT_ERROR(( "FT_New_Stream:" ));
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
goto Fail_Map;
}
@ -253,42 +263,45 @@
stream->descriptor.pointer = stream->base;
stream->pathname.pointer = (char*)filepathname;
stream->close = ft_close_stream;
stream->read = 0;
FT_TRACE1(( "FT_New_Stream:" ));
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;
Fail_Map:
close( file );
stream->base = NULL;
stream->size = 0;
stream->pos = 0;
return FT_Err_Cannot_Open_Stream;
}
/*************************************************************************/
/* */
/* <Function> */
/* FT_New_Memory */
/* */
/* <Description> */
/* Creates a new memory object. */
/* */
/* <Return> */
/* A pointer to the new memory object. 0 in case of error. */
/* */
FT_EXPORT_FUNC( FT_Memory ) FT_New_Memory( void )
#ifdef FT_DEBUG_MEMORY
extern FT_Int
ft_mem_debug_init( FT_Memory memory );
extern void
ft_mem_debug_done( FT_Memory memory );
#endif
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( FT_Memory )
FT_New_Memory( void )
{
FT_Memory memory;
memory = (FT_Memory)malloc( sizeof ( *memory ) );
if ( memory )
@ -297,10 +310,25 @@
memory->alloc = ft_alloc;
memory->realloc = ft_realloc;
memory->free = ft_free;
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_init( memory );
#endif
}
return memory;
}
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( void )
FT_Done_Memory( FT_Memory memory )
{
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_done( memory );
#endif
memory->free( memory, memory );
}
/* END */

View File

@ -1,9 +1,11 @@
#! /bin/sh
#
#!/bin/sh
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# This originally came from X11R5 (mit/util/scripts/install.sh).
scriptversion=2003-01-17.15
# Copyright 1991 by the Massachusetts Institute of Technology
# (FSF changes in the public domain.)
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
@ -23,13 +25,11 @@
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@ -41,210 +41,229 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
transformbasename=
transform_arg=
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
src=
dst=
dir_arg=
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
or: $0 -d DIR1 DIR2...
-d) dir_arg=true
shift
continue;;
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
In the second, create the directory path DIR.
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
Options:
-b=TRANSFORMBASENAME
-c copy source (using $cpprog) instead of moving (using $mvprog).
-d create directories instead of installing files.
-g GROUP $chgrp installed files to GROUP.
-m MODE $chmod installed files to MODE.
-o USER $chown installed files to USER.
-s strip installed files (using $stripprog).
-t=TRANSFORM
--help display this help and exit.
--version display version info and exit.
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
while test -n "$1"; do
case $1 in
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-c) instcmd=$cpprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-d) dir_arg=true
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
--help) echo "$usage"; exit 0;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
--version) echo "$0 $scriptversion"; exit 0;;
*) if test -z "$src"; then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
if test -z "$src"; then
echo "$0: no input file specified." >&2
exit 1
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
instcmd=:
chmodcmd=
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test -z "$dst"; then
echo "$0: no destination specified." >&2
exit 1
fi
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
dst=$dst/`basename "$src"`
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# (this part is taken from Noah Friedman's mkinstalldirs script.)
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
pathcomp=
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
test -d "$pathcomp" || $mkdirprog "$pathcomp"
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if test -n "$dir_arg"; then
$doit $instcmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if test -z "$transformarg"; then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename \
| sed $transformarg`$transformbasename
fi
# If we're going to rename the final executable, determine the name now.
# don't allow the sed command to completely eliminate the filename.
test -z "$dstfile" && dstfile=`basename "$dst"`
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# don't allow the sed command to completely eliminate the filename
# Trap to clean up those temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# Make a temp file name in the proper directory.
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
# Now remove or move aside any old file at destination location. We
# try this two ways since rm can't unlink itself on some systems and
# the destination file might be busy for other reasons. In this case,
# the final cleanup might fail but the new file should still install
# successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

98
builds/unix/install.mk Normal file
View File

@ -0,0 +1,98 @@
#
# FreeType 2 installation instructions for Unix systems
#
# Copyright 1996-2000, 2002, 2003 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.
# If you say
#
# make install DESTDIR=/tmp/somewhere/
#
# don't forget the final backslash (this command is mainly for package
# maintainers).
.PHONY: install uninstall check
# Unix installation and deinstallation targets.
install: $(PROJECT_LIBRARY)
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
$(DESTDIR)$(libdir)/pkgconfig \
$(DESTDIR)$(includedir)/freetype2/freetype/config \
$(DESTDIR)$(includedir)/freetype2/freetype/internal \
$(DESTDIR)$(includedir)/freetype2/freetype/cache \
$(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)/aclocal
$(LIBTOOL) --mode=install $(INSTALL) \
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
-for P in $(PUBLIC_H) ; do \
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype ; \
done
-for P in $(BASE_H) ; do \
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/internal ; \
done
-for P in $(CONFIG_H) ; do \
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
done
-for P in $(CACHE_H) ; do \
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/cache ; \
done
$(INSTALL_DATA) $(BUILD_DIR)/ft2unix.h \
$(DESTDIR)$(includedir)/ft2build.h
$(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
$(DESTDIR)$(bindir)/freetype-config
$(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
$(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
$(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
uninstall:
-$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(LIBRARY).$A
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/cache/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/cache
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/config/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/config
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/internal/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/internal
-$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/*
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
-$(DELETE) $(DESTDIR)$(bindir)/freetype-config
-$(DELETE) $(DESTDIR)$(datadir)/aclocal/freetype2.m4
-$(DELETE) $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
check:
@echo There is no validation suite for this package.
.PHONY: clean_project_unix distclean_project_unix
# Unix cleaning and distclean rules.
#
clean_project_unix:
-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
-$(DELETE) $(patsubst %.$O,%.$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \
$(CLEAN)
distclean_project_unix: clean_project_unix
-$(DELETE) $(PROJECT_LIBRARY)
-$(DELETE) $(OBJ_DIR)/.libs/*
-$(DELDIR) $(OBJ_DIR)/.libs
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
# EOF

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

111
builds/unix/mkinstalldirs Normal file
View File

@ -0,0 +1,111 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here

97
builds/unix/unix-cc.in Normal file
View File

@ -0,0 +1,97 @@
#
# FreeType 2 template for Unix-specific compiler definitions
#
# Copyright 1996-2000, 2002, 2003 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.
CC := @CC@
COMPILER_SEP := $(SEP)
ifndef LIBTOOL
LIBTOOL := $(BUILD_DIR)/libtool
endif
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := lo
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := la
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := lib$(PROJECT)
# 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 := -o$(space)
# C flags
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS := -c @XX_CFLAGS@ @CPPFLAGS@ @CFLAGS@
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := @XX_ANSIFLAGS@
# C compiler to use -- we use libtool!
#
#
CCraw := $(CC)
CC := $(LIBTOOL) --mode=compile $(CCraw)
# Linker flags.
#
LDFLAGS := @LDFLAGS@
# Library linking
#
LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
-rpath $(libdir) -version-info $(version_info) \
$(LDFLAGS)
# EOF

100
builds/unix/unix-def.in Normal file
View File

@ -0,0 +1,100 @@
#
# FreeType 2 configuration rules templates for Unix + configure
#
# Copyright 1996-2000, 2002 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 TOP_DIR
TOP_DIR := .
endif
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
DELETE := @RMF@
DELDIR := @RMDIR@
SEP := /
BUILD_DIR := $(TOP_DIR)/builds/unix
PLATFORM := unix
# this is used for `make distclean' and `make install'
ifndef OBJ_BUILD
OBJ_BUILD := $(BUILD_DIR)
endif
# don't use `:=' here since the path stuff will be included after this file
#
FTSYS_SRC = @FTSYS_SRC@
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
INSTALL_PROGRAM := @INSTALL_PROGRAM@
INSTALL_SCRIPT := @INSTALL_SCRIPT@
MKINSTALLDIRS := $(BUILD_DIR)/mkinstalldirs
DISTCLEAN += $(OBJ_BUILD)/config.cache \
$(OBJ_BUILD)/config.log \
$(OBJ_BUILD)/config.status \
$(OBJ_BUILD)/unix-def.mk \
$(OBJ_BUILD)/unix-cc.mk \
$(OBJ_BUILD)/ftconfig.h \
$(OBJ_BUILD)/freetype-config \
$(OBJ_BUILD)/freetype2.pc \
$(LIBTOOL) \
$(OBJ_BUILD)/Makefile
# Standard installation variables.
#
prefix := @prefix@
exec_prefix := @exec_prefix@
libdir := @libdir@
bindir := @bindir@
includedir := @includedir@
datadir := @datadir@
version_info := @version_info@
# The directory where all object files are placed.
#
# This lets you build the library in your own directory with something like
#
# set TOP_DIR=.../path/to/freetype2/top/dir...
# set OBJ_DIR=.../path/to/obj/dir
# make -f $TOP_DIR/Makefile setup [options]
# make -f $TOP_DIR/Makefile
#
ifndef OBJ_DIR
OBJ_DIR := $(shell cd $(TOP_DIR)/objs; pwd)
endif
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The SYSTEM_ZLIB macro is defined if the user wishes to link dynamically
# with its system wide zlib. If SYSTEM_ZLIB is 'yes', the zlib part of the
# ftgzip module is not compiled in.
SYSTEM_ZLIB := @SYSTEM_ZLIB@
# The NO_OUTPUT macro is appended to command lines in order to ignore
# the output of some programs.
#
NO_OUTPUT := 2> /dev/null
# EOF

26
builds/unix/unix-dev.mk Normal file
View File

@ -0,0 +1,26 @@
#
# FreeType 2 Configuration rules for Unix + GCC
#
# Development version without optimizations & libtool
# and no installation.
#
# Copyright 1996-2000, 2003 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.
include $(TOP_DIR)/builds/unix/unixddef.mk
BUILD_DIR := $(TOP_DIR)/devel
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
include $(TOP_DIR)/builds/link_std.mk
# EOF

24
builds/unix/unix-lcc.mk Normal file
View File

@ -0,0 +1,24 @@
#
# FreeType 2 Configuration rules for Unix + LCC
#
# Development version without optimizations & libtool
# and no installation.
#
# 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.
include $(TOP_DIR)/builds/unix/unixddef.mk
include $(TOP_DIR)/builds/compiler/unix-lcc.mk
include $(TOP_DIR)/builds/link_std.mk
# EOF

View File

@ -1,216 +0,0 @@
#
# FreeType 2 configuration rules templates for Unix + configure
#
# 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 TOP
TOP := .
endif
DELETE := @RMF@
DELDIR := @RMDIR@
SEP := /
HOSTSEP := $(SEP)
BUILD := $(TOP)/builds/unix
PLATFORM := unix
CC := @CC@
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
MKINSTALLDIRS := $(BUILD)/mkinstalldirs
LIBTOOL := $(BUILD)/libtool
# don't use `:=' here since the path stuff will be included after this file
#
FTSYS_SRC = @FTSYS_SRC@
DISTCLEAN += $(BUILD)/config.cache \
$(BUILD)/config.log \
$(BUILD)/config.status \
$(BUILD)/unix.mk \
$(BUILD)/ftconfig.h \
$(LIBTOOL)
# Standard installation variables.
#
prefix := @prefix@
exec_prefix := @exec_prefix@
libdir := @libdir@
bindir := @bindir@
includedir := @includedir@
version_info := @version_info@
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f $TOP/Makefile setup [options]
# make -f $TOP/Makefile
#
OBJ_DIR := obj
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := lo
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := la
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := libfreetype
# 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 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 := -o # Don't remove this comment line! We need the space after `-o'.
# C flags
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS := -c @XX_CFLAGS@ @CFLAGS@
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := @XX_ANSIFLAGS@
# C compiler to use -- we use libtool!
#
#
CCraw := $(CC)
CC := $(LIBTOOL) --mode=compile $(CCraw)
# Linker flags.
#
LDFLAGS := @LDFLAGS@
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_unix
distclean_freetype: distclean_freetype_unix
# Unix installation and deinstallation targets.
install: $(FT_LIBRARY)
$(MKINSTALLDIRS) $(libdir) \
$(includedir)/freetype/config \
$(includedir)/freetype/internal
$(LIBTOOL) --mode=install $(INSTALL) $(FT_LIBRARY) $(libdir)
-for P in $(PUBLIC_H) ; do \
$(INSTALL_DATA) $$P $(includedir)/freetype ; \
done
-for P in $(BASE_H) ; do \
$(INSTALL_DATA) $$P $(includedir)/freetype/internal ; \
done
-for P in $(CONFIG_H) ; do \
$(INSTALL_DATA) $$P $(includedir)/freetype/config ; \
done
uninstall:
-$(LIBTOOL) --mode=uninstall $(RM) $(libdir)/$(LIBRARY).$A
-$(DELETE) $(includedir)/freetype/config/*
-$(DELDIR) $(includedir)/freetype/config
-$(DELETE) $(includedir)/freetype/internal/*
-$(DELDIR) $(includedir)/freetype/internal
-$(DELETE) $(includedir)/freetype/*
-$(DELDIR) $(includedir)/freetype
# Unix cleaning and distclean rules.
#
clean_freetype_unix:
-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
-$(DELETE) $(subst $O,$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \
$(CLEAN)
distclean_freetype_unix: clean_freetype_unix
-$(DELETE) $(FT_LIBRARY)
-$(DELETE) $(OBJ_DIR)/.libs/*
-$(DELDIR) $(OBJ_DIR)/.libs
-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
# Librarian to use to build the library
#
FT_LIBRARIAN := $(LIBTOOL) --mode=link $(CCraw)
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
$(FT_LIBRARIAN) -o $@ $(OBJECTS_LIST) \
-rpath $(libdir) -version-info $(version_info)
endif
# EOF

57
builds/unix/unix.mk Normal file
View File

@ -0,0 +1,57 @@
#
# FreeType 2 configuration rules for UNIX platforms
#
# Copyright 1996-2000, 2002 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.
have_mk := $(strip $(wildcard $(TOP_DIR)/builds/unix/unix-def.mk))
ifneq ($(have_mk),)
include $(TOP_DIR)/builds/unix/unix-def.mk
include $(TOP_DIR)/builds/unix/unix-cc.mk
else
# we are building FT2 not in the src tree
include $(OBJ_DIR)/unix-def.mk
include $(OBJ_DIR)/unix-cc.mk
endif
ifdef BUILD_PROJECT
.PHONY: clean_project distclean_project
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP_DIR)/builds/$(PROJECT).mk
# The cleanup targets.
#
clean_project: clean_project_unix
distclean_project: distclean_project_unix
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(PROJECT_LIBRARY): $(OBJECTS_LIST)
ifdef CLEAN_LIBRARY
-$(CLEAN_LIBRARY) $(NO_OUTPUT)
endif
$(LINK_LIBRARY)
endif
include $(TOP_DIR)/builds/unix/install.mk
# EOF

55
builds/unix/unixddef.mk Normal file
View File

@ -0,0 +1,55 @@
#
# FreeType 2 configuration rules templates for
# development under Unix with no configure script (gcc only)
#
# Copyright 1996-2000, 2003 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 TOP_DIR
TOP_DIR := .
endif
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
DELETE := rm -f
SEP := /
# we use a special devel ftoption.h
BUILD_DIR := $(TOP_DIR)/devel
# do not set the platform to `unix', or libtool will trick you
PLATFORM := unixdev
# The directory where all object files are placed.
#
ifndef OBJ_DIR
OBJ_DIR := $(shell cd $(TOP_DIR)/objs; pwd)
endif
# library file name
#
LIBRARY := lib$(PROJECT)
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
NO_OUTPUT := 2> /dev/null
# EOF

238
builds/vms/ftconfig.h Normal file
View File

@ -0,0 +1,238 @@
/***************************************************************************/
/* */
/* ftconfig.h */
/* */
/* VMS-specific configuration file (specification only). */
/* */
/* Copyright 1996-2001, 2002 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. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This header file contains a number of macro definitions that are used */
/* by the rest of the engine. Most of the macros here are automatically */
/* determined at compile time, and you should not need to change it to */
/* port FreeType, except to compile the library with a non-ANSI */
/* compiler. */
/* */
/* Note however that if some specific modifications are needed, we */
/* advise you to place a modified copy in your build directory. */
/* */
/* The build directory is usually `freetype/builds/<system>', and */
/* contains system-specific files that are always included first when */
/* building the library. */
/* */
/*************************************************************************/
#ifndef FTCONFIG_H
#define FTCONFIG_H
/* Include the header file containing all developer build options */
#include <ft2build.h>
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H
FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* PLATFORM-SPECIFIC CONFIGURATION MACROS */
/* */
/* These macros can be toggled to suit a specific system. The current */
/* ones are defaults used to compile FreeType in an ANSI C environment */
/* (16bit compilers are also supported). Copy this file to your own */
/* `freetype/builds/<system>' directory, and edit it to port the engine. */
/* */
/*************************************************************************/
#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define FT_SIZEOF_INT 4
#define FT_SIZEOF_LONG 4
/* Preferred alignment of data */
#define FT_ALIGNMENT 8
/* FT_UNUSED is a macro used to indicate that a given parameter is not */
/* used -- this is only used to get rid of unpleasant compiler warnings */
#ifndef FT_UNUSED
#define FT_UNUSED( arg ) ( (arg) = (arg) )
#endif
/*************************************************************************/
/* */
/* AUTOMATIC CONFIGURATION MACROS */
/* */
/* These macros are computed from the ones defined above. Don't touch */
/* their definition, unless you know precisely what you are doing. No */
/* porter should need to mess with them. */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* IntN types */
/* */
/* Used to guarantee the size of some specific integers. */
/* */
typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
#if FT_SIZEOF_INT == 4
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
#elif FT_SIZEOF_LONG == 4
typedef signed long FT_Int32;
typedef unsigned long FT_UInt32;
#else
#error "no 32bit type found -- please check your configuration files"
#endif
#if FT_SIZEOF_LONG == 8
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
#define FT_INT64 long
#else
/*************************************************************************/
/* */
/* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
/* activate it by defining the FTCALC_USE_LONG_LONG macro in */
/* `ftoption.h'. */
/* */
/* Note that this will produce many -ansi warnings during library */
/* compilation, and that in many cases, the generated code will be */
/* neither smaller nor faster! */
/* */
#ifdef FTCALC_USE_LONG_LONG
#define FT_LONG64
#define FT_INT64 long long
#endif /* FTCALC_USE_LONG_LONG */
#endif /* FT_SIZEOF_LONG == 8 */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
#define FT_LOCAL( x ) static x
#define FT_LOCAL_DEF( x ) static x
#else
#ifdef __cplusplus
#define FT_LOCAL( x ) extern "C" x
#define FT_LOCAL_DEF( x ) extern "C" x
#else
#define FT_LOCAL( x ) extern x
#define FT_LOCAL_DEF( x ) x
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
#ifndef FT_BASE
#ifdef __cplusplus
#define FT_BASE( x ) extern "C" x
#else
#define FT_BASE( x ) extern x
#endif
#endif /* !FT_BASE */
#ifndef BASE_DEF
#ifdef __cplusplus
#define BASE_DEF( x ) extern "C" x
#else
#define BASE_DEF( x ) extern x
#endif
#endif /* !BASE_DEF */
#ifndef FT_EXPORT
#ifdef __cplusplus
#define FT_EXPORT( x ) extern "C" x
#else
#define FT_EXPORT( x ) extern x
#endif
#endif /* !FT_EXPORT */
#ifndef FT_EXPORT_DEF
#ifdef __cplusplus
#define FT_EXPORT_DEF( x ) extern "C" x
#else
#define FT_EXPORT_DEF( x ) extern x
#endif
#endif /* !FT_EXPORT_DEF */
#ifndef FT_EXPORT_VAR
#ifdef __cplusplus
#define FT_EXPORT_VAR( x ) extern "C" x
#else
#define FT_EXPORT_VAR( x ) extern x
#endif
#endif /* !FT_EXPORT_VAR */
/* This is special. Within C++, you must specify `extern "C"' for */
/* functions which are used via function pointers, and you also */
/* must do that for structures which contain function pointers to */
/* assure C linkage -- it's not possible to have (local) anonymous */
/* functions which are accessed by (global) function pointers. */
/* */
#ifdef __cplusplus
#define FT_CALLBACK_DEF( x ) extern "C" x
#define FT_CALLBACK_TABLE extern "C"
#define FT_CALLBACK_TABLE_DEF extern "C"
#else
#define FT_CALLBACK_DEF( x ) static x
#define FT_CALLBACK_TABLE extern
#define FT_CALLBACK_TABLE_DEF
#endif /* __cplusplus */
FT_END_HEADER
#endif /* FTCONFIG_H */
/* END */

321
builds/vms/ftsystem.c Normal file
View File

@ -0,0 +1,321 @@
/***************************************************************************/
/* */
/* ftsystem.c */
/* */
/* VMS-specific FreeType low-level system interface (body). */
/* */
/* Copyright 1996-2001, 2002 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. */
/* */
/***************************************************************************/
#include <ft2build.h>
/* we use our special ftconfig.h file, not the standard one */
#include <ftconfig.h>
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
#include FT_TYPES_H
#include FT_INTERNAL_OBJECTS_H
/* memory-mapping includes and definitions */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/mman.h>
#ifndef MAP_FILE
#define MAP_FILE 0x00
#endif
#ifdef MUNMAP_USES_VOIDP
#define MUNMAP_ARG_CAST void *
#else
#define MUNMAP_ARG_CAST char *
#endif
#ifdef NEED_MUNMAP_DECL
#ifdef __cplusplus
extern "C"
#else
extern
#endif
int
munmap( char* addr,
int len );
#define MUNMAP_ARG_CAST char *
#endif /* NEED_DECLARATION_MUNMAP */
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*************************************************************************/
/* */
/* MEMORY MANAGEMENT INTERFACE */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* <Function> */
/* ft_alloc */
/* */
/* <Description> */
/* The memory allocation function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* size :: The requested size in bytes. */
/* */
/* <Return> */
/* The address of newly allocated block. */
/* */
FT_CALLBACK_DEF( void* )
ft_alloc( FT_Memory memory,
long size )
{
FT_UNUSED( memory );
return malloc( size );
}
/*************************************************************************/
/* */
/* <Function> */
/* ft_realloc */
/* */
/* <Description> */
/* The memory reallocation function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* cur_size :: The current size of the allocated memory block. */
/* */
/* new_size :: The newly requested size in bytes. */
/* */
/* block :: The current address of the block in memory. */
/* */
/* <Return> */
/* The address of the reallocated memory block. */
/* */
FT_CALLBACK_DEF( void* )
ft_realloc( FT_Memory memory,
long cur_size,
long new_size,
void* block )
{
FT_UNUSED( memory );
FT_UNUSED( cur_size );
return realloc( block, new_size );
}
/*************************************************************************/
/* */
/* <Function> */
/* ft_free */
/* */
/* <Description> */
/* The memory release function. */
/* */
/* <Input> */
/* memory :: A pointer to the memory object. */
/* */
/* block :: The address of block in memory to be freed. */
/* */
FT_CALLBACK_DEF( void )
ft_free( FT_Memory memory,
void* block )
{
FT_UNUSED( memory );
free( block );
}
/*************************************************************************/
/* */
/* RESOURCE MANAGEMENT INTERFACE */
/* */
/*************************************************************************/
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
/* messages during execution. */
/* */
#undef FT_COMPONENT
#define FT_COMPONENT trace_io
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
/*************************************************************************/
/* */
/* <Function> */
/* ft_close_stream */
/* */
/* <Description> */
/* The function to close a stream. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
FT_CALLBACK_DEF( void )
ft_close_stream( FT_Stream stream )
{
munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
stream->descriptor.pointer = NULL;
stream->size = 0;
stream->base = 0;
}
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( FT_Error )
FT_Stream_Open( FT_Stream stream,
const char* filepathname )
{
int file;
struct stat stat_buf;
if ( !stream )
return FT_Err_Invalid_Stream_Handle;
/* open the file */
file = open( filepathname, O_RDONLY );
if ( file < 0 )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}
if ( fstat( file, &stat_buf ) < 0 )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `fstat' file `%s'\n", filepathname ));
goto Fail_Map;
}
stream->size = stat_buf.st_size;
stream->pos = 0;
stream->base = (unsigned char *)mmap( NULL,
stream->size,
PROT_READ,
MAP_FILE | MAP_PRIVATE,
file,
0 );
if ( (long)stream->base == -1 )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
goto Fail_Map;
}
close( file );
stream->descriptor.pointer = stream->base;
stream->pathname.pointer = (char*)filepathname;
stream->close = ft_close_stream;
stream->read = 0;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;
Fail_Map:
close( file );
stream->base = NULL;
stream->size = 0;
stream->pos = 0;
return FT_Err_Cannot_Open_Stream;
}
#ifdef FT_DEBUG_MEMORY
extern FT_Int
ft_mem_debug_init( FT_Memory memory );
extern void
ft_mem_debug_done( FT_Memory memory );
#endif
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( FT_Memory )
FT_New_Memory( void )
{
FT_Memory memory;
memory = (FT_Memory)malloc( sizeof ( *memory ) );
if ( memory )
{
memory->user = 0;
memory->alloc = ft_alloc;
memory->realloc = ft_realloc;
memory->free = ft_free;
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_init( memory );
#endif
}
return memory;
}
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( void )
FT_Done_Memory( FT_Memory memory )
{
#ifdef FT_DEBUG_MEMORY
ft_mem_debug_done( memory );
#endif
memory->free( memory, memory );
}
/* END */

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,6 +13,9 @@
# fully.
.PHONY: setup
ifeq ($(PLATFORM),ansi)
# Detecting Windows NT is easy, as the OS variable must be defined and
@ -20,6 +23,7 @@ ifeq ($(PLATFORM),ansi)
# work...
#
ifeq ($(OS),Windows_NT)
is_windows := 1
# We test for the COMSPEC environment variable, then run the `ver'
@ -36,55 +40,108 @@ ifeq ($(PLATFORM),ansi)
ifdef is_windows
PLATFORM := win32
DELETE := del
COPY := copy
CONFIG_FILE := w32-gcc.mk # gcc Makefile by default
SEP := /
ifeq ($(firstword $(CC)),cc)
CC := gcc
endif
endif
endif # test PLATFORM ansi
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
CONFIG_FILE := w32-vcc.mk
SEP := $(BACKSLASH)
CC := cl
visualc: setup
endif
ifeq ($(PLATFORM),win32)
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := w32-wat.mk
SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
endif
DELETE := del
COPY := copy
SEP := $(BACKSLASH)
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
SEP := $(BACKSLASH)
CC := icc
visualage: setup
endif
# gcc Makefile by default
CONFIG_FILE := w32-gcc.mk
ifeq ($(firstword $(CC)),cc)
CC := gcc
endif
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
CONFIG_FILE := w32-lcc.mk
SEP := $(BACKSLASH)
CC := lcc
lcc: setup
endif
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-dev.mk
CC := gcc
SEP := /
devel: setup
endif
ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target
dump_target_list:
@echo ÿ
@echo $(PROJECT_TITLE) build system -- supported compilers
@echo ÿ
@echo Several command-line compilers are supported on Win32:
@echo ÿ
@echo ÿÿmake setupÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿgcc (with Mingw)
@echo ÿÿmake setup visualcÿÿÿÿÿÿÿÿÿÿÿÿÿMicrosoft Visual C++
@echo ÿÿmake setup bcc32ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBorland C/C++
@echo ÿÿmake setup lccÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWin32-LCC
@echo ÿÿmake setup intelcÿÿÿÿÿÿÿÿÿÿÿÿÿÿIntel C/C++
@echo ÿ
setup: dump_target_list
.PHONY: dump_target_list list
else
setup: dos_setup
endif
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
CONFIG_FILE := w32-vcc.mk
CC := cl
visualc: setup
.PHONY: visualc
endif
ifneq ($(findstring intelc,$(MAKECMDGOALS)),) # Intel C/C++
CONFIG_FILE := w32-intl.mk
CC := cl
visualc: setup
.PHONY: intelc
endif
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := w32-wat.mk
CC := wcc386
watcom: setup
.PHONY: watcom
endif
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
CC := icc
visualage: setup
.PHONY: visualage
endif
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
CONFIG_FILE := w32-lcc.mk
CC := lcc
lcc: setup
.PHONY: lcc
endif
ifneq ($(findstring mingw32,$(MAKECMDGOALS)),) # mingw32
CONFIG_FILE := w32-mingw32.mk
CC := gcc
mingw32: setup
.PHONY: mingw32
endif
ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++
CONFIG_FILE := w32-bcc.mk
CC := bcc32
bcc32: setup
.PHONY: bcc32
endif
ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-bccd.mk
CC := bcc32
devel-bcc: setup
.PHONY: devel-bcc
endif
ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-dev.mk
CC := gcc
devel-gcc: setup
.PHONY: devel-gcc
endif
endif # test PLATFORM win32
endif # test is_windows
endif # test PLATFORM
# EOF

211
builds/win32/ftdebug.c Normal file
View File

@ -0,0 +1,211 @@
/***************************************************************************/
/* */
/* ftdebug.c */
/* */
/* Debugging and logging component for Win32 (body). */
/* */
/* Copyright 1996-2001, 2002 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. */
/* */
/***************************************************************************/
/*************************************************************************/
/* */
/* This component contains various macros and functions used to ease the */
/* debugging of the FreeType engine. Its main purpose is in assertion */
/* checking, tracing, and error detection. */
/* */
/* There are now three debugging modes: */
/* */
/* - trace mode */
/* */
/* Error and trace messages are sent to the log file (which can be the */
/* standard error output). */
/* */
/* - error mode */
/* */
/* Only error messages are generated. */
/* */
/* - release mode: */
/* */
/* No error message is sent or generated. The code is free from any */
/* debugging parts. */
/* */
/*************************************************************************/
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#ifdef FT_DEBUG_LEVEL_ERROR
# include <stdarg.h>
# include <stdlib.h>
# include <string.h>
# include <windows.h>
FT_EXPORT_DEF( void )
FT_Message( const char* fmt, ... )
{
static char buf[8192];
va_list ap;
va_start( ap, fmt );
vsprintf( buf, fmt, ap );
OutputDebugStringA( buf );
va_end( ap );
}
FT_EXPORT_DEF( void )
FT_Panic( const char* fmt, ... )
{
static char buf[8192];
va_list ap;
va_start( ap, fmt );
vsprintf( buf, fmt, ap );
OutputDebugStringA( buf );
va_end( ap );
exit( EXIT_FAILURE );
}
# ifdef FT_DEBUG_LEVEL_TRACE
/* array of trace levels, initialized to 0 */
int ft_trace_levels[trace_count];
/* define array of trace toggle names */
# define FT_TRACE_DEF( x ) #x ,
static const char* ft_trace_toggles[trace_count + 1] =
{
# include FT_INTERNAL_TRACE_H
NULL
};
# undef FT_TRACE_DEF
/*************************************************************************/
/* */
/* Initialize the tracing sub-system. This is done by retrieving the */
/* value of the "FT2_DEBUG" environment variable. It must be a list of */
/* toggles, separated by spaces, `;' or `,'. Example: */
/* */
/* "any:3 memory:6 stream:5" */
/* */
/* This will request that all levels be set to 3, except the trace level */
/* for the memory and stream components which are set to 6 and 5, */
/* respectively. */
/* */
/* See the file <freetype/internal/fttrace.h> for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 6; 0 means quiet (except for serious */
/* runtime errors), and 6 means _very_ verbose. */
/* */
FT_BASE_DEF( void )
ft_debug_init( void )
{
const char* ft2_debug = getenv( "FT2_DEBUG" );
if ( ft2_debug )
{
const char* p = ft2_debug;
const char* q;
for ( ; *p; p++ )
{
/* skip leading whitespace and separators */
if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
continue;
/* read toggle name, followed by ':' */
q = p;
while ( *p && *p != ':' )
p++;
if ( *p == ':' && p > q )
{
int n, i, len = p - q;
int level = -1, found = -1;
for ( n = 0; n < trace_count; n++ )
{
const char* toggle = ft_trace_toggles[n];
for ( i = 0; i < len; i++ )
{
if ( toggle[i] != q[i] )
break;
}
if ( i == len && toggle[i] == 0 )
{
found = n;
break;
}
}
/* read level */
p++;
if ( *p )
{
level = *p++ - '0';
if ( level < 0 || level > 6 )
level = -1;
}
if ( found >= 0 && level >= 0 )
{
if ( found == trace_any )
{
/* special case for "any" */
for ( n = 0; n < trace_count; n++ )
ft_trace_levels[n] = level;
}
else
ft_trace_levels[found] = level;
}
}
}
}
}
# else /* !FT_DEBUG_LEVEL_TRACE */
FT_BASE_DEF( void )
ft_debug_init( void )
{
/* nothing */
}
# endif /* !FT_DEBUG_LEVEL_TRACE */
#endif /* FT_DEBUG_LEVEL_ERROR */
/* END */

View File

@ -0,0 +1,345 @@
# Microsoft Developer Studio Project File - Name="freetype" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=freetype - Win32 Debug Singlethreaded
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "freetype.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "freetype - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Debug Multithreaded" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Release Multithreaded" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Release Singlethreaded" (based on "Win32 (x86) Static Library")
!MESSAGE "freetype - Win32 Debug Singlethreaded" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "freetype - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\objs\release"
# PROP Intermediate_Dir "..\..\..\objs\release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\objs\debug"
# PROP Intermediate_Dir "..\..\..\objs\debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /MDd /Za /W4 /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "freetype___Win32_Debug_Multithreaded"
# PROP BASE Intermediate_Dir "freetype___Win32_Debug_Multithreaded"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\objs\debug_mt"
# PROP Intermediate_Dir "..\..\..\objs\debug_mt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
# SUBTRACT BASE CPP /X
# ADD CPP /MTd /Za /W4 /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "freetype___Win32_Release_Multithreaded"
# PROP BASE Intermediate_Dir "freetype___Win32_Release_Multithreaded"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\objs\release_mt"
# PROP Intermediate_Dir "..\..\..\objs\release_mt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
# ADD CPP /MT /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "freetype___Win32_Release_Singlethreaded"
# PROP BASE Intermediate_Dir "freetype___Win32_Release_Singlethreaded"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\objs\release_st"
# PROP Intermediate_Dir "..\..\..\objs\release_st"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
# SUBTRACT CPP /nologo /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
# ADD LIB32 /out:"..\..\..\objs\freetype214ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "freetype___Win32_Debug_Singlethreaded"
# PROP BASE Intermediate_Dir "freetype___Win32_Debug_Singlethreaded"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\objs\debug_st"
# PROP Intermediate_Dir "..\..\..\objs\debug_st"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /Za /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT BASE CPP /X /YX
# ADD CPP /Za /W4 /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
# SUBTRACT CPP /nologo /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214ST_D.lib"
!ENDIF
# Begin Target
# Name "freetype - Win32 Release"
# Name "freetype - Win32 Debug"
# Name "freetype - Win32 Debug Multithreaded"
# Name "freetype - Win32 Release Multithreaded"
# Name "freetype - Win32 Release Singlethreaded"
# Name "freetype - Win32 Debug Singlethreaded"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\..\src\autohint\autohint.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\bdf\bdf.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cff\cff.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftbase.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cache\ftcache.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\ftdebug.c
# ADD CPP /Ze
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftglyph.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\gzip\ftgzip.c
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftinit.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftmm.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\base\ftsystem.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\pcf\pcf.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\pfr\pfr.c
# End Source File
# Begin Source File
SOURCE=..\..\..\src\psaux\psaux.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\pshinter\pshinter.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\psnames\psmodule.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\raster\raster.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\sfnt\sfnt.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\smooth\smooth.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\truetype\truetype.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type1\type1.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\cid\type1cid.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\type42\type42.c
# SUBTRACT CPP /Fr
# End Source File
# Begin Source File
SOURCE=..\..\..\src\winfonts\winfnt.c
# SUBTRACT CPP /Fr
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\..\include\ft2build.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\freetype\config\ftconfig.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\freetype\config\ftheader.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\freetype\config\ftmodule.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\freetype\config\ftoption.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\freetype\config\ftstdlib.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "freetype"=.\freetype.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -0,0 +1,27 @@
<html>
<header>
<title>FreeType 2 Project Files for Visual C++</title>
</header>
<body>
<h1>FreeType 2 Project Files for Visual C++</h1>
<p>This directory contains a project file for Visual C++, named
<tt>freetype.dsp</tt>. It will compile the following libraries
from the FreeType 2.1.4 sources:</p>
<ul>
<pre>
freetype214.lib - release build; single threaded
freetype214_D.lib - debug build; single threaded
freetype214MT.lib - release build; multi-threaded
freetype214MT_D.lib - debug build; multi-threaded
</pre>
</ul>
<p>Build directories are placed in the top-level "objs" directory</p>
<p>Enjoy :-)</p>
</body>
</html>

23
builds/win32/w32-bcc.mk Normal file
View File

@ -0,0 +1,23 @@
#
# FreeType 2 Borland C++ on Win32
#
# Copyright 1996-2000, 2003 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.
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/bcc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# EOF

25
builds/win32/w32-bccd.mk Normal file
View File

@ -0,0 +1,25 @@
#
# FreeType 2 Borland C++ on Win32 + debugging
#
# Copyright 1996-2000, 2003 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.
include $(TOP_DIR)/builds/win32/win32-def.mk
BUILD_DIR := $(TOP_DIR)/devel
include $(TOP_DIR)/builds/compiler/bcc-dev.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# EOF

View File

@ -1,11 +1,11 @@
#
# FreeType 2 Configuration rules for Win32 + GCC
# FreeType 2 configuration rules for Win32 + GCC
#
# Development version without optimizations.
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,128 +13,23 @@
# 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.
#
# NOTE: This version requires that GNU Make is invoked from the Windows
# Shell (_not_ Cygwin BASH)!
#
ifndef TOP
TOP := .
ifndef TOP_DIR
TOP_DIR := .
endif
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/builds/win32
PLATFORM := win32
CC := gcc
include $(TOP_DIR)/builds/win32/win32-def.mk
BUILD_DIR := $(TOP_DIR)/devel
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := libfreetype
# 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 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 := -o # Don't remove this comment line! We need the space after `-o'.
# 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 := -c -g -O0 -Wall -W
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
# EOF

View File

@ -1,9 +1,9 @@
#
# FreeType 2 Configuration rules for Win32 + GCC
# FreeType 2 configuration rules for Win32 + GCC
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -11,128 +11,16 @@
# 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.
#
# NOTE: This version requires that GNU Make is invoked from the Windows
# Shell (_not_ Cygwin BASH)!
#
ifndef TOP
TOP := .
endif
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/builds/win32
PLATFORM := win32
CC := gcc
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# include Win32-specific definitions
include $(TOP_DIR)/builds/win32/win32-def.mk
# include gcc-specific definitions
include $(TOP_DIR)/builds/compiler/gcc.mk
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := o
SO := o
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := a
SA := a
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := libfreetype
# 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 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 := -o # Don't remove this comment line! We need the space after `-o'.
# 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 := -c -g -O6 -Wall
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -ansi -pedantic
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# Librarian to use to build the static library
#
FT_LIBRARIAN := $(AR) -r
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
$(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
endif
# EOF

View File

@ -1,5 +1,5 @@
#
# FreeType 2 Configuration rules for Win32 + IBM Visual Age C++
# FreeType 2 configuration rules for Win32 + IBM Visual Age C++
#
@ -11,112 +11,13 @@
# 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.
#
DELETE := del
SEP := $(strip \ )
HOSTSEP := $(strip \ )
BUILD := $(TOP)$(SEP)config$(SEP)win32
PLATFORM := win32
CC := icc
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/visualage.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# 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
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := freetype
# 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 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.
#
ifndef CFLAGS
CFLAGS := /Q- /Gd+ /O2 /G5 /W3 /C
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSI_FLAGS := /Sa
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
lib /nologo /out:$@ $(OBJECTS_LIST)
endif
# EOF

23
builds/win32/w32-intl.mk Normal file
View File

@ -0,0 +1,23 @@
#
# FreeType 2 configuration rules for Intel C/C++ on Win32
#
# Copyright 1996-2000, 2003 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.
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/intelc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# EOF

View File

@ -1,5 +1,5 @@
#
# FreeType 2 Configuration rules for Win32 + LCC
# FreeType 2 configuration rules for Win32 + LCC
#
@ -13,118 +13,12 @@
# fully.
ifndef TOP
TOP := .
endif
SEP := /
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/win-lcc.mk
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/builds/win32
PLATFORM := win32
CC := lcc
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# 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
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := freetype
# 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 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.
#
ifndef CFLAGS
CFLAGS := -c -g2 -O
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS :=
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
lcclib /out:$(subst $(SEP),\\,$@) \
$(subst $(SEP),\\,$(OBJECTS_LIST))
endif
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# EOF

View File

@ -0,0 +1,28 @@
#
# FreeType 2 configuration rules for mingw32
#
# Copyright 1996-2000, 2003 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.
# include Win32-specific definitions
include $(TOP_DIR)/builds/win32/win32-def.mk
LIBRARY := lib$(PROJECT)
# include gcc-specific definitions
include $(TOP_DIR)/builds/compiler/gcc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# EOF

View File

@ -1,9 +1,9 @@
#
# FreeType 2 Configuration rules for Win32 + Visual C/C++
# FreeType 2 Visual C++ on Win32
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -13,117 +13,11 @@
# fully.
ifndef TOP
TOP := .
endif
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/visualc.mk
DELETE := del
SEP := /
HOSTSEP := $(strip \ )
BUILD := $(TOP)/builds/win32
PLATFORM := win32
CC := cl
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# The directory where all object files are placed.
#
# Note that this is not $(TOP)/obj!
# This lets you build the library in your own directory with something like
#
# set TOP=.../path/to/freetype2/top/dir...
# mkdir obj
# make -f %TOP%/Makefile setup [options]
# make -f %TOP%/Makefile
#
OBJ_DIR := obj
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR), however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := obj
SO := ojc
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := lib
SA := lib
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := freetype
# 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 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.
#
ifndef CFLAGS
CFLAGS := /nologo /c /Ox /G5 /W3 /WX
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := /Za
ifdef BUILD_FREETYPE
# Now include the main sub-makefile. It contains all the rules used to
# build the library with the previous variables defined.
#
include $(TOP)/builds/freetype.mk
# The cleanup targets.
#
clean_freetype: clean_freetype_dos
distclean_freetype: distclean_freetype_dos
# This final rule is used to link all object files into a single library.
# It is part of the system-specific sub-Makefile because not all
# librarians accept a simple syntax like
#
# librarian library_file {list of object files}
#
$(FT_LIBRARY): $(OBJECTS_LIST)
lib /nologo /out:$@ $(OBJECTS_LIST)
endif
# EOF

23
builds/win32/w32-wat.mk Normal file
View File

@ -0,0 +1,23 @@
#
# FreeType 2 configuration rules for Watcom C/C++
#
# Copyright 1996-2000, 2003 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.
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/watcom.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
# EOF

55
builds/win32/win32-def.mk Normal file
View File

@ -0,0 +1,55 @@
#
# FreeType 2 Win32 specific definitions
#
# Copyright 1996-2000, 2003 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.
DELETE := del
SEP := $(strip \ )
BUILD_DIR := $(TOP_DIR)/builds/win32
PLATFORM := win32
# The directory where all object files are placed.
#
# This lets you build the library in your own directory with something like
#
# set TOP_DIR=.../path/to/freetype2/top/dir...
# set OBJ_DIR=.../path/to/obj/dir
# make -f %TOP_DIR%/Makefile setup [options]
# make -f %TOP_DIR%/Makefile
#
ifndef OBJ_DIR
OBJ_DIR := $(TOP_DIR)/objs
endif
# The directory where all library files are placed.
#
# By default, this is the same as $(OBJ_DIR); however, this can be changed
# to suit particular needs.
#
LIB_DIR := $(OBJ_DIR)
# The name of the final library file. Note that the DOS-specific Makefile
# uses a shorter (8.3) name.
#
LIBRARY := $(PROJECT)
# The NO_OUTPUT macro is used to ignore the output of commands.
#
NO_OUTPUT = 2> nul
# EOF

62
configure vendored Normal file
View File

@ -0,0 +1,62 @@
#!/bin/sh
#
# Call the 'configure' script located in 'builds/unix'.
#
# This should re-generate the following files:
#
# config.mk
# Jamfile
# install
#
if test "x$GNUMAKE" = x; then
GNUMAKE=make
fi
if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then
echo "Sorry, GNU make is required to build FreeType2." >&2
echo "Please try \`GNUMAKE=<GNU make command name> $0'." >&2
exit 1
fi
# Uh, oh. This is taken from autoconf. They know what they are doing...
if expr a : '\(a\)' >/dev/null 2>&1; then
ft_expr=expr
else
ft_expr=false
fi
ft2_dir=`(dirname "$0") 2>/dev/null ||
$ft_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$0" : 'X\(//\)[^/]' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
abs_curr_dir=`pwd`
abs_ft2_dir=`cd "$ft2_dir" && pwd`
# build a dummy Makefile if we are not building in the source tree
if test "$abs_curr_dir" != "$abs_ft2_dir"; then
mkdir reference
echo "TOP_DIR=$abs_ft2_dir" > Makefile
echo "OBJ_DIR=$abs_curr_dir" >> Makefile
echo "OBJ_BUILD=$abs_curr_dir" >> Makefile
echo "DOC_DIR=$abs_curr_dir/reference" >> Makefile
echo "LIBTOOL=$abs_curr_dir/libtool" >> Makefile
echo "include $abs_ft2_dir/Makefile" >> Makefile
fi
# call make
CFG="$@" $GNUMAKE setup unix
# eof

41
devel/ft2build.h Normal file
View File

@ -0,0 +1,41 @@
/***************************************************************************/
/* */
/* ft2build.h */
/* */
/* FreeType 2 build and setup macros. */
/* (Generic version) */
/* */
/* Copyright 1996-2001, 2003 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. */
/* */
/***************************************************************************/
/*
* This is a development version of <ft2build.h> that is used
* to build the library in debug mode. Its only difference with
* the reference is that it forces the use of the local "ftoption.h"
* which contains different settings for all configuration macros.
*
* To use it, you must define the environment variable FT2_BUILD_INCLUDE
* to point to the directory containing these two files ("ft2build.h" and
* "ftoption.h"), then invoke Jam as usual.
*/
#ifndef __FT2_BUILD_GENERIC_H__
#define __FT2_BUILD_GENERIC_H__
#define FT_CONFIG_OPTIONS_H <ftoption.h>
#include <freetype/config/ftheader.h>
#endif /* __FT2_BUILD_GENERIC_H__ */
/* END */

Some files were not shown because too many files have changed in this diff Show More