Chromium Code Reviews| Index: core/fpdfdoc/cpdf_variabletext.cpp |
| diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp |
| index 118efa6a103585e012c0230f8fc7a4defea760d7..a8b9c3c7783bf71c4ef00d0ecfbb83630624a357 100644 |
| --- a/core/fpdfdoc/cpdf_variabletext.cpp |
| +++ b/core/fpdfdoc/cpdf_variabletext.cpp |
| @@ -1112,9 +1112,8 @@ int32_t CPDF_VariableText::GetCharWidth(int32_t nFontIndex, |
| int32_t nWordStyle) { |
| if (!m_pVTProvider) |
| return 0; |
| - if (SubWord > 0) |
| - return m_pVTProvider->GetCharWidth(nFontIndex, SubWord, nWordStyle); |
| - return m_pVTProvider->GetCharWidth(nFontIndex, Word, nWordStyle); |
| + uint16_t word = SubWord ? SubWord : Word; |
|
Wei Li
2016/05/12 21:11:59
SubWord > 0 ? SubWord : Word
Lei Zhang
2016/05/12 22:11:31
|SubWord| is unsigned, so it doesn't matter?
|
| + return m_pVTProvider->GetCharWidth(nFontIndex, word, nWordStyle); |
| } |
| int32_t CPDF_VariableText::GetTypeAscent(int32_t nFontIndex) { |