summaryrefslogtreecommitdiff
path: root/core/fxge/android/cfpf_skiapathfont.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-17 20:40:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-17 20:40:52 +0000
commit16208a0ef769a84c7e96ff5d55a16637ca01de03 (patch)
tree3d1c284c605f5fe6ade43fbe499ed3f245bcb886 /core/fxge/android/cfpf_skiapathfont.cpp
parent1b2b76d634ba3716ee43a553cd952927a7d262a2 (diff)
downloadpdfium-16208a0ef769a84c7e96ff5d55a16637ca01de03.tar.xz
Remove CFPF_SkiaFontDescriptor.
CFPF_SkiaFontDescriptor only has a single subclass. Merge it with the subclass. Change-Id: I26d19ee527c010d2d69acd820d8acc9634b12239 Reviewed-on: https://pdfium-review.googlesource.com/40551 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/android/cfpf_skiapathfont.cpp')
-rw-r--r--core/fxge/android/cfpf_skiapathfont.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/core/fxge/android/cfpf_skiapathfont.cpp b/core/fxge/android/cfpf_skiapathfont.cpp
index 27f4fde988..063729f7e5 100644
--- a/core/fxge/android/cfpf_skiapathfont.cpp
+++ b/core/fxge/android/cfpf_skiapathfont.cpp
@@ -8,16 +8,13 @@
#include "core/fxcrt/fx_memory.h"
-CFPF_SkiaPathFont::CFPF_SkiaPathFont() : m_pPath(nullptr) {}
+CFPF_SkiaPathFont::CFPF_SkiaPathFont() {}
CFPF_SkiaPathFont::~CFPF_SkiaPathFont() {
+ FX_Free(m_pFamily);
FX_Free(m_pPath);
}
-int32_t CFPF_SkiaPathFont::GetType() const {
- return FPF_SKIAFONTTYPE_Path;
-}
-
void CFPF_SkiaPathFont::SetPath(const char* pPath) {
FX_Free(m_pPath);
int32_t iSize = strlen(pPath);
@@ -25,3 +22,11 @@ void CFPF_SkiaPathFont::SetPath(const char* pPath) {
memcpy(m_pPath, pPath, iSize * sizeof(char));
m_pPath[iSize] = 0;
}
+
+void CFPF_SkiaPathFont::SetFamily(const char* pFamily) {
+ FX_Free(m_pFamily);
+ int32_t iSize = strlen(pFamily);
+ m_pFamily = FX_Alloc(char, iSize + 1);
+ memcpy(m_pFamily, pFamily, iSize * sizeof(char));
+ m_pFamily[iSize] = 0;
+}