summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_variabletext.cpp11
-rw-r--r--core/fpdfdoc/cpdf_variabletext.h3
-rw-r--r--core/fpdfdoc/ctypeset.cpp3
3 files changed, 4 insertions, 13 deletions
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index 994a7a184f..fea74445d9 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -24,7 +24,6 @@ namespace {
const float kFontScale = 0.001f;
const uint8_t kReturnLength = 1;
-const float kScalePercent = 0.01f;
const uint8_t gFontSizeSteps[] = {4, 6, 8, 9, 10, 12, 14, 18, 20,
25, 30, 35, 40, 45, 50, 55, 60, 70,
@@ -600,19 +599,15 @@ float CPDF_VariableText::GetWordWidth(int32_t nFontIndex,
uint16_t Word,
uint16_t SubWord,
float fCharSpace,
- int32_t nHorzScale,
float fFontSize,
float fWordTail) {
- return (GetCharWidth(nFontIndex, Word, SubWord) * fFontSize * kFontScale +
- fCharSpace) *
- nHorzScale * kScalePercent +
- fWordTail;
+ return GetCharWidth(nFontIndex, Word, SubWord) * fFontSize * kFontScale +
+ fCharSpace + fWordTail;
}
float CPDF_VariableText::GetWordWidth(const CPVT_WordInfo& WordInfo) {
return GetWordWidth(GetWordFontIndex(WordInfo), WordInfo.Word, GetSubWord(),
- GetCharSpace(), GetHorzScale(), GetWordFontSize(),
- WordInfo.fWordTail);
+ GetCharSpace(), GetWordFontSize(), WordInfo.fWordTail);
}
float CPDF_VariableText::GetLineAscent() {
diff --git a/core/fpdfdoc/cpdf_variabletext.h b/core/fpdfdoc/cpdf_variabletext.h
index 46d92e5d23..aa4701551f 100644
--- a/core/fpdfdoc/cpdf_variabletext.h
+++ b/core/fpdfdoc/cpdf_variabletext.h
@@ -108,7 +108,6 @@ class CPDF_VariableText {
int32_t GetCharArray() const { return m_nCharArray; }
int32_t GetLimitChar() const { return m_nLimitChar; }
bool IsMultiLine() const { return m_bMultiLine; }
- int32_t GetHorzScale() const { return m_nHorzScale; }
float GetCharSpace() const { return m_fCharSpace; }
bool IsAutoReturn() const { return m_bLimitWidth; }
@@ -153,7 +152,6 @@ class CPDF_VariableText {
uint16_t Word,
uint16_t SubWord,
float fCharSpace,
- int32_t nHorzScale,
float fFontSize,
float fWordTail);
float GetWordAscent(const CPVT_WordInfo& WordInfo);
@@ -201,7 +199,6 @@ class CPDF_VariableText {
int32_t m_nLimitChar = 0;
int32_t m_nCharArray = 0;
int32_t m_nAlignment = 0;
- int32_t m_nHorzScale = 100;
float m_fLineLeading = 0.0f;
float m_fCharSpace = 0.0f;
float m_fFontSize = 0.0f;
diff --git a/core/fpdfdoc/ctypeset.cpp b/core/fpdfdoc/ctypeset.cpp
index 290b95e9b4..551173162b 100644
--- a/core/fpdfdoc/ctypeset.cpp
+++ b/core/fpdfdoc/ctypeset.cpp
@@ -315,8 +315,7 @@ void CTypeset::SplitLines(bool bTypeset, float fFontSize) {
std::min(fLineDescent, m_pVT->GetWordDescent(*pWord, fFontSize));
fWordWidth = m_pVT->GetWordWidth(
pWord->nFontIndex, pWord->Word, m_pVT->GetSubWord(),
- m_pVT->GetCharSpace(), m_pVT->GetHorzScale(), fFontSize,
- pWord->fWordTail);
+ m_pVT->GetCharSpace(), fFontSize, pWord->fWordTail);
}
if (!bOpened) {
if (IsOpenStylePunctuation(pWord->Word)) {