diff options
author | arthurhsu <arthurhsu@google.com> | 2011-10-11 01:01:16 +0000 |
---|---|---|
committer | arthurhsu <arthurhsu@google.com> | 2011-10-11 01:01:16 +0000 |
commit | 158cdcb9cf09418ba8b49f4be7be69e37aa8e9fa (patch) | |
tree | d45ec0d71e59ea8df58331b5005d6e920daedf3e /cpp/src/sfntly/data/font_data.cc | |
parent | b4e699e152543000a5825791e1c26826924a256f (diff) | |
download | sfntly-158cdcb9cf09418ba8b49f4be7be69e37aa8e9fa.tar.gz |
Update to Sep 30 snapshot, include all current EBXX support.
Refine Iterator ports: all java-style Iterator objects are ref-counted and have automatic memory management now.
Diffstat (limited to 'cpp/src/sfntly/data/font_data.cc')
-rw-r--r-- | cpp/src/sfntly/data/font_data.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/sfntly/data/font_data.cc b/cpp/src/sfntly/data/font_data.cc index ccc2a19..d2b95ea 100644 --- a/cpp/src/sfntly/data/font_data.cc +++ b/cpp/src/sfntly/data/font_data.cc @@ -58,7 +58,9 @@ FontData::FontData(FontData* data, int32_t offset, int32_t length) { FontData::FontData(FontData* data, int32_t offset) { Init(data->array_); - Bound(data->bound_offset_ + offset); + Bound(data->bound_offset_ + offset, + (data->bound_length_ == GROWABLE_SIZE) + ? GROWABLE_SIZE : data->bound_length_ - offset); } FontData::~FontData() {} @@ -66,7 +68,7 @@ FontData::~FontData() {} void FontData::Init(ByteArray* ba) { array_ = ba; bound_offset_ = 0; - bound_length_ = INT_MAX; + bound_length_ = GROWABLE_SIZE; } int32_t FontData::BoundOffset(int32_t offset) { |