aboutsummaryrefslogtreecommitdiff
path: root/cpp/src/sfntly/data/font_data.cc
diff options
context:
space:
mode:
authorarthurhsu <arthurhsu@google.com>2011-10-11 01:01:16 +0000
committerarthurhsu <arthurhsu@google.com>2011-10-11 01:01:16 +0000
commit158cdcb9cf09418ba8b49f4be7be69e37aa8e9fa (patch)
treed45ec0d71e59ea8df58331b5005d6e920daedf3e /cpp/src/sfntly/data/font_data.cc
parentb4e699e152543000a5825791e1c26826924a256f (diff)
downloadsfntly-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.cc6
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) {