diff options
author | arthurhsu <arthurhsu@google.com> | 2012-02-28 03:19:21 +0000 |
---|---|---|
committer | arthurhsu <arthurhsu@google.com> | 2012-02-28 03:19:21 +0000 |
commit | 13983b105dfe67061fceaca2dce7f02b9d6ef6c9 (patch) | |
tree | a0408d77e94d25b1ce685657aeb24feab942ef9a /cpp/src/sample/chromium | |
parent | 06590a62d8752d20973eb09e0a6a41f06eb54950 (diff) | |
download | sfntly-13983b105dfe67061fceaca2dce7f02b9d6ef6c9.tar.gz |
Work around Apple MacOS X Lion AppleMyungjo font bug.
Diffstat (limited to 'cpp/src/sample/chromium')
-rw-r--r-- | cpp/src/sample/chromium/subsetter_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/sample/chromium/subsetter_impl.cc b/cpp/src/sample/chromium/subsetter_impl.cc index 7e7cf61..3708f44 100644 --- a/cpp/src/sample/chromium/subsetter_impl.cc +++ b/cpp/src/sample/chromium/subsetter_impl.cc @@ -313,6 +313,11 @@ bool InitializeBitmapBuilder(EbdtTable::Builder* ebdt, EblcTable::Builder* eblc, IntegerList removed_indexes; BitmapGlyphInfoMap info_map; for (size_t j = 0; j < index_builders->size(); ++j) { + if ((*index_builders)[j] == NULL) { + // Subtable is malformed, let's just skip it. + removed_indexes.push_back(j); + continue; + } int32_t first_glyph_id = (*index_builders)[j]->first_glyph_index(); int32_t last_glyph_id = (*index_builders)[j]->last_glyph_index(); if (!HasOverlap(first_glyph_id, last_glyph_id, glyph_ids)) { |