Commit Graph

548 Commits

Author SHA1 Message Date
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 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 3d99f79669 finally fixed that crazy Type 1 hinter..
it still sucks though .. ;-)
2000-06-07 23:06:10 +00:00
David Turner 6cef627d17 added code to correctly scale global metrics 2000-06-07 20:06:54 +00:00
Werner Lemberg e1d5dd78f4 Moved all *errors.h header files to include/freetype/internal for
consistency.

Removed unused error message.
2000-06-07 04:48:12 +00:00
David Turner 04aa800ce9 added a CID-keyed font driver in "src/cid"
fixed two bugs in the smooth renderer
2000-06-01 03:27:48 +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 fea68c6800 fixed two minor bugs:
- the glyph index was not checked in FT_Load_Glyph
  - the "type1" driver didn't read the FontBBox and FontMatrix
    correctly..
2000-05-26 06:40:49 +00:00
David Turner 936d2e072b a small change to allow the "type1" driver to detect
multiple master fonts and return an error code that allows
the "type1z" driver to load them after..
2000-05-26 02:16:06 +00:00
David Turner 1c9a1cab3f important modifications to the Type1z driver
these are used to prepare for multiple master fonts
2000-05-24 21:12:02 +00:00
David Turner 1fb6eea7d1 EXPORT_DEF renamed to FT_EXPORT_DEF +
reformating/spacing
2000-05-24 00:31:14 +00:00
David Turner f5dcdd5cfb minor fix to the Type1 driver(s) to apply the font matrix when
necessary..
2000-05-23 22:16:27 +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 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
David Turner 9a9315faae changes to reflect the new files
include/tttables.h
  include/t1tables.h
2000-05-02 10:59:01 +00:00
David Turner 90a36c5522 a small improvement to the Type 1 hinter, that
comes from research with the auto-hinter. Nothing
fancy but gets rid of the un-normalized widths :-)
2000-04-04 18:21:45 +00:00
David Turner 82942cc279 simple fix required by the auto-hinting module
(sets the ft_outline_reverse_fill bit_flag)
2000-03-30 08:43:03 +00:00
David Turner ed7f62aca5 support for FT_LOAD_NO_RECURSE needed by the auto-hinter 2000-03-28 11:19:28 +00:00
David Turner 7f7aadf4f7 finished moving all configuration macros to
"config/ftoption.h"
2000-03-13 12:57:27 +00:00
David Turner 3246efedcd first step towards moving all configuration options
to the single "config/ftoption.h"
2000-03-13 12:12:46 +00:00
David Turner 7f615aef5e renamed all outlines functions to the
FT_Outline_<action> syntax..
2000-03-13 11:49:20 +00:00
David Turner 41dbcbf628 reformatting, changing the FT_Outline structure:
- "flags" have been renamed to "tags"
  - "outline_flags" have been renamed to "flags"

Look for more re-formatting today..
2000-03-09 11:46:25 +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
David Turner 9d76a8d67a a few fixes to get rid of unwanted compile-time warnings 2000-03-06 09:51:19 +00:00
Just van Rossum 80f4b060e3 fixed typo in comment 2000-03-05 16:10:10 +00:00
David Turner ca13392d83 a few changes to really compile font drivers in
independent single objects..
2000-03-01 13:24:38 +00:00
David Turner e595014a64 simple minor fix in t1afm.h/t1afm.c 2000-02-29 17:14:02 +00:00
David Turner 9c84887db3 remaining fixes from Just 2000-02-28 11:32:54 +00:00
David Turner 7bb7fedef1 fixed a bug which appeared when loading
unscaled composite glyphs
2000-02-28 11:23:36 +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 5ae1259c03 removed the "t1encode" files which are now
obsolete with the "psnames" module
2000-02-10 19:17:24 +00:00
David Turner 1ab77fdfff some updates to make everything compile clean 2000-02-10 18:08:17 +00:00
David Turner a8635cc626 Very simple AFM Parser 2000-02-10 16:15:11 +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 76bbd5793f the T1_Face definition changed slightly to clearly separate the
Type 1 font content from the rest. This implied some changes to
the following files.
2000-01-27 13:35:16 +00:00
David Turner 3ba47068a6 some updates to the "rules.mk" files. Basically, we now
use "$(FT_COMPILE)" instead of "$(FT_CC)" in order to
compile the library.

$(FT_COMPILE) uses the $(ANSI_FLAGS) variable used to
define ANSI-compliance flags for the current compiler. It is used
to compile the library exclusively (some demo programs will _not_
compile properly with these flags set).
2000-01-17 11:25:57 +00:00
David Turner ef87970dfb A few modifications to allow more broken fonts to
be loaded by the driver.
2000-01-13 18:19:10 +00:00
David Turner 10effdf61e Added the rules files `module.mk' to "sfnt", "truetype" and "type1" to
reflect the new modules/drivers list management performed through the
file `freetype2/config/modules.mk'

Changed the driver header files to reflect the new modules/drivers
list management. We get rid, at last, of the infamous pre-processor
tricks used to build the list at compile time.

`src/base/ftinit.c' is also modified to reflect the changes..
1999-12-29 00:22:24 +00:00
David Turner d2b1f35704 Initial revision 1999-12-16 23:11:37 +00:00