summaryrefslogtreecommitdiff
path: root/core/fxge/android/cfpf_skiafont.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-17 23:50:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-17 23:50:02 +0000
commit3f9a65a6bc254008625d6641ff9c54a40a64fb70 (patch)
tree48a869674f5df70c8cd80f3f6ed0dd2e8fea7a47 /core/fxge/android/cfpf_skiafont.cpp
parenta9d56105a725d223f87bd979ffbf61a8a2377c08 (diff)
downloadpdfium-3f9a65a6bc254008625d6641ff9c54a40a64fb70.tar.xz
Encapsulate CFPF_SkiaPathFont members.
Use ByteString instead of char* for string data. Change-Id: I28dee8f3544b8b85ea46f2e8bc84249f32e368a0 Reviewed-on: https://pdfium-review.googlesource.com/40570 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/android/cfpf_skiafont.cpp')
-rw-r--r--core/fxge/android/cfpf_skiafont.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/fxge/android/cfpf_skiafont.cpp b/core/fxge/android/cfpf_skiafont.cpp
index 0118f9512e..242ddfd3bb 100644
--- a/core/fxge/android/cfpf_skiafont.cpp
+++ b/core/fxge/android/cfpf_skiafont.cpp
@@ -151,11 +151,9 @@ int32_t CFPF_SkiaFont::GetItalicAngle() const {
if (!m_Face)
return 0;
- TT_Postscript* ttInfo =
- (TT_Postscript*)FT_Get_Sfnt_Table(m_Face, ft_sfnt_post);
- if (ttInfo)
- return ttInfo->italicAngle;
- return 0;
+ auto* info =
+ static_cast<TT_Postscript*>(FT_Get_Sfnt_Table(m_Face, ft_sfnt_post));
+ return info ? info->italicAngle : 0;
}
uint32_t CFPF_SkiaFont::GetFontData(uint32_t dwTable,
@@ -178,7 +176,7 @@ bool CFPF_SkiaFont::InitFont(CFPF_SkiaFontMgr* pFontMgr,
if (!pFontMgr || !pFont)
return false;
- m_Face = pFontMgr->GetFontFace(pFont->m_pPath, pFont->m_iFaceIndex);
+ m_Face = pFontMgr->GetFontFace(pFont->path(), pFont->face_index());
if (!m_Face)
return false;