Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: core/fxge/android/cfpf_skiafontdescriptor.h

Issue 2448293002: Name core/fxge/android files appropriately and use one file per class (Closed)
Patch Set: Fix build Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FXGE_ANDROID_CFPF_SKIAFONTDESCRIPTOR_H_
8 #define CORE_FXGE_ANDROID_CFPF_SKIAFONTDESCRIPTOR_H_
9
10 #include "core/fxcrt/fx_system.h"
11
12 #define FPF_SKIAFONTTYPE_Unknown 0
13
14 class CFPF_SkiaFontDescriptor {
15 public:
16 CFPF_SkiaFontDescriptor()
17 : m_pFamily(nullptr),
18 m_dwStyle(0),
19 m_iFaceIndex(0),
20 m_dwCharsets(0),
21 m_iGlyphNum(0) {}
22 virtual ~CFPF_SkiaFontDescriptor() { FX_Free(m_pFamily); }
23
24 virtual int32_t GetType() const { return FPF_SKIAFONTTYPE_Unknown; }
25
26 void SetFamily(const FX_CHAR* pFamily) {
27 FX_Free(m_pFamily);
Tom Sepez 2016/10/25 21:14:14 follow-up: use some sort of string class (e.g. CFX
npm 2016/10/25 21:26:06 Acknowledged
28 int32_t iSize = FXSYS_strlen(pFamily);
29 m_pFamily = FX_Alloc(FX_CHAR, iSize + 1);
30 FXSYS_memcpy(m_pFamily, pFamily, iSize * sizeof(FX_CHAR));
31 m_pFamily[iSize] = 0;
32 }
33 FX_CHAR* m_pFamily;
34 uint32_t m_dwStyle;
35 int32_t m_iFaceIndex;
36 uint32_t m_dwCharsets;
37 int32_t m_iGlyphNum;
38 };
39
40 #endif // CORE_FXGE_ANDROID_CFPF_SKIAFONTDESCRIPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698