summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-02-24 16:16:02 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-24 21:37:22 +0000
commit412fa65331cc04776bf1e3da5f51f29ea0fc7937 (patch)
treec705c0fdbf29e1b51ff268aa18352e1ffd6c0562 /core/fxge
parent0b6447a7231b5263d10f2bd9be3088f93af9629f (diff)
downloadpdfium-412fa65331cc04776bf1e3da5f51f29ea0fc7937.tar.xz
Remove repeated flags from CPDF_Fontchromium/3023
Moved all the flags to CFX_Font. Explicitly stated which ones are valued according to the PDF spec to avoid their values being changed. Change-Id: Ib57593234a4b9b83ef1ad593d0396c64159f303f Reviewed-on: https://pdfium-review.googlesource.com/2837 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/fx_font.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/core/fxge/fx_font.h b/core/fxge/fx_font.h
index 3c095d1976..07392fa07f 100644
--- a/core/fxge/fx_font.h
+++ b/core/fxge/fx_font.h
@@ -58,13 +58,18 @@ using CFX_TypeFace = SkTypeface;
#define FXFONT_FW_NORMAL 400
#define FXFONT_FW_BOLD 700
-/* Font styles */
-#define FXFONT_FIXED_PITCH 0x01
-#define FXFONT_SERIF 0x02
-#define FXFONT_SYMBOLIC 0x04
-#define FXFONT_SCRIPT 0x08
-#define FXFONT_ITALIC 0x40
-#define FXFONT_BOLD 0x40000
+/* Font styles as defined in PDF 1.7 Table 5.20 */
+#define FXFONT_FIXED_PITCH (1 << 0)
+#define FXFONT_SERIF (1 << 1)
+#define FXFONT_SYMBOLIC (1 << 2)
+#define FXFONT_SCRIPT (1 << 3)
+#define FXFONT_NONSYMBOLIC (1 << 5)
+#define FXFONT_ITALIC (1 << 6)
+#define FXFONT_ALLCAP (1 << 16)
+#define FXFONT_SMALLCAP (1 << 17)
+#define FXFONT_BOLD (1 << 18)
+
+/* Other font flags */
#define FXFONT_USEEXTERNATTR 0x80000
#define FXFONT_CIDFONT 0x100000
#ifdef PDF_ENABLE_XFA