Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1724)

Unified Diff: core/fxge/ge/cfx_font.cpp

Issue 2323793003: Refactor CPDF_Document (Closed)
Patch Set: Comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fxge/ge/cfx_font.cpp
diff --git a/core/fxge/ge/cfx_font.cpp b/core/fxge/ge/cfx_font.cpp
index 3d2e6d64991d04e5ceeebd941ed375ff59c48dd3..3fa459666d8c7ad558a23cbaca19e53516bc3ab5 100644
--- a/core/fxge/ge/cfx_font.cpp
+++ b/core/fxge/ge/cfx_font.cpp
@@ -446,30 +446,30 @@ FX_BOOL CFX_Font::GetGlyphBBox(uint32_t glyph_index, FX_RECT& bbox) {
return TRUE;
}
-FX_BOOL CFX_Font::IsItalic() const {
+bool CFX_Font::IsItalic() const {
if (!m_Face)
- return FALSE;
+ return false;
- FX_BOOL ret = FXFT_Is_Face_Italic(m_Face) == FXFT_STYLE_FLAG_ITALIC;
+ bool ret = FXFT_Is_Face_Italic(m_Face) == FXFT_STYLE_FLAG_ITALIC;
Lei Zhang 2016/09/09 21:27:49 This can be: if (FXFT_Is_Face_Italic(m_Face) == F
npm 2016/09/12 14:47:27 Done.
if (!ret) {
CFX_ByteString str(FXFT_Get_Face_Style_Name(m_Face));
str.MakeLower();
if (str.Find("italic") != -1)
- ret = TRUE;
+ ret = true;
}
return ret;
}
-FX_BOOL CFX_Font::IsBold() const {
+bool CFX_Font::IsBold() const {
if (!m_Face)
- return FALSE;
+ return false;
return FXFT_Is_Face_Bold(m_Face) == FXFT_STYLE_FLAG_BOLD;
}
-FX_BOOL CFX_Font::IsFixedWidth() const {
+bool CFX_Font::IsFixedWidth() const {
if (!m_Face)
- return FALSE;
- return FXFT_Is_Face_fixedwidth(m_Face);
+ return false;
+ return FXFT_Is_Face_fixedwidth(m_Face) != 0;
}
CFX_ByteString CFX_Font::GetPsName() const {

Powered by Google App Engine
This is Rietveld 408576698