Commit Graph

176 Commits

Author SHA1 Message Date
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
David Turner c6a92202c2 various clean-ups:
- using FT_UNUSED instead of UNUSED
- using FT_LONG64 and FT_INT64 instead of LONG64 & INT64
- using FT_SIZEOF_INT & FT_SIZEOF_LONG instead of...

- removed the #ifdefs that used SIZEOF_INT, instead we now
  use FT_Int32 and FT_UInt32 when needed to support
  32-bits quantity correctly on 64-bits systems..
2000-07-04 18:12:13 +00:00
David Turner 5ae831c101 changes used to implement the auto-hinting support 2000-06-30 01:31:22 +00:00
Werner Lemberg a929ba9b20 applying formatting again 2000-06-25 06:47:11 +00:00
David Turner f0df85ba2a - MAJOR INTERNAL REDESIGN:
A lot of internal modifications have been performed lately on the
    source in order to provide the following enhancements:

      - more generic module support:

        The FT_Module type is now defined to represent a handle to a given
        module. The file <freetype/ftmodule.h> contains the FT_Module_Class
        definition, as well as the module-loading public API

        The FT_Driver type is still defined, and still represents a pointer
        to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
        FT_Get_Driver by FT_Get_Module, etc..


      - support for generic glyph image types:

        The FT_Renderer type is a pointer to a module used to perform various
        operations on glyph image.

        Each renderer is capable of handling images in a single format
        (e.g. ft_glyph_format_outline). Its functions are used to:

           - transform an glyph image
           - render a glyph image into a bitmap
           - return the control box (dimensions) of a given glyph image


        The scan converters "ftraster.c" and "ftgrays.c" have been moved
        to the new directory "src/renderer", and are used to provide two
        default renderer modules.

        One corresponds to the "standard" scan-converter, the other to the
        "smooth" one.

        The current renderer can be set through the new function
        FT_Set_Renderer.

        The old raster-related function FT_Set_Raster, FT_Get_Raster and
        FT_Set_Raster_Mode have now disappeared, in favor of the new:

           FT_Get_Renderer
           FT_Set_Renderer

        see the file <freetype/ftrender.h> for more details..

        These changes were necessary to properly support different scalable
        formats in the future, like bi-color glyphs, etc..


      - glyph loader object:

        A new internal object, called a 'glyph loader' has been introduced
        in the base layer. It is used by all scalable format font drivers
        to load glyphs and composites.

        This object has been created to reduce the code size of each driver,
        as each one of them basically re-implemented its functionality.

        See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
        more information..



      - FT_GlyphSlot had new fields:

        In order to support extended features (see below), the FT_GlyphSlot
        structure has a few new fields:

           linearHoriAdvance:  this field gives the linearly scaled (i.e.
                               scaled but unhinted) advance width for the glyph,
                               expressed as a 16.16 fixed pixel value. This
                               is useful to perform WYSIWYG text.

           linearVertAdvance:  this field gives the linearly scaled advance
                               height for the glyph (relevant in vertical glyph
                               layouts only). This is useful to perform
                               WYSIWYG text.

        Note that the two above field replace the removed "metrics2" field
        in the glyph slot.

           advance:   this field is a vector that gives the transformed
                      advance for the glyph. By default, it corresponds
                      to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
                      was specified when calling FT_Load_Glyph or FT_Load_Char

           bitmap_left: this field gives the distance in integer pixels from
                        the current pen position to the left-most pixel of
                        a glyph image WHEN IT IS A BITMAP. It is only valid
                        when the "format" field is set to
                        "ft_glyph_format_bitmap", for example, after calling
                        the new function FT_Render_Glyph.

           bitmap_top:  this field gives the distance in integer pixels from
                        the current pen position (located on the baseline) to
                        the top-most pixel of the glyph image WHEN IT IS A
                        BITMAP. Positive values correspond to upwards Y.

           loader:  this is a new private field for the glyph slot. Client
                    applications should not touch it..


      - support for transforms and direct rendering in FT_Load_Glyph:

        Most of the functionality found in <freetype/ftglyph.h> has been
        moved to the core library. Hence, the following:

          - a transform can be specified for a face through FT_Set_Transform.
            this transform is applied by FT_Load_Glyph to scalable glyph images
            (i.e. NOT TO BITMAPS) before the function returns, unless the
            bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..


          - once a glyph image has been loaded, it can be directly converted to
            a bitmap by using the new FT_Render_Glyph function. Note that this
            function takes the glyph image from the glyph slot, and converts
            it to a bitmap whose properties are returned in "face.glyph.bitmap",
            "face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
            native image might be lost after the conversion.


          - when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
            and FT_Load_Char functions will call FT_Render_Glyph automatically
            when needed.
2000-06-22 00:17:42 +00:00
Werner Lemberg 9ca2af3838 A new formatting orgy.
Added some `#if 0' to completely disable the CID AFM stuff.  In case this is
not correct please fix.
2000-06-21 03:03:28 +00:00
David Turner f9b8dec437 major reformatting of the modules source code in order to get
rid of most of the basic types redefinitions (i.e. FT_Int instead
of "FT_Int", etc..)

The format-specific prefixs like "TT_", "T1_", "T2_" & 'CID_"
are now only used in relevant structures..

fixed Werner's fix to t2gload.c :-)
other small bug fixes
2000-06-16 19:34:52 +00:00
Werner Lemberg e3c11d7f00 A new round of formatting, adding/fixing documentation etc. 2000-06-16 06:49:56 +00:00
Werner Lemberg 7a4fda8821 The next round of formatting, checking documentation, etc. 2000-06-13 23:21:00 +00:00
Werner Lemberg 78575dc0d1 A lot of formatting.
Added more tracing levels.

More Makefile fixes.

Minor other changes.
2000-06-12 19:36:41 +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 51179f0ae3 some fixes for 64-bit systems. Mainly changed some
FT_TRACE calls to use %p instead of %lx when dumping
a pointer address
2000-05-18 16:18:05 +00:00
David Turner 109fcf6086 fixed the sbit loader (src/base/sfnt/ttsbit.c)
introduced a new load flag (FT_LOAD_CROP_BITMAP) used
to indicate that we want embedded bitmaps to be cropped..

Thanks a lot to Yamano-uchi, Hidetoshi
2000-05-17 23:35:37 +00:00
David Turner e49ab25c08 formatting - removed trailing spaces 2000-05-16 23:44:38 +00:00
David Turner c30aea9846 another massive changes in order to completely avoid
compiler warnings with GCC + "-ansi -pedantic -Wall -W"
and LCC.

Also fixed the compilation of "type1z" with Win32-LCC
(its pre-processor is broken !!)

Updated the BUILD document too
2000-05-12 15:01:18 +00:00
David Turner bfe2f98f1f a new massive grunt work. Redefined the EXPORT_DEF,
EXPORT_FUNC, BASE_DEF and BASE_FUNC macros to
let them take an argument..

This is needed to compile the library as a DLL on some platforms
that have different compiler conventions..
2000-05-12 12:17:15 +00:00
David Turner 4f2c5544bb additional changes, this time in order to pass extra parameters
to font drivers when creating a new face object.

The FT_Open_Args structure has been changed to simplify
its use and allow generic parameters too..
2000-05-12 10:19:41 +00:00
David Turner efce08d67c major re-organisation of the FreeType 2 directory hierarchy 2000-05-11 18:23:52 +00:00
David Turner d186a361a1 various updates to reduce the compilation warnings 2000-05-02 17:41:41 +00:00
David Turner f8a116fb93 implemented extra interface for "FT_Get_Sfnt_Table" 2000-04-25 16:11:12 +00:00
David Turner 0f99ddda5f changed the structure of FT_Outline in order to pack
all outline flags in a single integer..

Changed the rest of the library and demo programs
accordingly..
2000-03-06 13:23:32 +00:00
Just van Rossum 8c5c932e46 fixed typo in comment 2000-03-02 10:53:32 +00:00
David Turner dba4b3243a small update to the kerning code 2000-02-10 16:08:59 +00:00
David Turner 8f43c714a5 A major refresh of the TrueType driver :
- some #ifdefs were included in order to _not_
  compile support for the bytecode interpreter
  when FT_CONFIG_OPTION_BYTECODE_INTERPRETER
  is not defined in "ttconfig.h"

- the glyph loader has been seriously re-designed. It is now
  smaller, simpler and should load composites a bit faster

- works with the TrueType debugger
2000-02-02 12:16:19 +00:00
David Turner d42c68e855 many new small, but important, changes there:
- modified the interface of the "sfnt" module. There is now a function
    called "load_format_tag", and another called "load_directory".

    The first one is in charge of returning the 4-byte tag located at
    the beginning of a given font file. It understand TrueType collections
    and parses them automatically

    The second loads the table directory that is located just after
    the format tag.

    This is useful, because the "SFNT" storage scheme can be used by
    several distinct formats, each with its own format tag.

    The TrueType driver now checks the format tag in "src/truetype/ttobjs.c"

  - made some changes to "src/shared/t1types.h" to clearly separate the
    Type 1 font content from the rest of the T1_Face structure. This
    will be useful when adding the CFF/Type2 driver that will be able
    to reuse the "T1_Font" structure within a "TT_Font" one (which
    really describes a SFNT-based font file).

    Some changes in "src/type1" were thus performed to reflect this.
    Note that the current type1 driver will be discontinued in a
    distant future. More on this later..
2000-01-27 13:56:02 +00:00
David Turner d2b1f35704 Initial revision 1999-12-16 23:11:37 +00:00