Commit Graph

31 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 e35cac66c6 A complete revision of FreeType 2's GNU makefiles (of the library):
Tons of unnecessary stuff have been removed; only the essential rules
  have been retained.

  The source files now depend on all header files in include/freetype,
  include/freetype/config, and include/freetype/internal.  This is not
  optimal, I know, and I'll try to improve this, but it is better than
  before (namely no dependencies on `internal').

  FTDEBUG_SRC has been added (similar to FTSYS_SRC) -- I don't know
  exactly whether this is really useful, but it doesn't harm.

  There is now more documentation in the makefiles itself.

io-frames.html: Use of <th>, <code>, and <var> for better tagging.

Reactivating of FT_DEBUG_LEVEL_xxx macros.

Added a lot of #include directives to make `multi' builds possible -- note
that currently the modules cid, t1, and t1z have clashing structures and
functions which means that you can only use one of these three modules for a
multi build.

Added some missing function declarations to (local) header files.

Renamed some T1_Open_Face() to CID_Open_Face() in the cid module -- a lot
of other functions should be renamed also...

Replaced many FT_xxx stuff with T1_xxx in t1z driver -- this isn't finished
yet...

Fixed FT_Free() to allow a NULL pointer without an assertion (this has
always been a valid assumption in FreeType, at least in FT 1.x).

A lot of other, minor fixes (mostly documentation).
2000-06-11 03:46:57 +00:00
Werner Lemberg 9a754ce32b Formatting; adding some tracing code. 2000-06-02 21:31:32 +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 8c62a12062 another fix for the build system (the module list wasn't
taken from the correct location)

plus a small update in the tutorial to reflect the fact that
we know use the "freetype" directory prefix for header
inclusion
2000-05-11 19:06:03 +00:00
David Turner 787183ea64 re-added the "freetype.mk" that was mistakenly deleted 2000-05-11 18:47:02 +00:00
David Turner efce08d67c major re-organisation of the FreeType 2 directory hierarchy 2000-05-11 18:23:52 +00:00
David Turner 06b73729c1 added FT_CONFIG_OPTION_OLD_CALCS to ensure that
the bytecode interpretation is exactly the same as in 1.4

this is needed to find a bug in the raster..
2000-05-02 11:04:18 +00:00
David Turner 65e823da0f raised TT_MAX_SUBGLYPHS to 96 to avoid problems
with Asian fonts (with up to 80 contours !)
2000-04-25 16:36:31 +00:00
David Turner 231d0587b0 raised the value of TT_MAX_SUBGLYPHS, as it prevented
the correct loading of some glyphs in Mingli.ttf
2000-04-14 10:29:00 +00:00
David Turner 521e2bc804 Added pre-liminary autoconf support files for Unix. Note that these don't work
correctly for now and will be updated later. They are currently ignored by the
build system.

You can however run `autoconf' when in "freetype2/config/unix" to generate
the `configure' script there.

Then, launch `configure' while in "config/unix". This will generate the
following files:

  - ftconfig.h
  - unix.mk
  - libtool

copy "unix.mk" to "freetype2/config.mk", then run make from the top-level
directory.

Note that for now, these file compile the library (with libtool). However,
installing isn't supported yet, as well as compiling the demo programs..
2000-04-10 12:11:33 +00:00
David Turner 37379e2170 major changes to the library:
- there is now a "convenience" API to manage glyphs in
   "include/ftglyph.h". See the demo program "ftstring" for
   an example..

  - the raster interface has been changed in order to allow
    direct composition through user-provided callbacks. This
    has been tested but isn't demonstrated for now in "demos"

 - the FT_LOAD_NO_RECURSE flag is supported, as this is
   required by some new code in the auto-hinting engine

 - some bug fixed in FT_MulFix which made FT_xxx_Transform
   return incorrect results..
2000-03-28 11:22:31 +00:00
Just van Rossum 05ef28c4ad Added mac FOND driver, and use t1z driver instead of the "old" t1 driver. 2000-03-17 11:48:25 +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
Werner Lemberg febe3fbeba A first check of FT2's Make system. Many smaller and larger bugs have been
fixed:

. Removing unused variables.

. detect.mk files now must provide $(CONFIG_FILE) and not $(CONFIG_RULE).

. ansi.mk will now be really used as a fallback if the detect mechanism
  fails.

. ANSIFLAGS will now be really used (fixing a typo).

. `make clean' now works (again two typos).

. Detection of gcc on Unix has been fixed (using the `-v' option instead of
  `--version').

. `make devel' now works (on Unix).

. Fixing *again* a bug in demos/graph/x11/rules.mk to allow multiple use
  of `-L' compiler options.

. $(BASE_H) now contains a few more header files.

As usual, a lot of formatting (not finished yet).
2000-03-05 01:14:19 +00:00
Just van Rossum 7ba2c674a6 readme file: needs copyright notice 2000-03-02 01:42:48 +00:00
Just van Rossum 2e8482b31d Mac modules file. For now the same as the default, minus the t1z driver. First step in adding a Mac FOND driver... 2000-03-02 01:28:18 +00:00
Just van Rossum 926c81c8ba CodeWarrior Pro4 project file to build the FT library under MacOS 2000-03-02 01:26:53 +00:00
David Turner c75f71e049 fix 2000-02-29 17:12:03 +00:00
David Turner 7bda46d094 updated the build system to avoid file duplication :
- All "common" ANSI files were moved to "freetype2/config"
- The modules list is in "config" now (instead of
  config/<system>")
- All system-specific configuration Makefiles have been
  renamed. E.g.  "config/win32/Makefile.gcc" is now
  "config/win32/w32-gcc.mk"
- Updated "config/freetype.mk" and "config/modules.mk"
2000-02-29 16:56:18 +00:00
David Turner 9ac7fa16ff small update in config files 2000-02-28 11:32:17 +00:00
David Turner 35eee3f307 removed the reference to 'type1z' in order to allow compilation under OS/2 2000-02-22 13:53:01 +00:00
David Turner 4ea18e5573 added some configuration macros 2000-02-17 10:25:24 +00:00
David Turner 5194f8bf8a fixed a small bug that prevented the modules list to
be properly erased on Win32 when invoking
"make modules" from the top directory..
2000-02-02 12:48:20 +00:00
David Turner d00a8ce6f2 some updates. The yesterday modifications prevented the demo
programs from compiling under Unix. fixed..
2000-01-18 09:52:08 +00:00
Eric Olson 702b8d52cf Removed obsolete file in uppercase. FTOPTION.H has fallen behind the
ftoption.h file. Its continued presence causes some problems with case
insensitive systems.
--Eric
2000-01-17 19:44:07 +00:00
David Turner 281f9f6a13 Important changes were performed to clean up the makefiles,
these will be detailed later in a document (the work is not
completely finished).
2000-01-17 11:20:26 +00:00
David Turner 62ccef7547 added Windows NT detection 2000-01-07 14:37:00 +00:00
David Turner f8bf6e2bc9 Added the file `config/modules.mk' used to generate the file
`config/<platform>/ftmodule.h' which contains the list of available
font drivers.

The list can be re-generated with "make modules" from the top directory
1999-12-29 00:19:37 +00:00
David Turner b4a98378e1 fixed a bug in ftsystem that prevented the library from reading files 1999-12-21 14:08:00 +00:00
David Turner d2b1f35704 Initial revision 1999-12-16 23:11:37 +00:00