summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-13 17:54:22 -0700
committerLei Zhang <thestig@chromium.org>2015-08-13 17:54:22 -0700
commit22ece1a6c9c4d7c673d34cff1cd6ec2a069f0331 (patch)
treeafb214ab244a06d6626e39b70d3fbf08e679b794
parent45c910f02063cab51d0d90137d451a666c33b85f (diff)
downloadpdfium-22ece1a6c9c4d7c673d34cff1cd6ec2a069f0331.tar.xz
Remove last uses of FOXIT_CHROME_BUILD.
BUG=pdfium:46 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1294693002 .
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index b96b352e51..5af3e4816f 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -182,18 +182,19 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
int nativetext_flags = text_flags;
if (m_DeviceClass != FXDC_DISPLAY) {
if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) {
+ bool should_call_draw_device_text = true;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
- if (!(text_flags & FXFONT_CIDFONT) &&
- pFont->GetPsName().Find(CFX_WideString::FromLocal("+ZJHL")) == -1)
-#ifdef FOXIT_CHROME_BUILD
- if (pFont->GetPsName() != CFX_WideString::FromLocal("CNAAJI+cmex10"))
-#endif
+ if ((text_flags & FXFONT_CIDFONT) ||
+ (pFont->GetPsName().Find(CFX_WideString::FromLocal("+ZJHL")) != -1) ||
+ (pFont->GetPsName() == CFX_WideString::FromLocal("CNAAJI+cmex10"))) {
+ should_call_draw_device_text = false;
+ }
#endif
- if (m_pDeviceDriver->DrawDeviceText(
- nChars, pCharPos, pFont, pCache, pText2Device, font_size,
- fill_color, alpha_flag, pIccTransform)) {
- return TRUE;
- }
+ if (should_call_draw_device_text &&
+ m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache,
+ pText2Device, font_size, fill_color,
+ alpha_flag, pIccTransform)) {
+ return TRUE;
}
int alpha = FXGETFLAG_COLORTYPE(alpha_flag)
? FXGETFLAG_ALPHA_FILL(alpha_flag)
@@ -202,17 +203,19 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
return FALSE;
}
} else if (!(text_flags & FXTEXT_NO_NATIVETEXT)) {
+ bool should_call_draw_device_text = true;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
- if (!(text_flags & FXFONT_CIDFONT))
-#ifdef FOXIT_CHROME_BUILD
- if (pFont->GetPsName() != CFX_WideString::FromLocal("CNAAJI+cmex10"))
-#endif
+ if ((text_flags & FXFONT_CIDFONT) ||
+ (pFont->GetPsName() == CFX_WideString::FromLocal("CNAAJI+cmex10"))) {
+ should_call_draw_device_text = false;
+ }
#endif
- if (m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache,
- pText2Device, font_size, fill_color,
- alpha_flag, pIccTransform)) {
- return TRUE;
- }
+ if (should_call_draw_device_text &&
+ m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache,
+ pText2Device, font_size, fill_color,
+ alpha_flag, pIccTransform)) {
+ return TRUE;
+ }
}
CFX_AffineMatrix char2device, deviceCtm, text2Device;
if (pText2Device) {