Optimize memory consumption for simple GPOS tables
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Tue, 14 Feb 2012 12:01:23 +0000 (13:01 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 15 Feb 2012 01:35:32 +0000 (02:35 +0100)
commitbe0dfa34737a014e7ad060a90c4c24be9998fe13
tree16b493b12dc093410b14e431f897a0676e060b6e
parenta28c433b290dae1b3509ddf1eee616ba91ce221b
Optimize memory consumption for simple GPOS tables

Sometimes GPOS tables are used for kerning and can grow quite
large if the font is unoptimized. In that case, allocating the
maximum size for each ValueRecord will have a great impact on
memory consumption. For GPOS tables which do not contain device
tables, we only allocate the memory actually need to store the
data instead.

While it would be possible to optimize memory for GPOS tables that
contain device tables as well, this is not a part of this patch.

Change-Id: Id665b2821675ef955c497c782f09f99af765b8a3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
src/3rdparty/harfbuzz/src/harfbuzz-gpos.c