diff options
Diffstat (limited to 'core/fxge/android/cfpf_skiapathfont.cpp')
-rw-r--r-- | core/fxge/android/cfpf_skiapathfont.cpp | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/core/fxge/android/cfpf_skiapathfont.cpp b/core/fxge/android/cfpf_skiapathfont.cpp index 063729f7e5..7fb797876d 100644 --- a/core/fxge/android/cfpf_skiapathfont.cpp +++ b/core/fxge/android/cfpf_skiapathfont.cpp @@ -8,25 +8,17 @@ #include "core/fxcrt/fx_memory.h" -CFPF_SkiaPathFont::CFPF_SkiaPathFont() {} +CFPF_SkiaPathFont::CFPF_SkiaPathFont(const ByteString& path, + const char* pFamily, + uint32_t dwStyle, + int32_t iFaceIndex, + uint32_t dwCharsets, + int32_t iGlyphNum) + : m_bsPath(path), + m_bsFamily(pFamily), + m_dwStyle(dwStyle), + m_iFaceIndex(iFaceIndex), + m_dwCharsets(dwCharsets), + m_iGlyphNum(iGlyphNum) {} -CFPF_SkiaPathFont::~CFPF_SkiaPathFont() { - FX_Free(m_pFamily); - FX_Free(m_pPath); -} - -void CFPF_SkiaPathFont::SetPath(const char* pPath) { - FX_Free(m_pPath); - int32_t iSize = strlen(pPath); - m_pPath = FX_Alloc(char, iSize + 1); - 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; -} +CFPF_SkiaPathFont::~CFPF_SkiaPathFont() = default; |