summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_font.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2018-01-30 21:42:41 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-30 21:42:41 +0000
commit2334660053e044ca79a1831a6c73f69891f039e0 (patch)
tree1114eeb0e18288235dff4ff694a8c7129541a7f2 /core/fxge/cfx_font.cpp
parent90d9386825b872a0b668eac5dff3e268fa7ad16c (diff)
downloadpdfium-2334660053e044ca79a1831a6c73f69891f039e0.tar.xz
Use unsigned for char widthchromium/3335
Bug: 806612 Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1 Reviewed-on: https://pdfium-review.googlesource.com/24410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
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);
}