Remove 2 unused text printing options.

Printing text as image and printing text as graphic vectors are two
options which have no API to turn on and has no code coverage in PDFium.

This CL removes the usages of their matching flags: |bPrintGraphicText|
and |bPrintImageText| in CPDF_RenderOptions::Options,
|FXTEXT_PRINTGRAPHICTEXT| and |FXTEXT_PRINTIMAGETEXT| from
core/fxge/render_defines.h.

Bug: pdfium:1535
Change-Id: I67d300211f44af77c4b3e8a5d86ae2bca04f5a5d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Hui Yingst <nigi@chromium.org>
diff --git a/core/fpdfapi/render/cpdf_renderoptions.h b/core/fpdfapi/render/cpdf_renderoptions.h
index 322faae..8c6c4af 100644
--- a/core/fpdfapi/render/cpdf_renderoptions.h
+++ b/core/fpdfapi/render/cpdf_renderoptions.h
@@ -24,14 +24,12 @@
     Options(const Options& rhs);
 
     bool bClearType = false;
-    bool bPrintGraphicText = false;
     bool bPrintPreview = false;
     bool bBGRStripe = false;
     bool bNoNativeText = false;
     bool bForceHalftone = false;
     bool bRectAA = false;
     bool bFillFullcover = false;
-    bool bPrintImageText = false;
     bool bOverprint = false;
     bool bThinLine = false;
     bool bBreakForMasks = false;
diff --git a/core/fpdfapi/render/cpdf_textrenderer.cpp b/core/fpdfapi/render/cpdf_textrenderer.cpp
index 2bdce2f..2398c7c 100644
--- a/core/fpdfapi/render/cpdf_textrenderer.cpp
+++ b/core/fpdfapi/render/cpdf_textrenderer.cpp
@@ -40,13 +40,6 @@
   if (options.GetOptions().bNoNativeText)
     text_options |= FXTEXT_NO_NATIVETEXT;
 
-  // TODO(crbug.com/pdfium/1535): Clean up or add code coverage for text
-  // rendering options |FXTEXT_PRINTGRAPHICTEXT| and |FXTEXT_PRINTIMAGETEXT|.
-  if (options.GetOptions().bPrintGraphicText)
-    text_options |= FXTEXT_PRINTGRAPHICTEXT;
-  if (options.GetOptions().bPrintImageText)
-    text_options |= FXTEXT_PRINTIMAGETEXT;
-
   return text_options;
 }
 
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index 02abe9c..7899d0a 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -863,12 +863,10 @@
                                       uint32_t text_flags) {
   int nativetext_flags = text_flags;
   if (GetDeviceType() != DeviceType::kDisplay) {
-    if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) {
-      if (ShouldDrawDeviceText(pFont, text_flags) &&
-          m_pDeviceDriver->DrawDeviceText(
-              nChars, pCharPos, pFont, mtText2Device, font_size, fill_color)) {
-        return true;
-      }
+    if (ShouldDrawDeviceText(pFont, text_flags) &&
+        m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, mtText2Device,
+                                        font_size, fill_color)) {
+      return true;
     }
     if (FXARGB_A(fill_color) < 255)
       return false;
@@ -883,8 +881,7 @@
   CFX_Matrix text2Device = mtText2Device;
   char2device.Scale(font_size, -font_size);
   if (fabs(char2device.a) + fabs(char2device.b) > 50 * 1.0f ||
-      (GetDeviceType() == DeviceType::kPrinter &&
-       !(text_flags & FXTEXT_PRINTIMAGETEXT))) {
+      GetDeviceType() == DeviceType::kPrinter) {
     if (pFont->GetFaceRec()) {
       int nPathFlags =
           (text_flags & FXTEXT_NOSMOOTH) == 0 ? 0 : FXFILL_NOPATHSMOOTH;
diff --git a/core/fxge/render_defines.h b/core/fxge/render_defines.h
index ff52b4e..152c7f1 100644
--- a/core/fxge/render_defines.h
+++ b/core/fxge/render_defines.h
@@ -41,9 +41,7 @@
 
 #define FXTEXT_CLEARTYPE 0x01
 #define FXTEXT_BGR_STRIPE 0x02
-#define FXTEXT_PRINTGRAPHICTEXT 0x04
 #define FXTEXT_NO_NATIVETEXT 0x08
-#define FXTEXT_PRINTIMAGETEXT 0x10
 #define FXTEXT_NOSMOOTH 0x20
 
 #endif  // CORE_FXGE_RENDER_DEFINES_H_