summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-28 15:59:42 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-28 20:40:36 +0000
commit10e1f05a9e644cd954792bcd40ef787551cbd209 (patch)
treed203254a0a2c856a9b8ba5a0445a883c7072dd77 /fpdfsdk
parentdd0e6e1eba14c76dedd4b4e55ab47406856c9a76 (diff)
downloadpdfium-10e1f05a9e644cd954792bcd40ef787551cbd209.tar.xz
Cleanup font defines
Use methods to match font information; cleanup some font code. Change-Id: Ib99c1e466e56723cb5d264d49e1caf9bbbc0daed Reviewed-on: https://pdfium-review.googlesource.com/15072 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index 1fb0cde7f9..74e85f6795 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -47,16 +47,11 @@ class FPDFEditEmbeddertest : public EmbedderTest {
// Check that the font descriptor has the required keys according to spec
// 1.7 Table 5.19
ASSERT_TRUE(font_desc->KeyExist("Flags"));
+
int font_flags = font_desc->GetIntegerFor("Flags");
- if (bold)
- EXPECT_TRUE(font_flags & FXFONT_BOLD);
- else
- EXPECT_FALSE(font_flags & FXFONT_BOLD);
- if (italic)
- EXPECT_TRUE(font_flags & FXFONT_ITALIC);
- else
- EXPECT_FALSE(font_flags & FXFONT_ITALIC);
- EXPECT_TRUE(font_flags & FXFONT_NONSYMBOLIC);
+ EXPECT_EQ(bold, FontStyleIsBold(font_flags));
+ EXPECT_EQ(italic, FontStyleIsItalic(font_flags));
+ EXPECT_TRUE(FontStyleIsNonSymbolic(font_flags));
ASSERT_TRUE(font_desc->KeyExist("FontBBox"));
CPDF_Array* fontBBox = font_desc->GetArrayFor("FontBBox");