Delete unused flags from CFX_SubstFont
Review-Url: https://codereview.chromium.org/2409173003
diff --git a/core/fpdfapi/render/fpdf_render_text.cpp b/core/fpdfapi/render/fpdf_render_text.cpp
index 528e11d..b8f44f8 100644
--- a/core/fpdfapi/render/fpdf_render_text.cpp
+++ b/core/fpdfapi/render/fpdf_render_text.cpp
@@ -57,20 +57,16 @@
break;
case TextRenderingMode::MODE_STROKE:
case TextRenderingMode::MODE_STROKE_CLIP:
- if (pFont->GetFace() ||
- (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) {
+ if (pFont->GetFace())
bStroke = true;
- } else {
+ else
bFill = true;
- }
break;
case TextRenderingMode::MODE_FILL_STROKE:
case TextRenderingMode::MODE_FILL_STROKE_CLIP:
bFill = true;
- if (pFont->GetFace() ||
- (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) {
+ if (pFont->GetFace())
bStroke = true;
- }
break;
case TextRenderingMode::MODE_INVISIBLE:
// Already handled above, but the compiler is not smart enough to
diff --git a/core/fxge/cfx_substfont.h b/core/fxge/cfx_substfont.h
index 8dba100..01196d4 100644
--- a/core/fxge/cfx_substfont.h
+++ b/core/fxge/cfx_substfont.h
@@ -10,10 +10,6 @@
#include "core/fxcrt/fx_string.h"
#define FXFONT_SUBST_MM 0x01
-#define FXFONT_SUBST_GLYPHPATH 0x04
-#define FXFONT_SUBST_CLEARTYPE 0x08
-#define FXFONT_SUBST_TRANSFORM 0x10
-#define FXFONT_SUBST_NONSYMBOL 0x20
#define FXFONT_SUBST_EXACT 0x40
class CFX_SubstFont {
diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp
index e59fbe1..db40bdb 100644
--- a/core/fxge/ge/cfx_fontmapper.cpp
+++ b/core/fxge/ge/cfx_fontmapper.cpp
@@ -645,7 +645,6 @@
PitchFamily);
}
#endif
- pSubstFont->m_SubstFlags |= FXFONT_SUBST_NONSYMBOL;
return FindSubstFont(family, bTrueType, flags & ~FXFONT_SYMBOLIC,
weight, italic_angle, 0, pSubstFont);
}
diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp
index d11f2e1..0ee9994 100644
--- a/core/fxge/ge/cfx_renderdevice.cpp
+++ b/core/fxge/ge/cfx_renderdevice.cpp
@@ -854,8 +854,7 @@
if (FXSYS_fabs(char2device.a) + FXSYS_fabs(char2device.b) > 50 * 1.0f ||
((m_DeviceClass == FXDC_PRINTER) &&
!(text_flags & FXTEXT_PRINTIMAGETEXT))) {
- if (pFont->GetFace() ||
- (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) {
+ if (pFont->GetFace()) {
int nPathFlags =
(text_flags & FXTEXT_NOSMOOTH) == 0 ? 0 : FXFILL_NOPATHSMOOTH;
return DrawTextPath(nChars, pCharPos, pFont, font_size, pText2Device,
@@ -882,10 +881,8 @@
anti_alias = FXFT_RENDER_MODE_LCD;
bool bClearType = false;
- if (pFont->GetFace() ||
- (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_CLEARTYPE)) {
+ if (pFont->GetFace())
bClearType = !!(text_flags & FXTEXT_CLEARTYPE);
- }
bNormal = !bClearType;
}
}