summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_edit_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_edit_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdf_edit_embeddertest.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index 9464417da1..445b0cc6b9 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -1487,6 +1487,23 @@ TEST_F(FPDFEditEmbeddertest, AddStandardFontText) {
FPDF_ClosePage(page);
}
+TEST_F(FPDFEditEmbeddertest, TestGetTextRenderMode) {
+ EXPECT_TRUE(OpenDocument("text_render_mode.pdf"));
+ FPDF_PAGE page = LoadPage(0);
+ ASSERT_TRUE(page);
+ ASSERT_EQ(2, FPDFPage_CountObjects(page));
+
+ ASSERT_EQ(-1, FPDFText_GetTextRenderMode(nullptr));
+
+ FPDF_PAGEOBJECT fill = FPDFPage_GetObject(page, 0);
+ ASSERT_EQ(FPDF_TEXTRENDERMODE_FILL, FPDFText_GetTextRenderMode(fill));
+
+ FPDF_PAGEOBJECT stroke = FPDFPage_GetObject(page, 1);
+ ASSERT_EQ(FPDF_TEXTRENDERMODE_STROKE, FPDFText_GetTextRenderMode(stroke));
+
+ UnloadPage(page);
+}
+
// Tests adding text from standard font using FPDFText_LoadStandardFont.
TEST_F(FPDFEditEmbeddertest, AddStandardFontText2) {
// Start with a blank page