Commit Graph

45 Commits

Author SHA1 Message Date
Moazin Khatti f93a897afe Add code to load OT-SVG glyph documents.
* include/freetype/config/ftheader.h (FT_OTSVG_H): New macro.
* include/freetype/freetype.h (FT_FACE_FLAG_SVG, FT_HAS_SVG): New macros.
(FT_LOAD_SVG_ONLY): New internal macro.
* include/freetype/ftimage.h (FT_Glyph_Format): New enumeration value
`FT_GLYPH_FORMAT_SVG`.
* include/freetype/internal/ftobjs.h (FT_GLYPH_OWN_GZIP_SVG): New macro.
* include/freetype/internal/fttrace.h: Add `ttsvg` for `ttsvg.c`.
* include/freetype/internal/sfnt.h(load_svg, free_svg, load_svg_doc): New
functions.
* include/freetype/internal/tttypes.h (TT_FaceRec): Add `svg` for
the SVG table.
* include/freetype/otsvg.h (FT_SVG_DocumentRec): New structure to hold the
SVG document and other necessary information of an OT-SVG glyph in a glyph
slot.
* include/freetype/tttags.h (TTAG_SVG): New macro.

* src/base/ftobjs.c: Include `otsvg.h`.
(ft_glyphslot_init): Allocate `FT_SVG_DocumentRec` in `slot->other`
if the SVG table exists.
(ft_glyphslot_clear): Free it upon clean-up if it is a GZIP compressed
glyph.
(ft_glyphslot_done): Free the document data if it is a GZIP compressed
glyph.
(FT_Load_Glyph): Don't auto-hint SVG documents.

* src/cache/ftcbasic.c (ftc_basic_family_load_glyph): Add support for
FT_GLYPH_FORMAT_SVG.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttsvg.c`.
* src/sfnt/sfdriver.c: Include `ttsvg.h`.
(sfnt_interface): Add `tt_face_load_svg`, `tt_face_free_svg` and
`tt_face_load_svg_doc`.
* src/sfnt/sfnt.c: Include `ttsvg.c`.
* src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Add code to load and
free data of the the SVG table.
* src/sfnt/ttsvg.c: New file, implementing `tt_face_load_svg`,
`tt_face_free_svg` and `tt_face_load_svg_doc`.
* src/sfnt/ttsvg.h: Declarations of the SVG functions in
`ttsvg.c`.
2022-01-20 16:45:18 +00:00
Werner Lemberg d0cfb4e1b2 Update all copyright notices. 2022-01-11 10:54:10 +01:00
Werner Lemberg b6e8a71266 Update all copyright notices. 2021-01-17 07:18:48 +01:00
Werner Lemberg 1658685967 Remove redundant inclusion of `ft2build.h'.
* */*: Remove `#include <ft2build.h>' where possible.

* include/freetype/freetype.h: Remove cpp error about missing
inclusion of `ft2build.h'.
2020-06-13 21:15:45 +02:00
Werner Lemberg e5038be704 Update all copyright notices. 2020-01-19 17:05:19 +01:00
Nikhil Ramakrishnan 8c1e3fc339 [sfnt] Include `woff2tags.c' for building.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `woff2tags.c'.

* src/sfnt/sfnt.c: Include `woff2tags.c'.
2019-08-27 08:58:20 +02:00
Nikhil Ramakrishnan 2fa573c1b0 [sfnt] Read WOFF 2 header.
Check for WOFF2 tag, call `woff2_open_font', and implement it to read
header according to specification.

* include/freetype/internal/fttrace.h: Add `sfwoff2.c'.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `sfwoff2.c'.

* src/sfnt/sfnt.c: Include `sfwoff2.c'.

* src/sfnt/sfobjs.c (sfnt_open_font): Check for `wOF2' tag and call
`woff2_open_font'.

* src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h: New files.
2019-08-27 08:53:51 +02:00
Nikhil Ramakrishnan 7b275a5af1 [sfnt] Separate WOFF sources and headers.
Move WOFF sources and headers to separate files.

* include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c,
src/sfnt/sfwoff.h: New files.

* include/freetype/internal/fttrace.h: Register `sfwoff.c'.

* include/freetype/internal/internal.h: Define
FT_INTERNAL_WOFF_TYPES_H.

* include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H.

* include/freetype/internal/tttypes.h: Move out WOFF structures.

* src/sfnt/rules.mk: Add `sfwoff.c'.

* src/sfnt/sfnt.c: Include `sfwoff.c'.

* src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
2019-05-30 23:57:34 +05:30
Werner Lemberg 7585997024 Update all copyright notices. 2019-02-23 10:07:09 +01:00
Werner Lemberg f686ad46a3 Update copyright years. 2019-01-22 20:31:44 +01:00
Werner Lemberg a44e20879c [sfnt] Move `CPAL' stuff into separate files.
* src/sfnt/sfdriver.c: Include `ttcpal.h'.
* src/sfnt/sfnt.c: Include `ttcpal.c'.

* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ...
* src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files.

* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC):
Updated.

* include/freetype/internal/fttrace.h: Add support for `colr' and
`cpal'.
Sort entries.
2018-06-14 11:32:47 +02:00
Werner Lemberg 9ac9060df0 [GSoC] src/*.*: Convert block comments to `light' style.
This monster commit was created by applying Nikhil's scripts
`docconverter.py' and `markify.py' to all C header and source files,
followed up by minor manual clean-up.

No change in functionality, of course.

I used commit f7419907bc6044b9b7057f9789866426c804ba82 from
https://github.com/nikramakrishnan/freetype-docs.git.
2018-06-03 09:08:41 +02:00
Shao Yu Zhang f04d81751a [sfnt] Preliminary support of coloured layer outlines.
This commit enables OpenType's COLR/CPAL table handling; a typical
application are color emojis that can be scaled to any size.

If the color palette does not exist or is invalid, the rendering
step rasterizes the outline instead.  The current implementation
assumes that the foreground is black.

Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.

There are still some issues with metrics; additionally, an API to
fetch color layers is missing.

* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_COLOR_LAYERS): New macro.

* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
FT_Colr_InternalRec): New structures.
(FT_Slot_InternalRec): Add `color_layers' field.

* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
TT_Blend_Colr_Func): New function types.
(SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
and `colr_blend' fields.

* include/freetype/internal/tttypes.h (TT_FaceRec): Add
`colr_and_cpal' field.

* include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
macros.

* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.

* src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
Handle glyph color layers.

* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
`ttcolr.c'.

* src/sfnt/sfdriver.c: Include `ttcolr.h'.
(PUT_COLOR_LAYERS): New macro.
Update call to `FT_DEFINE_SFNT_INTERFACE'.

* src/sfnt/sfnt.c: Include `ttcolr.c'.

* src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
(sfnt_done_face): Updated.

* src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
2018-05-13 03:25:09 +02:00
Werner Lemberg 9514959241 Remove FT_CONFIG_OPTION_PIC and related code.
*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
preprocessor symbol.

*/*: Replace `XXX_GET' macros (which could be either a function in
PIC mode or an array in non-PIC mode) with `xxx' arrays.

* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
Removed.
2018-05-02 20:27:48 +02:00
Werner Lemberg 0a0c22569d Update copyright year. 2018-01-02 09:33:57 +01:00
Werner Lemberg 9931175dcc Improve `make multi'.
* src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.

* src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.

* src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.

* src/sfnt/pngshim.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.

* src/sfnt/ttbdf.c: Avoid empty source file.
* src/sfnt/ttpost.c: Guard file with
TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
* src/sfnt/ttsbit.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS.

* src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
source file.

* src/truetype/ttsubpix.c: Guard file with
TT_USE_BYTECODE_INTERPRETER also.

* src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.

* src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
entries.
2017-03-18 07:06:49 +01:00
Werner Lemberg 563ae78022 Update copyright year. 2017-01-04 20:16:34 +01:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Behdad Esfahbod 760d342d37 Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification

  https://color-emoji.googlecode.com/git/specification/v1.html

which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively).  The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images.  If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.

Note that color bitmaps are converted to grayscale if client didn't
ask for color.

* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.

* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.

* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.

* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.

* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.

* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.

* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.

* src/sfnt/sfnt.c: Include `pngshim.c'.

* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'.  This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.

* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
Oran Agra fb429ec409 Position Independent Code (PIC) support in sfnt driver.
* include/freetype/internal/services/svbdf.h add macros to init
instances of FT_Service_BDFRec.
* include/freetype/internal/services/svgldict.h add macros to init
instances of FT_Service_GlyphDictRec.
* include/freetype/internal/services/svpostnm.h add macros to init
instances of FT_Service_PsFontNameRec.
* include/freetype/internal/services/svsfnt.h add macros to init
instances of FT_Service_SFNT_TableRec.
* include/freetype/internal/services/svttcmap.h add macros to init
instances of FT_Service_TTCMapsRec.
* include/freetype/internal/sfnt.h add macros to init
instances of SFNT_Interface.

* src/sfnt/sfdriver.h declare sfnt_module_class using macros from
ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name
tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface,
sfnt_module_class, and sfnt_services array
will have functions to init or create and destroy them
instead of being allocated in the global scope.
And macros will be used from sfntpic.h in order to access them
from the pic_container.

* src/sfnt/ttcmap.h add macros to init
instances of TT_CMap_ClassRec.
* src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec
tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec,
tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array
will have functions to init or create and destroy them
instead of being allocated in the global scope.
And macros will be used from sfntpic.h in order to access them
from the pic_container.
The content of tt_cmap_classes is now described in the
new file 'ttcmapc.h'.

New Files:
* src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt
driver and macros to access them.
* src/sfnt/sfntpic.c implement functions to allocate, destroy and
initialize PIC globals for sfnt driver.
* src/sfnt/ttcmapc.h describing the content of
tt_cmap_classes allocated in ttcmap.c

* src/sfnt/sfnt.c add new file to build: sfntpic.c.
* src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
2009-04-05 18:08:32 +03:00
Werner Lemberg 5225402a52 * include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in
documentation that negative strength values are possible.
Give an example call.

* include/freetype/freetype.h (FT_GlyphSlotRec): Improve
documentation of `outline' field.

* src/sfnt/sfobjc.s: Inckude FT_INTERNAL_DEBUG_H.
* src/sfnt/sfdriver.c: Include ttmtx.h.

* src/autofit/afcjk.c: Include aftypes.h and aflatin.h.
2006-02-15 06:05:52 +00:00
Wu, Chia-I (吳佳一) f5aa47beb0 Clean up the SFNT_Interface. Table loading functions are now named
after the tables' tags;  `hdmx' is TrueType-specific and thus the code
is moved to the truetype module; `get_metrics' is moved here from the
truetype module so that the code can be shared with the cff module.

This pass involves no real changes.  That is, the code is moved
verbatim mostly.  The only exception is the return value of
`tt_face_get_metrics'.

* include/freetype/internal/sfnt.h, src/sfnt/rules.mk,
src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c,
src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface.

* src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Metrics-related tables' loading
and parsing code is moved here.
Move `tt_face_get_metrics' here from the truetype module.  The return
value is changed from `void' to `FT_Error'.

* include/freetype/internal/fttrace.h: New trace: ttmtx.

* src/truetype/ttpload.c, src/truetype/ttpload.h: `hdmx' loading and
parsing code is moved here.
New function `tt_face_load_prep' splitted from `tt_face_load_fpgm'.
`tt_face_load_fpgm' returns `FT_Err_Ok' if `fpgm' doesn't exist.

* src/cff/cffgload.c, src/cff/cffobjs.c: Update.

* src/truetype/ttgload.c, src/truetype/ttobjs.c: Update.
2006-02-14 06:40:10 +00:00
David Turner 89a2a4b531 * include/freetype/config/ftoption.h,
include/freetype/config/ftstdlib.h,
        include/freetype/internal/tttypes.h,
        src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
        src/sfnt/ttbdf.h, src/sfnt/ttbdf.c, src/sfnt/sfobjs.c:

        Added support for an embedded 'BDF ' table within SFNT-based
        bitmap font files. This is used to store atoms & properties from
        the original BDF fonts that were used to generate the font file.

        the feature is controled by TT_CONFIG_OPTION_BDF within 'ftoption.h'
        and is used to implement FT_Get_BDF_Property for these font files.

        At the moment, this is still experimental, the BDF table format isn't
        cast into stone yet.
2005-12-14 20:38:15 +00:00
Werner Lemberg e793092d0a Formatting.
* src/truetype/ttpload.c (tt_face_load_loca): Fix typo.

* src/sfnt/ttkern.c: Include `ttkern.h'.
(FT_COMPONENT): Updated.

* include/freetype/internal/fttrace.h: Add entry for `ttkern'.

* src/sfnt/ttsbit0.c: s/FT_Err_/SFNT_Err_/.
Decorate constants with `U' and `L' where necessary.

* src/sfnt/ttcmap.c (tt_cmap4_next): Remove unused variable.
2005-03-01 02:13:50 +00:00
David Turner e5680279b2 * many, many files: several memory optimizations were implemented to
drastically reduce the heap usage of FreeType, especially in the case
  of memory-mapped files. The idea is to avoid loading and decoding tables
  in the heap, and instead access the raw data whenever possible (i.e.
  when it doesn't compromise performance).

  This had several impacts: first, opening vera.ttf uses a ridiculous amount
  of memory (when the FT_Library footprint is accounted for), until you start
  loading glyphs. Even then, you'll save at least 20 Kb compared to the non
  optimized case. performance of various operations, including open/close
  has also been dramatically improved.

  More optimisations to come. The auto-hinter eats memory like crazy? This
  must be stopped...
2005-02-26 00:12:04 +00:00
Werner Lemberg 4b8397c775 * src/otlayout/otlgpos.c (otl_gpos_subtable_validate): Add argument
to pass number of lookups.
Update all callers.
Don't call otl_lookup_list_validate but otl_lookup_validate.
(otl_gpos_validate): Call otl_lookup_list_validate instead of
otl_gpos_subtable_validate.

* src/otlayout/otlgpos.h: Updated.

* src/otlayout/otljstf.c (otl_jstf_max_validate): Add argument to
pass number of lookups.
Update all callers.


* src/cff/cffparse.c (cff_parse_real): s/exp/exponent/ to avoid
compiler warning.


* src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Renamed to...
* src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: This.
* src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
src/sfnt/sfnt.c, src/sfnt/sfobjs.c: Updated.


* builds/compiler/gcc-dev.mk (CFLAGS): Don't add `-Wnested-externs'
if compiler is g++ (v3.3.3 emits a warning otherwise).
2004-08-29 16:50:09 +00:00
Werner Lemberg 80cfbd7073 * src/base/fttrigon.c, src/base/ftgloadr.c: Inlude
FT_INTERNAL_OBJECTS_H.

* src/base/ftstroke.c (FT_Outline_GetInsideBorder,
FT_Outline_GetOutsideBorder): s/or/o/ to make it compile with
C++ compilers.

* src/cache/ftcmru.c, include/freetype/cache/ftcmru.h:
s/select/selection/ to avoid compiler warning.
* src/cff/cffload.h: s/select/ftselect/ to avoid potential
compiler warning.

Formatting.
2003-12-26 07:26:08 +00:00
Werner Lemberg b066c1530d * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: Removed. Obsolete.
* include/freetype/internal/sfnt.h (SFNT_Interface): Remove
obsolete fields `load_charmap' and `free_charmap'.
(TT_CharMap_Load_Func, TT_CharMap_Free_Func): Removed.
* src/sfnt/sfnt.c: Don't include ttcmap.c.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttcmap.c.
* src/sfnt/ttload.c: Don't include ttcmap.h.
* src/sfnt/sfdriver.c: Don't include ttcmap.h.
(sfnt_interface): Updated.
2003-12-16 06:42:11 +00:00
Werner Lemberg b7b163cb07 * 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
David Turner fd88e7c7c8 * 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
Werner Lemberg 415235df1b finishing function header formatting
updating copyrights
2001-06-28 17:49:10 +00:00
David Turner 8d3a401fa8 * 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 63408a1299 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 170c0d4c0d * 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 d5c1b27d58 * 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 cc069beb2d cleanups 2000-12-08 16:17:16 +00:00
David Turner 19ed8afe60 - 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
Werner Lemberg 7fa51b5535 Formatting.
Adding some trivial error checking.

Adding/Fixing tracing levels.
2000-07-08 19:51:42 +00:00
David Turner a90663f591 vast clean-up of the sources in order to allow flat
directory compilation (by defining the FT_FLAT_COMPILE
macro at compile time..)

moved "freetype2/BUILD" to "freetype2/docs/BUILD"
2000-07-08 00:41:13 +00:00
Werner Lemberg 4e6dd8587e freetype.h: Adding ft_encoding_xxx values for some CJK encodings.
Fixing copyright notice on many files.

Changed some tracing levels.

A lot of formatting, fixing documentation etc. as usual.
2000-06-05 05:26:15 +00:00
David Turner 2e421319fc moved a lot of things from the TrueType driver to the SFNT
module (whose interface has changed, by the way)

This allows even more code re-use between TrueType and
OpenType formats..
2000-05-26 22:13:17 +00:00
David Turner 7f7aadf4f7 finished moving all configuration macros to
"config/ftoption.h"
2000-03-13 12:57:27 +00:00
David Turner ca13392d83 a few changes to really compile font drivers in
independent single objects..
2000-03-01 13:24:38 +00:00
David Turner d2b1f35704 Initial revision 1999-12-16 23:11:37 +00:00