summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/cfx_font.cpp')
-rw-r--r--core/fxge/cfx_font.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 6d969a345c..ece3f96bed 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -295,7 +295,7 @@ bool CFX_Font::LoadFile(const RetainPtr<IFX_SeekableReadStream>& pFile,
}
#endif // PDF_ENABLE_XFA
-int CFX_Font::GetGlyphWidth(uint32_t glyph_index) {
+uint32_t CFX_Font::GetGlyphWidth(uint32_t glyph_index) {
if (!m_Face)
return 0;
if (m_pSubstFont && m_pSubstFont->m_bFlagMM)
@@ -307,7 +307,7 @@ int CFX_Font::GetGlyphWidth(uint32_t glyph_index) {
return 0;
int horiAdvance = FXFT_Get_Glyph_HoriAdvance(m_Face);
- if (horiAdvance < kThousandthMinInt || horiAdvance > kThousandthMaxInt)
+ if (horiAdvance < 0 || horiAdvance > kThousandthMaxInt)
return 0;
return EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), horiAdvance);
@@ -501,7 +501,7 @@ void CFX_Font::ClearFaceCache() {
}
void CFX_Font::AdjustMMParams(int glyph_index,
- int dest_width,
+ uint32_t dest_width,
int weight) const {
FXFT_MM_Var pMasters = nullptr;
FXFT_Get_MM_Var(m_Face, &pMasters);
@@ -544,7 +544,7 @@ void CFX_Font::AdjustMMParams(int glyph_index,
}
CFX_PathData* CFX_Font::LoadGlyphPathImpl(uint32_t glyph_index,
- int dest_width) const {
+ uint32_t dest_width) const {
if (!m_Face)
return nullptr;
FXFT_Set_Pixel_Sizes(m_Face, 0, 64);
@@ -613,7 +613,7 @@ CFX_PathData* CFX_Font::LoadGlyphPathImpl(uint32_t glyph_index,
const CFX_GlyphBitmap* CFX_Font::LoadGlyphBitmap(uint32_t glyph_index,
bool bFontStyle,
const CFX_Matrix* pMatrix,
- int dest_width,
+ uint32_t dest_width,
int anti_alias,
int& text_flags) const {
return GetFaceCache()->LoadGlyphBitmap(this, glyph_index, bFontStyle, pMatrix,
@@ -621,7 +621,7 @@ const CFX_GlyphBitmap* CFX_Font::LoadGlyphBitmap(uint32_t glyph_index,
}
const CFX_PathData* CFX_Font::LoadGlyphPath(uint32_t glyph_index,
- int dest_width) const {
+ uint32_t dest_width) const {
return GetFaceCache()->LoadGlyphPath(this, glyph_index, dest_width);
}