* include/freetype/ftglyph.h: Adds `FT_SvgGlyph' and
`FT_SvgGlyphRec'.
* src/base/ftglyph.c: Adds glyph class `ft_svg_glyph_class' and its
methods. (FT_New_Glyph) Adds code to set the class of OT-SVG
glyphs. (FT_Glyph_To_Bitmap) Adds code to free memory allocated for
`FT_SVG_Document' in `dummy.other'.
For rendering OT-SVG glyphs, a new renderer module `ot-svg' is
created. The module holds hooks to an external library which are
used for rendering. The hooks can be set via module properties.
Also enabled bitmap presetting of OT-SVG glyphs at loading stage.
* include/freetype/fterrdef.h: Adds two errors, namely,
`Missing_SVG_Hooks' and `Invalid_SVG_Document'.
* include/freetype/internal/ftobjs.h: Adds `svg_renderer_state' to
`FT_LibraryRec' to let external libraries store state.
* include/freetype/internal/fttrace.h: Adds entry for `ot-svg'.
* modules.cfg: Ditto.
* include/freetype/internal/internal.h: Adds
`FT_INTERNAL_SVG_INTERFACE_H' for `svginterface.h'.
* include/freetype/internal/svginterface.h: Internal header file
to contain the interface of `ot-svg' module. Just exposes the
preset function.
* include/freetype/otsvg.h: Adds functypes for the four hooks and
a structure to hold them.
* src/base/ftobjs.c: (ft_glyphslot_preset_bitmap) Enable proper
presetting of OT-SVG glyphs by using `ot-svg' renderer.
(ft_add_renderer) Set `renderer->render' for `ot-svg' module.
* src/svg/ftsvg.h: Declaration for `ot-svg' module.
* src/svg/ftsvg.c: Module definition of `ot-svg' and its functions.
* src/svg/svg.c: Single source file of `ot-svg' module.
* src/svg/svgtypes.c: Defines `SVG_Renderer'.
* src/svg/rules.mk: Compilation rules for `ot-svg' module.
* src/svg/module.mk: Module definition of `ot-svg'.
SVG document corresponding to a glyphID is fetched and stored
in an `FT_SVG_Document' structure which is referenced in the
glyphslot.
* include/freetype/config/ftheader.h: Adds `FT_OTSVG_H'.
* include/freetype/ftimage.h: Adds `FT_GLYPH_FORMAT_SVG'.
* include/freetype/internal/ftobjs.h: Adds `FT_GLYPH_OWN_GZIP_SVG'.
* include/freetype/internal/sfnt.h: Adds `load_svg_doc' and its
function type `TT_Load_Svg_Doc_Func'.
* include/freetype/otsvg.h: Adds `FT_SVG_Document' and its struct.
* src/base/ftobjs.c: Adds code to allocate and free memory for
`FT_SVG_Document' in `slot->other'.
* src/cff/cffgload.c: Adds code to load SVG glyph if it's present.
* src/truetype/ttgload.c: Ditto.
* src/sfnt/sfdriver.c: Adds `tt_face_load_svg_doc'.
* src/sfnt/ttsvg.h: Ditto.
* src/sfnt/ttsvg.c: Adds implementation of `tt_face_load_svg_doc'
and its helper functions.
Adds code to load the SVG table data into an `svg'
structure and set the flag `FT_FACE_FLAG_SVG'.
* include/freetype/freetype.h: Adds `FT_FACE_FLAG_SVG'.
* include/freetype/internal/sfnt.h: Adds the fields
`load_svg' and `free_svg' to `SFNT_Interface'.
* include/freetype/internal/tttypes.h: Adds a void
pointer field `svg' to hold info from `SVG' table.
* include/freetype/internal/tttags.h: Adds the tag
`TTAG_SVG'.
* src/sfnt/ttsvg.c: Writes the functions
`tt_face_load_svg' and `tt_face_free_svg'
* src/sfnt/ttsvg.h: Writes header declarations for
`tt_face_load_svg' and `tt_face_free_svg'.
* src/sfnt/sfdriver.c: Adds the functions
`tt_face_load_svg' and `tt_face_free_svg' to
`sfnt_interface'.
* src/sfnt/sfnt.c: Includes `ttsvg.c'.
* src/sfnt/sfobjs.c: (sfnt_load_face) Adds code to
load `svg' table struct. (sfnt_done_face) Adds code
to free `svg' table struct.
==========================
Tag sources with `VER-2-10-1'.
* docs/VERSION.TXT: Add entry for version 2.10.1.
* README, Jamfile (RefDoc), src/base/ftver.rc,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 23:1:17.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
* include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
If `CVAR' data is applied to variation fonts, fractional values are
possible.
* include/freetype/internal/tttypes.h (TT_FaceRec): Change type of
`cvt' from `FT_Short' to `FT_Int32'.
* src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro.
(tt_face_vary_cvt): Use it to update code to 26.6 format.
* src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6
format.
* src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6
format.
This patch make FreeType use font units in 26.6 format internally
instead of integers.
* src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro.
(TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font
coordinates.
* src/truetype/ttgxvar.h: Updated.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use
`extra_points2' array to temporarily hold unrounded point
coordinates; use them to compute scaled coordinates and linear
advance width and height.
(load_truetype_code): Adjust similarly.
==========================
Tag sources with `VER-2-10-0'.
* docs/VERSION.TXT: Add entry for version 2.10.0.
* docs/CHANGES: Updated.
* README, Jamfile (RefDoc), src/base/ftver.rc,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/.
* include/freetype/freetype.h (FREETYPE_MINOR): Set to 10.
(FREETYPE_PATCH): Set to 0.
* builds/unix/configure.raw (version_info): Set to 23:0:17.
* CMakeLists.txt (VERSION_MINOR): Set to 10.
(VERSION_PATCH): Set to 0.
* builds/toplevel.mk (version, winversion): Since the minor version
number has two digits now, never omit the patch number. We would
get ambiguous zip file names otherwise.
(dist): Remove remnants of `docmaker' tool.
(do-dist): Remove unused intermediate files.
* src/cff/cffparse.c (destrict_c2s_item): Guard function with
CFF_CONFIG_OPTION_OLD_ENGINE macro.
This change should allow Freetype to work on WASM/Emscripten without
needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'.
* src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature.
* src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array,
parse_expansion_factor, parse_font_name): Return `void', not
`FT_Error'.
* include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc):
Fix signature.
For multiple master fonts, common usage (in Postscript) is to modify
the WeightVector of an existing font instance, this addition
supports that use.
* include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector,
FT_Get_MM_WeightVector): New API functions.
* include/freetype/internalservices/svmm.h
(FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New
function types.
(MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector'
members.
(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
* src/cffcffdrivr.c (cff_set_mm_weightvector,
cff_get_mm_weightvector): New functions.
(cff_service_multi_masters): Register them.
* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
This driver doesn't use the new interface.
* src/type1/t1load.c (T1_Set_MM_WeightVector,
T1_Get_MM_WeightVector): New functions.
* src/type1/t1driver.c (t1_service_multi_masters): Register them.
* src/type1/t1load.h: Updated.
It's been more than 2^31 seconds since 1904.
* include/freetype/tttables.h (TT_Header): Change field types.
* src/sfnt/ttload.c (tt_face_load_generic_header): Updated.
* include/freetype/ftsystem.h: Include FT_TYPES_H.
(*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments.
* src/raster/ftmisc.h: Ditto.
* builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c,
* builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc):
Use size_t for the size arguments.
* src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use
FT_Offset, aka size_t, for the size arguments.
Before this commit we had code like
(FT_Bool)( globals->glyph_styles[gindex] & 0x8000)
Since `FT_Bool' is defined to be an `unsigned char', the code
evaluated to something like
(unsigned char)( 0x8532 & 0x8000)
which in turn expanded to
(unsigned char)( 0x8000)
and finally yielded 0x00 – i.e., false – not as expected.
Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>.
* include/freetype/fttypes.h (FT_BOOL): Add a comparison against
zero so that we always have a Boolean expression.
*/*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where
possible.