Commit Graph

32 Commits

Author SHA1 Message Date
Moazin Khatti 0bf49bd229 Add 'svg' module for OT-SVG rendering.
* CMakeLists.txt (BASE_SRCS): Add svg module file.
* meson.build (ft2_public_headers): Add `otsvg.h`.

* modules.cfg (RASTER_MODULES): Add `svg` module.

* builds/meson/parse_modules_cfg.py: Add svg module.

* include/freetype/config/ftmodule.h: Add `ft_svg_renderer_class`.
* include/freetype/fterrdef.h: Add `Invalid_SVG_Document` and
`Missing_SVG_Hooks` error codes.
* include/freetype/internal/fttrace.h: Add tracing for `otsvg`.
* include/freetype/internal/svginterface.h: New file.  It adds an interface
to enable the presetting hook from the `base` module.
* include/freetype/otsvg.h (SVG_Lib_Init_Func, SVG_Lib_Free_Func,
SVG_Lib_Render_Func, SVG_Lib_Preset_Slot_Func): New hooks for SVG rendering.
(SVG_RendererHooks): New structure to access them.

* src/base/ftobjs.c: Include `svginterface.h`.
(ft_glyphslot_preset_bitmap): Add code for presetting the slot for SVG
glyphs.
(ft_add_renderer): Updated.

* src/svg/*: New files.
2022-01-20 16:45:18 +00:00
Alexei Podtelezhnikov 81852fbccc Prioritize the anti-aliasing renderer module.
* modules.cfg: Reorder the renderers.
* include/freetype/config/ftmodule.h: Ditto.
2021-05-18 22:18:17 -04:00
Anuj Verma c6f394bf7d [sdf] Add 'sdf' module to non-gnumake build systems.
* include/freetype/config/ftmodule.h: Add both the 'sfd' and 'bsfd'
renderers to the list of modules.

* CMakeLists.txt (BASE_SRCS): Add 'sdf' single-object module.
2020-12-24 07:23:48 +01:00
Alexei Podtelezhnikov 652f886319 [smooth] Stop using dedicated LCD modules and classes.
The LCD modules were never truly independent. They mostly served as
a way to disable patented LCD rendering, which is no longer necessary.
The `smooth' module now handles LCD modes as well.

* src/smooth/ftsmooth.c (ft_smooth_lcd_renderer_class.
ft_smooth_lcdv_renderer_class): Deleted.
(ft_render_smooth): Reworked from `ft_render_smooth_generic'.
* src/smooth/ftsmooth.h: Remove dedicated LCD classes.
* src/smooth/module.mk: Remove dedicated LCD modules.
* include/freetype/config/ftmodule.h: Ditto.
* builds/amiga/include/config/ftmodule.h: Ditto.
* include/freetype/ftmodapi.h: Do not mention LCD modules.
2020-05-11 23:30:37 -04:00
Werner Lemberg 1061748256 include/freettype/config:*.*: Convert comments to Markdown syntax.
Also some minor documentation fixes.
2018-09-03 10:37:57 +02:00
Werner Lemberg f999375a9a [GSoC] include/*.*, devel/*.*: Convert block comments to `light' style.
This second and final monster commit was created by applying Nikhil's
scripts `docconverter.py' and `markify.py' to all C header and source files,
followed up by minor manual clean-up.

No change in functionality, of course.

I used commit f7419907bc6044b9b7057f9789866426c804ba82 from
https://github.com/nikramakrishnan/freetype-docs.git.
2018-06-03 22:00:42 +02:00
Werner Lemberg 392cf22f8a Another adjustment to header locations.
This change is a result of a discussion thread on freetype-devel

  http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html

Re-introduce the `freetype2' subdirectory for all FreeType header
files after installation, and rename the `freetype2' subdirectory in
the git repository to `freetype'.

* include/freetype2: Renamed to...
* include/freetype: This.

* CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
PRIVATE_HEADERS): Updated.
Update creation of `ftconfig.h'.
Install generated `ftconfig.h'.

* Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.

* builds/amiga/include/config/ftconfig.h, builds/freetype.mk
(PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
builds/unix/freetype2.in: Updated.

* builds/unix/freetype-config.in: Updated.
* builds/unix/configure.raw: Don't check for `rmdir'.
* builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
according to the autoconf info manual.
* builds/unix/install.mk (install, uninstall,
distclean_project_unix): Update and simplify.

* builds/wince/*, builds/windows/*: Updated.

* devel/ft2build.h, include/ft2build.h: Updated.

* include/freetype2/config/ftheader.h,
include/freetype2/internal/ftserv.h,
include/freetype2/internal/internal.h: Update all header file
macros.

* src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.

* docs/*: Updated.
2015-06-26 06:48:00 +02:00
Werner Lemberg fae3820764 Simplify header file hierarchy.
This large patch changes the header file directory layout from
`include/freetype/...' to `include/...', effectively removing one
level.  Since the file `ft2build.h' is also located in `include'
(and it stays there even after installation), all FreeType header
files are now in a single directory.

Applications that use (a) `freetype-config' or FreeType's
`pkg-config' file to get the include directory for the compiler, and
(b) the documented way for header inclusion like

  #include <ft2build.h>
  #include FT_FREETYPE_H
  ...

don't need any change to the source code.

* include/freetype/*: Move up to...
* include/*: ... this directory.

* builds/amiga/include/freetype/*: Move up to...
* builds/amiga/include/*: ... this directory.

*/*: Essentially do `s@/freetype/@/@' where appropriate.

* CMakeList.txt: Simplify.
* builds/unix/freetype-config.in, builds/unix/freetype2.in: For
`--cflags', return a single directory.
* builds/unix/install.mk (install): No longer try to remove `cache'
and `internal' subdirectories; instead, remove the `freetype'
subdirectory.
2013-11-13 08:55:46 +01:00
Werner Lemberg ce33a312da FT_USE_MODULE declares things as:
extern const FT_Module_Class

(or similar for C++).  However, the actual types of the variables
being declared are often different, e.g., FT_Driver_ClassRec or
FT_Renderer_Class.  (Some are, indeed, FT_Module_Class.)

This works with most C compilers (since those structs begin with an
FT_Module_Class struct), but technically it's undefined behavior.

To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
paragraph 2:

  All declarations that refer to the same object or function shall
  have compatible type; otherwise, the behavior is undefined.

(And they are not compatible types.)

Most C compilers don't reject (or even detect!) code which has this
issue, but the GCC LTO development branch compiler does.  (It
outputs the types of the objects while generating .o files, along
with a bunch of other information, then compares them when doing the
final link-time code generation pass.)

Patch from Savannah bug #25133.

* src/base/ftinit.c (FT_USE_MODULE): Include variable type.

* builds/amiga/include/freetype/config/ftmodule.h,
include/freetype/config/ftmodule.h, */module.mk: Updated to declare
pass correct types to FT_USE_MODULE.
2008-12-21 10:29:30 +00:00
Werner Lemberg 59939244ad Implement new, simplified module selection. With GNU make it is now
sufficient to modify a single file, `modules.cfg', to control the
inclusion of modules and base extension files.

This change also fixes the creation of ftmodule.h; it now depends on
`modules.cfg' and thus is rebuilt only if necessary.

Finally, a version of `ftoption.h' in OBJ_DIR is preferred over the
default location.

* modules.cfg: New file.

* builds/freetype.mk: Don't include `modules.mk'.
Include all `rules.mk' files as specified in `modules.cfg'.
(FTOPTION_FLAG, FTOPTION_H): New variables.
(FT_CFLAGS): Add macro definition for FT_CONFIG_MODULES_H.
Add FTOPTION_FLAG.
($(FT_INIT_OBJ)): Don't use FT_MODULE_LIST.
(CONFIG_H): Add FTMODULE_H and FTOPTION_H.
(INCLUDES): Add DEVEL_DIR.
(INCLUDE_FLAGS, FTSYS_SRC, FTSYS_OBJ, FTDEBUG_SRC, FTDEBUG_OBJ,
OBJ_M, OBJ_S): Use `:=', not `='.
(remove_ftmodule_h): New phony target to delete `ftmodule.h'.
(distclean): Add remove_ftmodule_h.

* builds/modules.mk: (MODULE_LIST): Removed.
(make_module_list, clean_module_list): Replace targets
with...
(FTMODULE_H_INIT, FTMODULE_H_CREATE, FTMODULE_H_DONE): New
variables.  Reason for the change is that it is not possible to have
a phony prerequisite which is run only if the target file must be
rebuilt (phony prerequisites act like subroutines and are *always*
executed).  We only want to rebuild `ftmodule.h' if `module.cfg' is
changed.
Update all callers.
($FTMODULE_H)): Rule to create `ftmodule.h', depending on
`modules.cfg'.

* builds/toplevel.mk: Rewrite and simplify module handling.
(MODULES_CFG, FTMODULE_H): New variables.
Include MODULES_CFG.
(MODULES): New variable to include all `module.mk' and `rules.mk'
files.  We no longer use make's `wildcard' function for this.

* Makefile (USE_MODULES): Remove.  Update all users.
(OBJ_DIR): Define it here.

* src/*/module.mk: Change

    make_module_list: foo
    foo: ...

to

    FTMODULE_H_COMMANDS += FOO
    define FOO
    ...
    endef

in all files.  `FTMODULE_H_COMMANDS' is used in `FTMODULE_H_CREATE'.

* src/base/rules.mk (BASE_EXT_SRC): Use BASE_EXTENSIONS.

* builds/unix/detect.mk (setup): Always execute `configure' script.
(have_mk): Rename to...
(have_Makefile): This.
Don't use `strip' function.

* builds/unix/unix.mk: Include `install.mk' only if BUILD_PROJECT is
defined.
(have_mk): Don't use `strip' function.
Test for unix-def.mk in OBJ_DIR, not BUILD_DIR (and invert the test
accordingly).

* builds/unix/install.mk (install, uninstall): Handle `ftmodule.h'.

* builds/os2/os2-dev.mk, builds/unix/unix-dev.mk,
builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk: Don't define
BUILD_DIR but DEVEL_DIR for development header files.

* builds/ansi/ansi-def.mk (TOP_DIR, OBJ_DIR),
builds/beos/beos-def.mk (TOP_DIR, OBJ_DIR), builds/unix/unix-def.in
(TOP_DIR, OBJ_DIR): Removed.  Defined elsewhere.

* builds/dos/dos-def.mk (OBJ_DIR), builds/os2/os2-def.mk (OBJ_DIR),
builds/win32/win32-def.mk (OBJ_DIR): Removed.  Defined elsewhere.

* builds/unix/unixddef.mk: Don't define BUILD_DIR but DEVEL_DIR for
development header files.
Don't define PLATFORM.

* configure: Copy `modules.cfg' to builddir if builddir != srcdir.
Update snippet taken from autoconf's m4sh.m4 to current CVS version.
Be more verbose.

* include/freetype/config/ftmodule.h: Add comments -- this file is
no longer used if FreeType is built with GNU make.

* docs/CHANGES, docs/CUSTOMIZE, docs/INSTALL, docs/INSTALL.ANY,
docs/INSTALL.GNU, docs/INSTALL.UNX: Document new build mechanism.
Other minor updates.

* modules.txt: Removed.  Contents included in `modules.cfg'.


* include/freetype/internal/ftmemory.h (FT_QAlloc_Debug,
FT_Free_Debug) [FT_STRICT_ALIASING]: Fix typos.

* src/base/ftdbgmem.c (FT_Alloc_Debug, FT_Realloc_Debug,
FT_QAlloc_Debug, FT_QRealloc_Debug, FT_Free_Debug)
[FT_STRICT_ALIASING]: Implement.
2006-01-31 20:17:42 +00:00
David Turner 6a681fa84a * src/autofit/afwarp.c: simple #ifdef to prevent compilation when
the warp hinter isn't active (it shouldn't, still experimental)

    * Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid"
    and "otvalid" from the list of modules that are linked statically
    to a given FreeType library. Functionality has been moved to the
    "ftvalid" CVS module.

    note also that current Make-based build system still compiles the
    modules though...

    * include/freetype/config/ftoption.h: added FT_STRICT_ALIASING,
    which controls the definitions of the memory management functions
    to avoid warnings with recent versions of GCC. this macro is
    only here to be disabled, in case we detect problems with the
    new scheme.

    NOTE: disable macro to use the memory debugger. this will be fixed
          later !!
2006-01-27 12:11:22 +00:00
Suzuki, Toshiya (鈴木俊哉) a438621451 Add gxvalid module to validate TrueType GX/AAT tables.
Modifications on existing files:

	* Jamfile: Register gxvalid module.
	* src/base/Jamfile: Register ftgxval.c.
	* src/base/rule.mk: Register ftgxval.c.
	* docs/INSTALL.ANY: Register gxvalid/gxvalid.c.

	* include/freetype/config/ftheader.h: Add macro to include gxvalid
	header file, FT_GX_VALIDATE_H.
	* include/freetype/config/ftmodule.h: Register gxv_module_class.

	* include/freetype/ftchapters.h: Add comment about gx_validation.
	* include/freetype/ftotval.h: Change keyword FT_VALIDATE_XXX
	to FT_VALIDATE_OTXXX to co-exist gxvalid.
	* include/freetype/tttags.h: Add tag for TrueType GX/AAT tables.

	* include/freetype/internal/ftserv.h: Add macro to use gxvalid
	service, FT_SERVICE_GX_VALIDATE_H
	* include/freetype/internal/fttrace.h: Add trace facilities
	for gxvalid.

	New files on existing directories:

	* include/freetype/internal/services/svgxval.h: Registration of
	validation service for TrueType GX/AAT and classic kern table.
	* include/freetype/ftgxval.h: Public API definition to use gxvalid.
	* src/base/ftgxval.c: Public API of gxvalid.

	New files under src/gxvalid/:

	* src/gxvalid/Jamfile src/gxvalid/README src/gxvalid/module.mk
	src/gxvalid/rules.mk src/gxvalid/gxvalid.c src/gxvalid/gxvalid.h
	src/gxvalid/gxvbsln.c src/gxvalid/gxvcommn.c src/gxvalid/gxvcommn.h
	src/gxvalid/gxverror.h src/gxvalid/gxvfeat.c src/gxvalid/gxvfgen.c
	src/gxvalid/gxvjust.c src/gxvalid/gxvkern.c src/gxvalid/gxvlcar.c
	src/gxvalid/gxvmod.c src/gxvalid/gxvmod.h src/gxvalid/gxvmort.c
	src/gxvalid/gxvmort.h src/gxvalid/gxvmort0.c src/gxvalid/gxvmort1.c
	src/gxvalid/gxvmort2.c src/gxvalid/gxvmort4.c src/gxvalid/gxvmort5.c
	src/gxvalid/gxvmorx.c src/gxvalid/gxvmorx.h src/gxvalid/gxvmorx0.c
	src/gxvalid/gxvmorx1.c src/gxvalid/gxvmorx2.c src/gxvalid/gxvmorx4.c
	src/gxvalid/gxvmorx5.c src/gxvalid/gxvopbd.c src/gxvalid/gxvprop.c
	src/gxvalid/gxvtrak.c: New files, gxvalid body.
2005-08-24 04:31:31 +00:00
David Turner 1339b974f1 * include/freetype/config/ftmodule.h: moving the order of drivers to
speed up font loading. the pcf and bdf loaders are still slow and
    eat memory like crazy.
2005-03-03 14:10:21 +00:00
David Turner b9c22aff61 * src/autofit/{afhints.h,afhints.c,aflatin.h,aflatin.c,afloader.c}:
various bug-fixes and drastic heap usage reduction improvements.

    * include/freetype/config/ftmodule.h: the auto-fitter is now the
    only supported auto-hinting module

    * include/freetype/config/ftstdlib.h: adding FT_INT_MAX definition
2005-03-01 15:48:29 +00:00
Werner Lemberg ee95b6f0d4 Adding OpenType validation module. The code is based on the
(unfinished) `otlayout' module but has been heavily modified to make
it much more compact.

* src/otvalid/*: New module.

* include/freetype/ftotval.h, src/base/ftotval.c,
include/freetype/internal/services/svotval.h: New files.

* include/freetype/config/ftmodule.h: Add otv_module_class.
* include/freetype/config/ftheader.h (FT_OPENTYPE_VALIDATE_H): New
macro.
* include/freetype/internal/ftserv.h
(FT_SERVICE_OPENTYPE_VALIDATE_H): New macro.
* include/freetype/internal/fttrace.h (otvmodule, otvcommon,
otvbase, otvgdef, otvgpos, otvgsub, otvjstf): New trace components.

* include/freetype/ftchapters.h: Updated.

* src/base/Jamfile (Library), src/base/descrip.mms (OBJS),
src/base/rules.mk (BASE_EXT_SRC): Updated.

* docs/CHANGES: Updated.
2004-09-10 14:39:00 +00:00
David Turner 5290d2fb46 performance optimizations regarding face opening 2004-06-23 15:44:03 +00:00
David Turner 3249c62523 * 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
David Turner 00d9f40cf7 * src/smooth/ftsmooth.c, src/base/ftobjs.c,
include/freetype/config/ftmodule.h: updated to correctly support
        sub-pixel rendering

        * include/freetype/cache/ftcimage.h, include/freetype/cache/ftcsbits.h,
        src/cache/ftcimage.c, src/cache/ftcsbit.c: updated to support sub-pixel
        rendering correctly. Definition of FTC_ImageTypeRec that replaces the
        obsolete FTC_ImageDesc, and has slightly different fields. The
        image type is now determined directly by "load_flags" values.

        * src/autohint/ahtypes.h, src/autohint/ahhint.c,
        src/pshinter/pshalgo3.c, src/pshinter/pshalgo3.h: various enhancements
        to the automatic and Postscript hinters !! and sub-pixel hinting now
        works correctly (see demo programs)
2002-09-08 21:29:11 +00:00
Werner Lemberg 7cf4d377f4 * src/type42/t42drivr.c: s/T42_ENCODING_TYPE_/T1_ENCODING_TYPE_/.
(parse_font_matrix): Remove unnecessary code.
(parse_sfnts): Initialize some variables.
(t42_driver_class) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Use
ft_module_driver_has_hinter conditionally.
Moved some type 42 specific structure definitions to...
* include/freetype/internal/t42types.h: New file.
* include/freetype/internal/internal.h (FT_INTERNAL_T42_TYPES_H):
New macro.

* include/freetype/cache/ftcsbits.h (FTC_SBit): Added a new field
`num_grays' for specifying the number of used gray levels.
* src/cache/ftcsbits.c (ftc_sbit_node_load): Initialize it.

Adding a driver for BDF fonts written by Francesco Zappa Nardelli
<Francesco.Zappa.Nardelli@ens.fr>.  Heavily modified by me to
better adapt it to FreeType, removing unneeded stuff.  Additionally,
it now supports Mark Leisher's BDF extension for anti-aliased
bitmap glyphs with 2 and 4 bpp.

* src/bdf/*: New driver.
* include/freetype/internal/bdftypes.h: New file.
* include/freetype/internal/fttrace.h: Added BDF driver components.
* include/freetype/fterrdef.h: Added error codes for BDF driver.
* include/freetype/config/ftmodule.h, src/Jamfile: Updated.
* include/freetype/internal/internal.h (FT_INTERNAL_BDF_TYPES_H):
New macro.

* include/freetype/config/ftstdlib.h (ft_sprintf): New alias for
sprintf.

* include/freetype/internal/fttrace.h: Added Type 42 driver
component.
* src/type42/t42drivr.c: Use it.

* include/freetype/internal/internal.h (FT_INTERNAL_PCF_TYPES_H):
New macro.
2002-05-21 14:13:01 +00:00
Werner Lemberg 963778153e Adding a driver for Type42 fonts written by Roberto Alameda
<ojancano@geekmail.de>.

* src/type42/*: New driver.
* include/freetype/config/ftmodule.h, src/Jamfile: Updated.
* include/freetype/config/ftstdlib.h (ft_xdigit, ft_memcmp,
ft_atoi): New aliases for xdigit, memcmp, and atoi, respectively.
2002-05-15 06:18:24 +00:00
David Turner 609e28c3be * src/type1/t1gload.h, src/type1/t1gload.c: fixed incorrect
parameter sign-ness in callback function

        * include/freetype/config/ftmodule.h,
          include/freetype/internal/fttrace.h,
          src/Jamfile, src/pfr/*:

          adding a PFR font driver to the FreeType sources. Not that it
          doesn't support embedded bitmaps or kerning tables for now..


        * include/freetype/internal/ftmemory.h: adding the FT_MEM_ZERO
          and FT_ZERO macros

        * include/freetype/internal/ftstream.h: adding the FT_NEXT_OFF3,
          FT_NEXT_UOFF3, FT_NEXT_OFF3_LE and FT_NEXT_UOFF3_LE to parse
          in-memory 24-bit integers.
2002-04-19 15:13:47 +00:00
David Turner 5893c1bb2a add support for new postscript hinter 2001-10-18 11:49:26 +00:00
Werner Lemberg 389acc625e * src/pcf/*: New driver module for PCF font format (used in
X Windows).
* include/freetype/internal/ftdebug.h (FT_Trace): Added values for
PCF driver.
* include/freetype/internal/pcftypes.h: New file.
* include/freetype/config/ftmodule.h: Added PCF driver module.


* src/winfonts/winfnt.c (FNT_Get_Char_Index): Fix parameter type.


* builds/modules.mk (clean_module_list): Fixed deletion of module
file in case `make make_module_list' is called before `make setup'.
2001-01-01 17:25:21 +00:00
David Turner f95a603117 minor updates to the "psaux" module.
Werner, please do not start re-formatting my experimental
code until I declare it "finished", because I still make big
changes to it that create lots of CVS conflicts..

thanks for your work, anyway :-)
2000-08-21 04:58:49 +00:00
David Turner 5fe4c00ed2 - fixed the incorrect SO extension for Visual C++
- disabled the TrueType interpreter by default
- disabled the "type1" driver, "type1z" is now used
  by default (the internal driver name is "type1" now !!)
2000-07-26 19:04:08 +00:00
David Turner c49f69cb8c some welcome fixes related to the auto-hinter:
- removed a stupid memory leak

  - fixed the weird metrics hinting (the horizontal edges were used,
    instead of the vertical one, to compute the metrics adjustments,
    silly, silly, silly).

there is still some bugs that I'm looking at though, but we're
very near the release..
2000-07-20 03:44:50 +00:00
David Turner 9b3d1c75ad - fixed a leak in the Type 1 driver
- updated the CFF driver to support flex opcodes
2000-07-07 19:47:34 +00:00
David Turner 9d636b6d14 various cleanups to reduce compiler warnings
+ support for CID-keyed fonts in the CFF driver
(still some unexpected bugs though..)
2000-06-27 23:32:27 +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
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 b1677a87ca changed the SFNT driver slightly to add more robust
checking based on the "search_rang", etc.., fields of
the sfnt header..

This avoids problems (like certain Type 1 multiple masters
incorrectly recognized as trueType files)..
2000-05-29 20:37:41 +00:00
David Turner efce08d67c major re-organisation of the FreeType 2 directory hierarchy 2000-05-11 18:23:52 +00:00