aboutsummaryrefslogtreecommitdiff
path: root/cpp/src/sample/subtly/font_assembler.cc
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-06-06 02:45:35 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-06 02:45:35 +0000
commitfd76129cde3ff870adaf9bd8649ad1dad90bb9e7 (patch)
treea77368b5efd882b6d7c224d8fd9f5b6948d48071 /cpp/src/sample/subtly/font_assembler.cc
parentd66cd7275a614b6e836b9972dde700c3b82c319c (diff)
parentd7c3ad1d95c38b33c49a462f2647dc10f1fff7b7 (diff)
downloadsfntly-fd76129cde3ff870adaf9bd8649ad1dad90bb9e7.tar.gz
Merge remote-tracking branch 'aosp/upstream-master' into master
am: d7c3ad1d95 Change-Id: If3ddd61b462fa1954c1e77fe2a8a6e0f725baf56
Diffstat (limited to 'cpp/src/sample/subtly/font_assembler.cc')
-rw-r--r--cpp/src/sample/subtly/font_assembler.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/sample/subtly/font_assembler.cc b/cpp/src/sample/subtly/font_assembler.cc
index 2f7cd11..4717512 100644
--- a/cpp/src/sample/subtly/font_assembler.cc
+++ b/cpp/src/sample/subtly/font_assembler.cc
@@ -211,6 +211,8 @@ bool FontAssembler::AssembleGlyphAndLocaTables() {
// If there are missing glyphs between the last glyph_id and the
// current resolved_glyph_id, since the LOCA table needs to have the same
// size, the offset is kept the same.
+ loca_list.resize(std::max(loca_list.size(),
+ static_cast<size_t>(resolved_glyph_id + 2)));
for (int32_t i = last_glyph_id + 1; i <= resolved_glyph_id; ++i)
loca_list[i] = last_offset;
last_offset += length;