Commit Graph

128 Commits

Author SHA1 Message Date
David Turner 888706a317 removing obsolete files 2000-08-23 22:50:39 +00:00
Werner Lemberg 29a90e2610 Updating unix/ftconfig.in to recent config/ftconfig.h changes.
More C++ fixes: Introducing LOCAL_FUNC_X for local functions used in
function pointers (there are no local anonymous functions in C++) and
FT_CPLUSPLUS (instead of FT_EXPORT_VAR) to define linkage of structures
which contain function pointers.
2000-08-03 00:03:08 +00:00
Werner Lemberg 3a89c2a4ac Removing FT_MAKE_OPTION_SINGLE_LIBRARY_OBJECT. It has never worked.
Instead, define BASE_DEF() and BASE_FUNC() similarly to FT_EXPORT_DEF() and
FT_EXPORT_FUNC(), respectively, allowing the programmer to define proper
types and/or export lists for multiple DLLs if necessary (e.g. ftbase.dll --
standalone, fttype1.dll -- needs ftbase.dll, etc.).

The library is finally compiling and linking natively with a C++ compiler!
2000-08-01 17:05:20 +00:00
Werner Lemberg d060a75b0d Formatting.
Rudimentary support for autoconf (still using GNU make)

Say `make unix'.
2000-07-20 06:57:41 +00:00
David Turner 6930b45f78 - introduced FT_Get_Glyph_Name (see freetype.h)
to access individual glyph names. Changed some
  drivers to support it through a new interface named
  "glyph_name".

- introduced FT_Get_Sfnt_Name (see ftnames.h)
  to access the SFNT name table in a TrueType/OpenType
  file..
2000-07-19 17:13:03 +00:00
Werner Lemberg b48a6094b2 Formatting.
Moving some internal structures and constants from freetype.h to ftobjs.h.

Finally removing FT_LOAD_ANTI_ALIAS.

Cleaning up all error codes.  Only the used ones have survived :-)

Removed unused FT_MAX_GLYPH_FORMATS constant.

T2 error codes are now in the range 0x500-0x5FF (instead of `TrueDoc').

Some minor improvements of error return values.

Finally fixing error code values in ftraster and ftgrays to be compliant
with all other FT error codes.
2000-07-09 19:15:30 +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
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
Werner Lemberg 768c9561f6 Formatting. Fixing some tracing messages. 2000-07-03 07:09:09 +00:00
David Turner 81bb4ad937 latest clean-ups..
The code compiles with NO WARNINGS with GCC and
Visual C++ (also with LCC minus debugging options)
2000-06-28 04:19:49 +00:00
David Turner 385bedb832 formatting 2000-06-27 23:22:49 +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
David Turner e49ab25c08 formatting - removed trailing spaces 2000-05-16 23:44:38 +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 efce08d67c major re-organisation of the FreeType 2 directory hierarchy 2000-05-11 18:23:52 +00:00
David Turner 4d3e56392f closed most of the memory leaks in the Type 1 driver(s)
this is required before any serious work to implement
multiple masters
2000-05-05 12:33:23 +00:00
David Turner d186a361a1 various updates to reduce the compilation warnings 2000-05-02 17:41:41 +00:00
Just van Rossum 80f4b060e3 fixed typo in comment 2000-03-05 16:10:10 +00:00
David Turner 861ba624db small fix (reduce compiler warnings) 2000-02-15 12:54:51 +00:00
David Turner 3188a3a112 Sorry, forgot some changes needed to get rid of
t1encode.[hc]. Here they come..
2000-02-13 13:34:18 +00:00
David Turner 1ab77fdfff some updates to make everything compile clean 2000-02-10 18:08:17 +00:00
David Turner afdc4c4c2b Updates to the Type 1 driver
Now with a simple AFM parser in order
to read the kerning table..
2000-02-10 16:08:36 +00:00
David Turner 51d4e28daf New version of the Type 1 driver.
Generates a Unicode charmap on the fly
through the "psnames" module..

Now, we only need to support afm/pfm
files (and maybe multiple masters) to call
this driver finished !!
2000-02-10 13:11:43 +00:00
David Turner d2b1f35704 Initial revision 1999-12-16 23:11:37 +00:00