summaryrefslogtreecommitdiff
path: root/core/fxge/android/cfpf_skiafont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/android/cfpf_skiafont.cpp')
-rw-r--r--core/fxge/android/cfpf_skiafont.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/core/fxge/android/cfpf_skiafont.cpp b/core/fxge/android/cfpf_skiafont.cpp
index c7cfd4d324..5e11efae9d 100644
--- a/core/fxge/android/cfpf_skiafont.cpp
+++ b/core/fxge/android/cfpf_skiafont.cpp
@@ -87,21 +87,21 @@ int32_t CFPF_SkiaFont::GetDescent() const {
FXFT_Get_Face_Descender(m_Face));
}
-FX_BOOL CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) {
+bool CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) {
if (!m_Face)
- return FALSE;
+ return false;
if (FXFT_Is_Face_Tricky(m_Face)) {
if (FXFT_Set_Char_Size(m_Face, 0, 1000 * 64, 72, 72))
- return FALSE;
+ return false;
if (FXFT_Load_Glyph(m_Face, iGlyphIndex,
FXFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH)) {
FXFT_Set_Pixel_Sizes(m_Face, 0, 64);
- return FALSE;
+ return false;
}
FXFT_Glyph glyph;
if (FXFT_Get_Glyph(m_Face->glyph, &glyph)) {
FXFT_Set_Pixel_Sizes(m_Face, 0, 64);
- return FALSE;
+ return false;
}
FXFT_BBox cbox;
FXFT_Glyph_Get_CBox(glyph, FXFT_GLYPH_BBOX_PIXELS, &cbox);
@@ -119,7 +119,7 @@ FX_BOOL CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) {
if (FXFT_Load_Glyph(
m_Face, iGlyphIndex,
FXFT_LOAD_NO_SCALE | FXFT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH)) {
- return FALSE;
+ return false;
}
rtBBox.left = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face),
FXFT_Get_Glyph_HoriBearingX(m_Face));
@@ -131,12 +131,12 @@ FX_BOOL CFPF_SkiaFont::GetGlyphBBox(int32_t iGlyphIndex, FX_RECT& rtBBox) {
rtBBox.top = FPF_EM_ADJUST(
FXFT_Get_Face_UnitsPerEM(m_Face),
FXFT_Get_Glyph_HoriBearingY(m_Face) - FXFT_Get_Glyph_Height(m_Face));
- return TRUE;
+ return true;
}
-FX_BOOL CFPF_SkiaFont::GetBBox(FX_RECT& rtBBox) {
+bool CFPF_SkiaFont::GetBBox(FX_RECT& rtBBox) {
if (!m_Face) {
- return FALSE;
+ return false;
}
rtBBox.left = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face),
FXFT_Get_Face_xMin(m_Face));
@@ -146,7 +146,7 @@ FX_BOOL CFPF_SkiaFont::GetBBox(FX_RECT& rtBBox) {
FXFT_Get_Face_xMax(m_Face));
rtBBox.bottom = FPF_EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face),
FXFT_Get_Face_yMax(m_Face));
- return TRUE;
+ return true;
}
int32_t CFPF_SkiaFont::GetHeight() const {
@@ -179,13 +179,13 @@ uint32_t CFPF_SkiaFont::GetFontData(uint32_t dwTable,
return pdfium::base::checked_cast<uint32_t>(ulSize);
}
-FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
- CFPF_SkiaFontDescriptor* pFontDes,
- const CFX_ByteStringC& bsFamily,
- uint32_t dwStyle,
- uint8_t uCharset) {
+bool CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
+ CFPF_SkiaFontDescriptor* pFontDes,
+ const CFX_ByteStringC& bsFamily,
+ uint32_t dwStyle,
+ uint8_t uCharset) {
if (!pFontMgr || !pFontDes)
- return FALSE;
+ return false;
switch (pFontDes->GetType()) {
case FPF_SKIAFONTTYPE_Path: {
@@ -205,15 +205,15 @@ FX_BOOL CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
break;
}
default:
- return FALSE;
+ return false;
}
if (!m_Face)
- return FALSE;
+ return false;
m_dwStyle = dwStyle;
m_uCharset = uCharset;
m_pFontMgr = pFontMgr;
m_pFontDes = pFontDes;
m_dwRefCount = 1;
- return TRUE;
+ return true;
}