Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: third_party/ots/src/cff_type2_charstring.cc

Issue 1487543005: Update OTS to revision 99a3b7f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/ots/src/cff.cc ('k') | third_party/ots/src/cmap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/ots/src/cff_type2_charstring.cc
diff --git a/third_party/ots/src/cff_type2_charstring.cc b/third_party/ots/src/cff_type2_charstring.cc
index a164ec16380948b441640d72801d245225f40280..8c5544b2ec4b99c52c0167573ea4f2a5cb04aa7b 100644
--- a/third_party/ots/src/cff_type2_charstring.cc
+++ b/third_party/ots/src/cff_type2_charstring.cc
@@ -852,14 +852,12 @@ bool ValidateType2CharStringIndex(
const std::vector<CFFIndex *> &local_subrs_per_font,
const CFFIndex *local_subrs,
Buffer* cff_table) {
- const uint16_t num_offsets =
- static_cast<uint16_t>(char_strings_index.offsets.size());
- if (num_offsets != char_strings_index.offsets.size() || num_offsets == 0) {
+ if (char_strings_index.offsets.size() == 0) {
return OTS_FAILURE(); // no charstring.
}
// For each glyph, validate the corresponding charstring.
- for (uint16_t i = 1; i < num_offsets; ++i) {
+ for (unsigned i = 1; i < char_strings_index.offsets.size(); ++i) {
// Prepare a Buffer object, |char_string|, which contains the charstring
// for the |i|-th glyph.
const size_t length =
@@ -875,7 +873,7 @@ bool ValidateType2CharStringIndex(
Buffer char_string(cff_table->buffer() + offset, length);
// Get a local subrs for the glyph.
- const uint16_t glyph_index = i - 1; // index in the map is 0-origin.
+ const unsigned glyph_index = i - 1; // index in the map is 0-origin.
const CFFIndex *local_subrs_to_use = NULL;
if (!SelectLocalSubr(fd_select,
local_subrs_per_font,
« no previous file with comments | « third_party/ots/src/cff.cc ('k') | third_party/ots/src/cmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698