Commit Graph

304 Commits

Author SHA1 Message Date
David Turner 66cbc20978 * 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 b280537b6d * 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 ae26c684db * 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 4bdf4350f2 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 20e33158da * 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 5237993a92 fixed a small bug in the sbit cache that caused problems with embedded bitmaps 2002-11-07 09:46:43 +00:00
David Turner 60b32e16e7 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
Werner Lemberg 98add9e68c Formatting, minor doc fixes. 2002-09-18 11:32:12 +00:00
Werner Lemberg 7a99b507ce * 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
David Turner 25f845aa64 * 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 00d9f40cf7 * 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
David Turner b08fe2dc7a * 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 3c403e4c17 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
David Turner 075c35de55 * 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 957fa85682 - 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 995d1165b9 * 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 8c90c22dbe * 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 5a2f39e8ed adding template cache lookup routine 2002-06-08 01:06:31 +00:00
David Turner 4927e37a04 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 f47d5f0b39 debugging new cache hash table implementation 2002-06-07 22:09:20 +00:00
David Turner 08b7ad4418 * 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
Werner Lemberg 7cf4d377f4 * 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
Werner Lemberg 7b3dc7bb61 * 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 d15bc0d13a * 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 48c984b5bb * 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 e459d742e6 * 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
Werner Lemberg 0d9165e1d6 * 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 4a23351091 renaming "ft_glyph_own_bitmap" into "FT_GLYPH_OWN_BITMAP" 2002-02-24 02:39:08 +00:00
Werner Lemberg b5349a9b75 * 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 a7d2f5e1c0 * 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 8880f2c14d * 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
Werner Lemberg 3975e2e1f5 Formatting. 2002-01-09 21:01:18 +00:00
David Turner f86709a15b * 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 21e046e0c4 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
Werner Lemberg 5da9dd77f2 * 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 66646404f6 small fix 2001-12-08 00:54:19 +00:00
David Turner 145f94cb26 added new charmap cache. see include/freetype/cache/ftccmap.h 2001-12-07 14:43:45 +00:00
David Turner a09764555c oops, forgot to add new file and remove old one in src/cache 2001-12-06 16:45:26 +00:00
David Turner 14183ea0f8 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 c3b2160869 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
David Turner b92479b8c2 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 75133bff1d fixed a small performance bug in the new cache sub-system implementation 2001-10-27 17:36:04 +00:00
David Turner cd605b6302 _major_ re-design of the caching sub-system. Still using the same API
though :-)
2001-10-26 16:58:27 +00:00
Werner Lemberg 80b8d77024 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 b3ba40ddfd * 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 5b1e81411d * src/cache/ftlru.c (FT_Lru_Lookup_Node): fixed a bug that prevented
correct LRU behaviour
2001-10-07 11:06:07 +00:00
Werner Lemberg 415235df1b finishing function header formatting
updating copyrights
2001-06-28 17:49:10 +00:00
Werner Lemberg f814d0fafe First round in converting
type foo ( ... )

to

  type
  foo ( ... )

Other minor formatting issues.
2001-06-27 16:18:10 +00:00
David Turner dee781342b * 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 8eb0353fec Formatting. 2001-06-19 23:03:41 +00:00
David Turner 61f0685683 * 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
David Turner 8edbcabce1 - 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 00a2207fd8 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 1f7f0e87e5 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 cbc9938e68 * 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 a1844e0927 * Jamfile, src/Jamfile, src/*/Jamfile: Formatted. Slight changes
to give files identical structure.
2001-04-03 21:07:36 +00:00
David Turner 5bf0a39485 * 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
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 914b289f16 * src/*/*.c: Added many casts to make code more 64bit-safe. 2001-03-10 17:07:42 +00:00
Werner Lemberg c3e987e2aa * 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 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
David Turner 508409434c * src/cache/ftlru.c (FT_Lru_Done): fixed a small memory leak 2000-12-06 18:02:01 +00:00
David Turner 940d30640f re-fixed FTC_Manager_Done :-) 2000-12-05 23:07:16 +00:00
David Turner 91bb16583b fixed a bug in FTC_Manager_Done 2000-12-05 22:23:12 +00:00
David Turner efa80f2b43 fixed a few warnings with Borland C++ 2000-12-01 21:43:05 +00:00
Werner Lemberg ada9503d22 * 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 a82cd844fb Small fixes and formatting. 2000-11-10 22:43:37 +00:00
David Turner 23a0670b98 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 94e3bfafa0 fixed a small bug in the abstract chunk cache class 2000-11-08 00:15:58 +00:00
Werner Lemberg 4b68007b4f 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 25dee217ab 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 dc72aff43d Finishing David's latest changes (there were some errors in it). 2000-11-04 08:33:38 +00:00
David Turner 76a5f62323 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 a13a473dd9 More C++ fixes. 2000-11-02 15:14:38 +00:00
Werner Lemberg 21fb2d9513 Adding header file for labs(). 2000-11-02 08:20:15 +00:00
Werner Lemberg ab8552321c 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 e4b32a5dc5 Removing trailing whitespace. 2000-10-31 20:42:18 +00:00
Werner Lemberg 3dc4374f43 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 2909475716 at last, the infamous cache bug is fixed !! 2000-10-31 10:58:23 +00:00
Tom Kacvinsky 6043b2404e 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 ece6379859 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
David Turner 4e4a43631c - 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 9b8f5c4ce1 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
Werner Lemberg ddbb8e7b6a 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
Werner Lemberg eddd9909e2 formatting
small fixes
2000-10-12 05:05:40 +00:00
David Turner f88969ab6c 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
Werner Lemberg f50c2954d4 Fixed typo in ftimage.h
Fixed sbit on/off flag in cache code.
2000-09-22 06:52:20 +00:00
David Turner ebdce8344a 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 d38a4f6593 removed obsolete files 2000-09-15 22:42:43 +00:00
David Turner 7909673992 - 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
Werner Lemberg 4e9dae68b7 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 80b96f350c 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
Werner Lemberg 95853c87f5 Introducing new error code FT_Err_Invalid_Cache_Handle.
Regrouping of error codes.
2000-08-26 22:16:44 +00:00
Werner Lemberg d1b7475be1 Formatting, small fixes.
Adding basic input parameter checking for exported functions.
2000-08-24 16:29:15 +00:00
David Turner 35db73220c - 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 98d2701c58 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
David Turner 34f1c2f5f4 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 3b2c50eb3b completing the FreeType Cache subsystem files 2000-08-23 21:11:13 +00:00
Werner Lemberg 8728f294bc Formatting, small fixes.
Adding copyright notices etc.
2000-08-23 17:32:42 +00:00
David Turner b466a7650c 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