Commit Graph

625 Commits

Author SHA1 Message Date
Werner Lemberg 35fd84b96a Formatting. 2005-03-08 06:00:35 +00:00
David Turner 8d4ccf5384 * src/autofit/aflatin.c (af_latin_metrics_init): fixing bug #12212
(auto-hinter refuses to work if no Unicode charmap in font)
2005-03-06 10:17:28 +00:00
Werner Lemberg baa662bbea * src/base/ftutil.c: Include FT_INTERNAL_OBJECTS_H. 2005-03-03 23:05:29 +00:00
Werner Lemberg f13516c832 Various fixes for C and C++ compiling.
* src/autofit/*: Add copyright messages.
  Formatting.

* src/autofit/afhints.c (af_glyph_hints_done): Don't use
`AF_Dimension' but `int' for loop counter.

* src/autofit/aflatin.c (af_latin_metrics_init_widths): Don't use
`AF_Dimension' but `int' for loop counter.
Use proper enumeration value for `render_mode'.
(af_latin_metrics_scale_dim): Don't shadow variables.
(af_latin_hints_compute_segments): Use proper cast for `major_dir'
and `segment_dir'.
(af_latin_align_linked_edge, af_latin_hint_edges): Fix arguments of call to
`af_latin_compute_stem_width'.
(af_latin_hints_apply): Don't use `AF_Dimension' but `int' for loop
counter.

* src/base/ftdbgmem.c (ft_mem_table_get_source, FT_DumpMemory): Use
proper cast for memory allocation.

* src/cff/cffdrivr.c (cff_get_kerning): Use proper cast for
initialization of `sfnt'.

* src/sfnt/sfdriver.c: Include `ttkern.h'.

* src/sfnt/ttkern.c (tt_face_get_kerning): Don't shadow variables.

* src/truetype/ttgload.c: Include `ttpload.h'.

* src/truetype/ttpload.c (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]:
Remove redundant variable.
2005-03-03 17:09:08 +00:00
Werner Lemberg b19b0810cd * src/autofit/afdummy.c, src/autofit/afdummy.h
(af_dummy_script_class): Fix type.

* src/autofit/aflatin.c, src/autofit/aflatin.h
(af_latin_script_class): Fix type.

* src/autofit/rules.mk (AUTOF_DRV_SRC): Fix typo.

Formatting.
2005-03-02 11:24:23 +00:00
David Turner 5bc063da2e * src/autofit/{rules.mk,module.mk,afangles.h}: adding missing files
* src/autofit/afloader.c: fixing small bug that could crash the engine
    with certain fonts.
2005-03-01 22:49:32 +00:00
David Turner b9c22aff61 * src/autofit/{afhints.h,afhints.c,aflatin.h,aflatin.c,afloader.c}:
various bug-fixes and drastic heap usage reduction improvements.

    * include/freetype/config/ftmodule.h: the auto-fitter is now the
    only supported auto-hinting module

    * include/freetype/config/ftstdlib.h: adding FT_INT_MAX definition
2005-03-01 15:48:29 +00:00
David Turner 6a487b59be * src/base/ftdbgmem.c (FT_DumpMemory): added sorting of memory sources
according to decreasing maximum cumulative allocations.

  * include/freetype/internal/tttypes.h, src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c,
  src/truetype/ttobjs.c, src/cff/cffobjs.c, src/sfnt/sfobjs.c: implementing new
  heap-optimized embedded bitmap loader. This one also fixes bug #12107

  * src/sfnt/sfobjs.c: fixed bug that prevented loading SFNT fonts without
  a 'kern' table.
2005-02-28 22:09:07 +00:00
David Turner 8530a22888 * include/freetype/freetype.h (FT_Glyph_Metrics, FT_GlyphSlotRec),
src/autofit/afloader.c, src/autohint/ahhint.c:
	moved the definition of 'lsb_delta' and 'rsb_delta' from FT_GlyphMetrics
	to FT_GlyphSlotRec. The old location did BREAK BINARY COMPATIBILITY
	of the library !!

        * src/sfnt/sfobjs.c: removing compiler warning
2004-06-09 20:18:35 +00:00
Werner Lemberg 89d4e4bd9a * src/autofit/afloader.c (af_loader_load_g): Set `lsb_delta' and
`rsb_delta' in slot->metrics and tune side bearings slightly.
2004-06-05 06:27:08 +00:00
David Turner e664efaddd * src/autofit/*: important fixes to the auto-fitter. The output
now seems to be 100% equivalent to the auto-hinter, while being
        about 2% faster (which proves that script-specific algorithm
        selection isn't a performance problem).

        to test it, change "autohint" to "autofit" in
        <freetype/config/ftmodule.h> and recompile.

        a few more testing is needed before making this the official
        auto-hinting module
2004-06-04 17:41:59 +00:00
Werner Lemberg 07dcc10170 formatting, doc improvements 2004-04-21 22:27:11 +00:00
David Turner 10bf05a31d * src/cff/cffobjs.c (cff_face_init): fixed a small memory leak
* src/autofit/afloader.c, src/autofit/afmodule.c, src/base/ftdebug.c:
        removed compiler warnings

        * src/autofit/aftypes.h, src/lzw/zopen.c, src/pcf/pcfdrivr.c,
        src/pcf/pcfread.c, src/psaux/psobjs.c, src/type42/t42drivr.c:
        changed data arrays to "const" to avoid populating the ".data"
        segment
2004-04-21 14:30:37 +00:00
Werner Lemberg 8bb07e6386 Add vertical phantom points.
* include/freetype/internal/tttypes.h (TT_LoaderRec): Add
`top_bearing', `vadvance', `pp3, and `pp4'.

* src/autofit/afloader.c (af_loader_load_g): Handle two more points.

* src/autohint/ahhint.c (ah_hinter_load): Handle two more points.
* src/truetype/ttgload.c (Get_VMetrics): New function.
(TT_Load_Simple_Glyph, TT_Process_Simple_Glyph): Handle two more
points.
(load_truetype_glyph): Use Get_VMetrics.
Handle two more points.
(compute_glyph_metrics): Thanks to vertical phantom points we now
can always compute `advance_height' and `top_bearing'.
* src/truetype/ttobjs.h (TT_SubglyphRec): Add vertical phantom
points.


* src/autohint/ahglyph.c (ah_outline_load): Fix allocation of
`news'.

Converting some files to Unix end-of-line convention.
2004-03-27 08:43:17 +00:00
Werner Lemberg dfa46199d2 * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h:
Add LZW module.

* Jamfile.in: Removed.

* docs/CHANGES: Updated.

* include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/,
s/ABS/FT_ABS/.  Updated all callers.

* src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c
(PCF_Face_Init): Use FT_ERROR_BASE.



Add support for PCF fonts compressed with LZW (extension .pcf.Z,
created with `compress').

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

* include/freetype/ftlzw.h: New file.
* include/freetype/config/ftheader.h (FT_LZW_H): New macro for
ftlzw.h.

* src/lzw/*: New files.

* src/pcf/pcfdrivr.c: Include FT_LZW_H.
(PCF_Face_Init): Try LZW also.

* src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate.
Beautify.
2004-03-05 09:26:24 +00:00
David Turner 9bfbf79c9f adding support for dummy script, i.e. no-hinting for non latin glyphs 2004-02-23 21:08:37 +00:00
David Turner 1029ed26af * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c,
src/autofit/afloader.c, src/types.h: grave bugs were fixed. The
        auto-fitter works, doesn't crashes, but still produces unexpected
        results !!
2004-02-23 20:40:30 +00:00
Werner Lemberg 6b3d00e1a0 * src/type1/t1load.c (parse_dict): Handle `RD' and `-|' commands
outside of /Subrs or /CharStrings.  This can happen if there is
additional code manipulating those two arrays so that FreeType
doesn't recognize them properly.
(T1_Open_Face): Improve an error message.

Remove CR/LF on many files.
2004-02-03 21:34:29 +00:00
David Turner f546bacdcf * src/sfnt/Jamfile: removing "ttcmap" from the list of sources
* src/cache/*, include/freetype/cache/*: fixing a bug after heavy
        testing. The current sources are now "release candidates" for the
        final version of the cache sub-system

        * Jamfile: updating "refdoc" target, and adding "autohint" to the
        list of modules to build. Both the autohinter and autofitter will be
        built by default. But which one will be used is determined by
        the content of "ftmodule.h"

        * src/autofit/*: much updates, but the code is still buggy as hell.
        Aargh..
2004-02-01 16:59:06 +00:00
David Turner 8ccb4552a9 updates 2004-01-16 09:51:00 +00:00
David Turner cf2c49c80c * fixed compilation problems in the cache sub-system
* partial updates to src/autofit
2003-12-24 18:42:04 +00:00
David Turner 87c0d30fc5 * include/freetype/fttypes.h
src/autofit/afangles.c
        src/autofit/aflatin.c
        src/autohint/ahglyph.c
        src/autohint/ahhint.c
        src/base/ftcalc.c
        src/base/ftgloadr.c
        src/base/ftglyph.c
        src/base/ftobjs.c
        src/base/ftsynth.c
        src/base/fttrigon.c
        src/cff/cffgload.c
        src/cid/cidgload.c
        src/cid/cidload.c
        src/pfr/pfrgload.c
        src/pfr/pfrload.c
        src/pfr/pfrsbit.c
        src/psaux/psobjs.c
        src/pshinter/pshalgo.c
        src/pshinter/pshglob.c
        src/pshinter/pshrec.c
        src/raster/ftrend1.c
        src/sfnt/ttcmap0.c
        src/smooth/ftsmooth.c
        src/truetype/ttdriver.c
        src/truetype/ttgload.c
        src/truetype/ttinterp.c
        src/truetype/ttobjs.c
        src/type1/t1gload.c
        src/winfonts/winfnt.c:

          use of the FT_PAD_XXX and FT_PIX_XXX macros to avoid compiler
          warnings with very pedantic compilers. Hints:  (x) & -64 will
          warn if (x) is not signed.. use (x) & ~63 instead !
2003-12-24 01:10:46 +00:00
David Turner 57ecae22a7 new version of the cache sub-system - still under debugging 2003-12-19 21:23:58 +00:00
David Turner ff9d2415a7 * src/autofit/*: more updates 2003-11-23 21:39:51 +00:00
David Turner d25ad56d78 * src/autofit/*: adding first sources of the new multi-script
"auto-fitter"

        * include/freetype/ftoutln.h, src/base/ftoutln.c: adding the
        definition of FT_Outline_Get_Orientation, used to compute the
        fill orientation of a given glyph outline.

        * include/freetype/internal/ftserv.h: fixed trivial bug which
        could crashed the font engine when a cached service pointer was
        retrieved with FT_FACE_LOOKUP_SERVICE
2003-10-02 21:07:10 +00:00