* src/type1/t1parse.c (T1_New_Parser), src/type42/t42parse.c
(t42_parser_init): modifying functions to check the font header before
allocating anything on the heap.
* internal/freetype/ftmemory.h: introducing the new macros FT_ARRAY_MAX
and FT_ARRAY_CHECK
* src/pcf/pcfread.c, src/pcf/pcfutil.c: minor fixes and simplifications.
try to protect the PCF driver from doing stupid things with broken fonts.
used to reduce the amount of heap size required to only test wether
we're dealing with a BDF font (the old code allocated 64 Kb right
before any test).
* src/lzw/ftlzw.c (FT_Stream_OpenLZW): modified the function to check
the LZW header before doing anything else. This helps avoid un-necessary
heap allocations (400 Kb of heap memory for the LZW decoder ! Oh my !)
* src/gzip/ftgzip.c (FT_Stream_OpenGZip): ditto for the .gz decoder,
though the code savings is smaller.
Fix serious typo which prevented correct TT rendering.
* include/freetype/internal/ftmemory.h: Undo change from 2005-03-03.
To suppress warnings it is sufficient to use `-fno-strict-aliasing'.
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
according to decreasing maximum cumulative allocations.
* include/freetype/internal/tttypes.h, src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c,
src/truetype/ttobjs.c, src/cff/cffobjs.c, src/sfnt/sfobjs.c: implementing new
heap-optimized embedded bitmap loader. This one also fixes bug #12107
* src/sfnt/sfobjs.c: fixed bug that prevented loading SFNT fonts without
a 'kern' table.
drastically reduce the heap usage of FreeType, especially in the case
of memory-mapped files. The idea is to avoid loading and decoding tables
in the heap, and instead access the raw data whenever possible (i.e.
when it doesn't compromise performance).
This had several impacts: first, opening vera.ttf uses a ridiculous amount
of memory (when the FT_Library footprint is accounted for), until you start
loading glyphs. Even then, you'll save at least 20 Kb compared to the non
optimized case. performance of various operations, including open/close
has also been dramatically improved.
More optimisations to come. The auto-hinter eats memory like crazy? This
must be stopped...
src/truetype/ttpload.c, src/truetype/ttpload.h, src/truetype/ttgload.c:
added the temporary configuration FT_OPTIMIZE_MEMORY to control various
optimizations used to reduce the heap footprint of memory-mapped TrueType
files.
* src/truetype/ttpload.c (tt_face_load_loca, tt_face_get_location,
tt_face_done_loca): when FT_OPTIMIZE_MEMORY is set, the locations table
is read directly from memory-mapped streams, instead of being decoded
into the heap.
* src/truetype/ttpload.c: only load the CVT and fpgm tables when the
bytecode interpreter is compiled in.
in the memory debugger. Also a new function FT_DumpMemory() was added.
It is only available in builds with FT_DEBUG_MEMORY defined, and you
must declare it in your own code to use it, i.e. with something
like:
extern void FT_DumpMemory( FT_Memory );
...
FT_DumpMemory( memory );
* include/freetype/config/ftoptions.h: disabling TrueType bytecode
interpreter !
* include/freetype/internal/ftmemory.h: adding FT_ARRAY_ZERO, as a
convenience macro.
(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.
to NULL. This allows custom close functions to delete the FT_STREAM
object.
Add API to get information about SFNT tables.
* include/freetype/internal/services/svsfnt.h
(FT_SFNT_Table_Info_Func): New typedef.
(SFNT_Table): Add it.
* src/base/ftobjs (FT_Sfnt_Table_Info): New function.
* include/freetype/tttables.h: Updated.
* src/sfnt/sfdriver.c (sfnt_table_info): New function.
(sfnt_service_sfnt_table): Add it.
* docs/CHANGES: Updated.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
* builds/unix/configure.ac (version_info): Set to 9:8:3.
* builds/unix/configure: Updated.
* builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.vcproj: s/219/2110/, s/2.1.9/2.1.10/.
* builds/freetype.mk (refdoc), README, Jamfile (RefDoc):
s/2.1.8/2.1.9/.
* docs/CHANGES, docs/VERSION.DLL: Updated.
* src/base/ftrfork.c (FT_Raccess_Guess)
[!FT_CONFIG_OPTION_GUESSING_EMBEDDED_FORK]: Remove compiler
warnings.
fixed a dangling pointer bug that happened in very rare cases:
i.e. when a new family object was destroyed by an out-of-memory
condition during a glyph node initialization. The function
FTC_Cache_Lookup would flush the cache and restart the lookup
with a bad pointer.
* src/cache/ftcmanag.c: fixed a cache flushing bug
FT_QAlloc_Debug and FT_QRealloc_Debug.
* src/base/ftutil.c (FT_QAlloc): Fix error and debug messages.
(FT_QRealloc): Call FT_QAlloc if original pointer is NULL.
Fix error message.
src/cache/ftccache.c, src/cache/ftcglyph.c, src/cache/ftcmanag.c,
src/cache/ftcsbits.c:
fixing some annoying bugs and inefficiencies in the cache sub-system.
src/autofit/afloader.c, src/autohint/ahhint.c:
moved the definition of 'lsb_delta' and 'rsb_delta' from FT_GlyphMetrics
to FT_GlyphSlotRec. The old location did BREAK BINARY COMPATIBILITY
of the library !!
* src/sfnt/sfobjs.c: removing compiler warning
Improve inter-letter spacing for autohinted glyphs.
* include/freetype/freetype.h (FT_Glyph_Metrics): Add elements
`lsb_delta' and `rsb_delta'.
* src/autohint/ahhint.c (ah_hinter_load): Set `lsb_delta' and
`rsb_delta' in slot->metrics.
auxiliary functions.
(T1_Get_MM_Var): Provide axis tags.
Use mm_axis_unmap and mm_weights_unmap to provide default values
for design and normalized axis coordinates.
* include/freetype/t1tables.h (PS_DesignMapRec): Change type of
`design_points' to FT_Long.
Update all users.