summaryrefslogtreecommitdiff
path: root/core/fxge/android/cfpf_skiapathfont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/android/cfpf_skiapathfont.cpp')
-rw-r--r--core/fxge/android/cfpf_skiapathfont.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/core/fxge/android/cfpf_skiapathfont.cpp b/core/fxge/android/cfpf_skiapathfont.cpp
new file mode 100644
index 0000000000..44e19bc8e5
--- /dev/null
+++ b/core/fxge/android/cfpf_skiapathfont.cpp
@@ -0,0 +1,27 @@
+// Copyright 2017 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "core/fxge/android/cfpf_skiapathfont.h"
+
+#include "core/fxcrt/fx_memory.h"
+
+CFPF_SkiaPathFont::CFPF_SkiaPathFont() : m_pPath(nullptr) {}
+
+CFPF_SkiaPathFont::~CFPF_SkiaPathFont() {
+ 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 = FXSYS_strlen(pPath);
+ m_pPath = FX_Alloc(char, iSize + 1);
+ memcpy(m_pPath, pPath, iSize * sizeof(char));
+ m_pPath[iSize] = 0;
+}