Commit Graph

1643 Commits

Author SHA1 Message Date
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