| 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 6dd47664d09128a1dfcbe7a92921e37e97d1cac6..a164ec16380948b441640d72801d245225f40280 100644
|
| --- a/third_party/ots/src/cff_type2_charstring.cc
|
| +++ b/third_party/ots/src/cff_type2_charstring.cc
|
| @@ -30,7 +30,7 @@ const size_t kMaxSubrNesting = 10;
|
| // will fail with the dummy value.
|
| const int32_t dummy_result = INT_MAX;
|
|
|
| -bool ExecuteType2CharString(ots::OpenTypeFile *file,
|
| +bool ExecuteType2CharString(ots::Font *font,
|
| size_t call_depth,
|
| const ots::CFFIndex& global_subrs_index,
|
| const ots::CFFIndex& local_subrs_index,
|
| @@ -225,7 +225,7 @@ bool ReadNextNumberFromType2CharString(ots::Buffer *char_string,
|
| // succeeds. If the |op| is kCallSubr or kCallGSubr, the function recursively
|
| // calls ExecuteType2CharString() function. The arguments other than |op| and
|
| // |argument_stack| are passed for that reason.
|
| -bool ExecuteType2CharStringOperator(ots::OpenTypeFile *file,
|
| +bool ExecuteType2CharStringOperator(ots::Font *font,
|
| int32_t op,
|
| size_t call_depth,
|
| const ots::CFFIndex& global_subrs_index,
|
| @@ -290,7 +290,7 @@ bool ExecuteType2CharStringOperator(ots::OpenTypeFile *file,
|
| }
|
| ots::Buffer char_string_to_jump(cff_table->buffer() + offset, length);
|
|
|
| - return ExecuteType2CharString(file,
|
| + return ExecuteType2CharString(font,
|
| call_depth + 1,
|
| global_subrs_index,
|
| local_subrs_index,
|
| @@ -729,7 +729,7 @@ bool ExecuteType2CharStringOperator(ots::OpenTypeFile *file,
|
| // in_out_found_width: true is set if |char_string| contains 'width' byte (which
|
| // is 0 or 1 byte.)
|
| // in_out_num_stems: total number of hstems and vstems processed so far.
|
| -bool ExecuteType2CharString(ots::OpenTypeFile *file,
|
| +bool ExecuteType2CharString(ots::Font *font,
|
| size_t call_depth,
|
| const ots::CFFIndex& global_subrs_index,
|
| const ots::CFFIndex& local_subrs_index,
|
| @@ -779,7 +779,7 @@ bool ExecuteType2CharString(ots::OpenTypeFile *file,
|
| }
|
|
|
| // An operator is found. Execute it.
|
| - if (!ExecuteType2CharStringOperator(file,
|
| + if (!ExecuteType2CharStringOperator(font,
|
| operator_or_operand,
|
| call_depth,
|
| global_subrs_index,
|
| @@ -845,7 +845,7 @@ bool SelectLocalSubr(const std::map<uint16_t, uint8_t> &fd_select,
|
| namespace ots {
|
|
|
| bool ValidateType2CharStringIndex(
|
| - ots::OpenTypeFile *file,
|
| + ots::Font *font,
|
| const CFFIndex& char_strings_index,
|
| const CFFIndex& global_subrs_index,
|
| const std::map<uint16_t, uint8_t> &fd_select,
|
| @@ -895,7 +895,7 @@ bool ValidateType2CharStringIndex(
|
| bool found_endchar = false;
|
| bool found_width = false;
|
| size_t num_stems = 0;
|
| - if (!ExecuteType2CharString(file,
|
| + if (!ExecuteType2CharString(font,
|
| 0 /* initial call_depth is zero */,
|
| global_subrs_index, *local_subrs_to_use,
|
| cff_table, &char_string, &argument_stack,
|
|
|