2
2
#ifndef TextStyle_DEFINED
3
3
#define TextStyle_DEFINED
4
4
5
+ #include " paragraph_dll.h"
6
+
5
7
#include < optional>
6
8
#include < vector>
7
9
#include " include/core/SkColor.h"
@@ -67,7 +69,7 @@ enum StyleType {
67
69
kWordSpacing
68
70
};
69
71
70
- struct Decoration {
72
+ struct SKPARAGRAPH_API Decoration {
71
73
TextDecoration fType ;
72
74
TextDecorationMode fMode ;
73
75
SkColor fColor ;
@@ -121,7 +123,7 @@ struct FontFeature {
121
123
int fValue ;
122
124
};
123
125
124
- struct PlaceholderStyle {
126
+ struct SKPARAGRAPH_API PlaceholderStyle {
125
127
PlaceholderStyle () = default ;
126
128
PlaceholderStyle (SkScalar width, SkScalar height, PlaceholderAlignment alignment,
127
129
TextBaseline baseline, SkScalar offset)
@@ -148,7 +150,7 @@ struct PlaceholderStyle {
148
150
SkScalar fBaselineOffset = 0 ;
149
151
};
150
152
151
- class TextStyle {
153
+ class SKPARAGRAPH_API TextStyle {
152
154
public:
153
155
TextStyle () = default ;
154
156
TextStyle (const TextStyle& other) = default ;
@@ -287,7 +289,7 @@ class TextStyle {
287
289
void setPlaceholder () { fIsPlaceholder = true ; }
288
290
289
291
private:
290
- static const std::vector<SkString>* kDefaultFontFamilies ;
292
+ // static const std::vector<SkString>* kDefaultFontFamilies;
291
293
292
294
Decoration fDecoration = {
293
295
TextDecoration::kNoDecoration ,
@@ -301,7 +303,7 @@ class TextStyle {
301
303
302
304
SkFontStyle fFontStyle ;
303
305
304
- std::vector<SkString> fFontFamilies = * kDefaultFontFamilies ;
306
+ std::vector<SkString> fFontFamilies = std::vector<SkString>{ SkString (DEFAULT_FONT_FAMILY)} ;
305
307
306
308
SkScalar fFontSize = 14.0 ;
307
309
SkScalar fHeight = 1.0 ;
@@ -336,7 +338,7 @@ typedef size_t TextIndex;
336
338
typedef SkRange<size_t > TextRange;
337
339
const SkRange<size_t > EMPTY_TEXT = EMPTY_RANGE;
338
340
339
- struct Block {
341
+ struct SKPARAGRAPH_API Block {
340
342
Block () = default ;
341
343
Block (size_t start, size_t end, const TextStyle& style) : fRange (start, end), fStyle (style) {}
342
344
Block (TextRange textRange, const TextStyle& style) : fRange (textRange), fStyle (style) {}
@@ -356,7 +358,7 @@ typedef SkRange<size_t> BlockRange;
356
358
const size_t EMPTY_BLOCK = EMPTY_INDEX;
357
359
const SkRange<size_t > EMPTY_BLOCKS = EMPTY_RANGE;
358
360
359
- struct Placeholder {
361
+ struct SKPARAGRAPH_API Placeholder {
360
362
Placeholder () = default ;
361
363
Placeholder (size_t start, size_t end, const PlaceholderStyle& style, const TextStyle& textStyle,
362
364
BlockRange blocksBefore, TextRange textBefore)
0 commit comments