Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 1 | // Copyright 2019 Google LLC. |
| 2 | #ifndef TextStyle_DEFINED |
| 3 | #define TextStyle_DEFINED |
| 4 | |
| 5 | #include <vector> |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 6 | #include "include/core/SkColor.h" |
| 7 | #include "include/core/SkFont.h" |
| 8 | #include "include/core/SkFontMetrics.h" |
| 9 | #include "include/core/SkFontStyle.h" |
| 10 | #include "include/core/SkPaint.h" |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 11 | #include "include/core/SkScalar.h" |
Greg Daniel | f91aeb2 | 2019-06-18 09:58:02 -0400 | [diff] [blame] | 12 | #include "modules/skparagraph/include/DartTypes.h" |
| 13 | #include "modules/skparagraph/include/TextShadow.h" |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 14 | |
| 15 | // TODO: Make it external so the other platforms (Android) could use it |
| 16 | #define DEFAULT_FONT_FAMILY "sans-serif" |
| 17 | |
| 18 | namespace skia { |
| 19 | namespace textlayout { |
| 20 | |
Julia Lavrova | c036058 | 2020-02-05 10:17:53 -0500 | [diff] [blame] | 21 | static inline bool nearlyZero(SkScalar x, SkScalar tolerance = SK_ScalarNearlyZero) { |
| 22 | if (SkScalarIsFinite(x)) { |
| 23 | return SkScalarNearlyZero(x, tolerance); |
| 24 | } |
| 25 | return false; |
| 26 | } |
| 27 | |
| 28 | static inline bool nearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance = SK_ScalarNearlyZero) { |
| 29 | if (SkScalarIsFinite(x) && SkScalarIsFinite(x)) { |
| 30 | return SkScalarNearlyEqual(x, y, tolerance); |
| 31 | } |
| 32 | // Inf == Inf, anything else is false |
| 33 | return x == y; |
| 34 | } |
| 35 | |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 36 | // Multiple decorations can be applied at once. Ex: Underline and overline is |
| 37 | // (0x1 | 0x2) |
| 38 | enum TextDecoration { |
| 39 | kNoDecoration = 0x0, |
| 40 | kUnderline = 0x1, |
| 41 | kOverline = 0x2, |
| 42 | kLineThrough = 0x4, |
| 43 | }; |
Julia Lavrova | b5c69a4 | 2019-07-11 09:34:39 -0400 | [diff] [blame] | 44 | constexpr TextDecoration AllTextDecorations[] = { |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 45 | kNoDecoration, |
| 46 | kUnderline, |
| 47 | kOverline, |
| 48 | kLineThrough, |
| 49 | }; |
| 50 | |
| 51 | enum TextDecorationStyle { kSolid, kDouble, kDotted, kDashed, kWavy }; |
| 52 | |
Julia Lavrova | 18db52f | 2020-05-04 15:03:18 -0400 | [diff] [blame] | 53 | enum TextDecorationMode { kGaps, kThrough }; |
| 54 | |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 55 | enum StyleType { |
Julia Lavrova | 76ae22e | 2020-02-26 12:14:18 -0500 | [diff] [blame] | 56 | kNone, |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 57 | kAllAttributes, |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 58 | kFont, |
| 59 | kForeground, |
| 60 | kBackground, |
| 61 | kShadow, |
| 62 | kDecorations, |
| 63 | kLetterSpacing, |
| 64 | kWordSpacing |
| 65 | }; |
| 66 | |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 67 | struct Decoration { |
| 68 | TextDecoration fType; |
Julia Lavrova | 18db52f | 2020-05-04 15:03:18 -0400 | [diff] [blame] | 69 | TextDecorationMode fMode; |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 70 | SkColor fColor; |
| 71 | TextDecorationStyle fStyle; |
| 72 | SkScalar fThicknessMultiplier; |
| 73 | |
| 74 | bool operator==(const Decoration& other) const { |
| 75 | return this->fType == other.fType && |
Julia Lavrova | 18db52f | 2020-05-04 15:03:18 -0400 | [diff] [blame] | 76 | this->fMode == other.fMode && |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 77 | this->fColor == other.fColor && |
| 78 | this->fStyle == other.fStyle && |
| 79 | this->fThicknessMultiplier == other.fThicknessMultiplier; |
| 80 | } |
| 81 | }; |
| 82 | |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 83 | /// Where to vertically align the placeholder relative to the surrounding text. |
| 84 | enum class PlaceholderAlignment { |
| 85 | /// Match the baseline of the placeholder with the baseline. |
| 86 | kBaseline, |
| 87 | |
| 88 | /// Align the bottom edge of the placeholder with the baseline such that the |
| 89 | /// placeholder sits on top of the baseline. |
| 90 | kAboveBaseline, |
| 91 | |
| 92 | /// Align the top edge of the placeholder with the baseline specified in |
| 93 | /// such that the placeholder hangs below the baseline. |
| 94 | kBelowBaseline, |
| 95 | |
| 96 | /// Align the top edge of the placeholder with the top edge of the font. |
| 97 | /// When the placeholder is very tall, the extra space will hang from |
| 98 | /// the top and extend through the bottom of the line. |
| 99 | kTop, |
| 100 | |
| 101 | /// Align the bottom edge of the placeholder with the top edge of the font. |
| 102 | /// When the placeholder is very tall, the extra space will rise from |
| 103 | /// the bottom and extend through the top of the line. |
| 104 | kBottom, |
| 105 | |
| 106 | /// Align the middle of the placeholder with the middle of the text. When the |
| 107 | /// placeholder is very tall, the extra space will grow equally from |
| 108 | /// the top and bottom of the line. |
| 109 | kMiddle, |
| 110 | }; |
| 111 | |
Julia Lavrova | c5313e6 | 2019-12-10 12:11:17 -0500 | [diff] [blame] | 112 | struct FontFeature { |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 113 | FontFeature(const SkString name, int value) : fName(name), fValue(value) {} |
Ben Wagner | 833313b | 2020-03-23 17:22:24 -0400 | [diff] [blame] | 114 | bool operator==(const FontFeature& that) const { |
| 115 | return fName == that.fName && fValue == that.fValue; |
Julia Lavrova | c5313e6 | 2019-12-10 12:11:17 -0500 | [diff] [blame] | 116 | } |
| 117 | SkString fName; |
| 118 | int fValue; |
| 119 | }; |
| 120 | |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 121 | struct PlaceholderStyle { |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 122 | PlaceholderStyle() = default; |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 123 | PlaceholderStyle(SkScalar width, SkScalar height, PlaceholderAlignment alignment, |
| 124 | TextBaseline baseline, SkScalar offset) |
| 125 | : fWidth(width) |
| 126 | , fHeight(height) |
| 127 | , fAlignment(alignment) |
| 128 | , fBaseline(baseline) |
| 129 | , fBaselineOffset(offset) {} |
| 130 | |
Ben Wagner | 833313b | 2020-03-23 17:22:24 -0400 | [diff] [blame] | 131 | bool equals(const PlaceholderStyle&) const; |
Julia Lavrova | 4cf1874 | 2020-01-14 13:24:45 -0500 | [diff] [blame] | 132 | |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 133 | SkScalar fWidth = 0; |
| 134 | SkScalar fHeight = 0; |
| 135 | PlaceholderAlignment fAlignment = PlaceholderAlignment::kBaseline; |
| 136 | TextBaseline fBaseline = TextBaseline::kAlphabetic; |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 137 | // Distance from the top edge of the rect to the baseline position. This |
| 138 | // baseline will be aligned against the alphabetic baseline of the surrounding |
| 139 | // text. |
| 140 | // |
| 141 | // Positive values drop the baseline lower (positions the rect higher) and |
| 142 | // small or negative values will cause the rect to be positioned underneath |
| 143 | // the line. When baseline == height, the bottom edge of the rect will rest on |
| 144 | // the alphabetic baseline. |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 145 | SkScalar fBaselineOffset = 0; |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 146 | }; |
| 147 | |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 148 | class TextStyle { |
| 149 | public: |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 150 | TextStyle() = default; |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 151 | TextStyle(const TextStyle& other, bool placeholder); |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 152 | |
| 153 | bool equals(const TextStyle& other) const; |
Julia Lavrova | 4cf1874 | 2020-01-14 13:24:45 -0500 | [diff] [blame] | 154 | bool equalsByFonts(const TextStyle& that) const; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 155 | bool matchOneAttribute(StyleType styleType, const TextStyle& other) const; |
| 156 | bool operator==(const TextStyle& rhs) const { return this->equals(rhs); } |
| 157 | |
| 158 | // Colors |
| 159 | SkColor getColor() const { return fColor; } |
| 160 | void setColor(SkColor color) { fColor = color; } |
| 161 | |
| 162 | bool hasForeground() const { return fHasForeground; } |
| 163 | SkPaint getForeground() const { return fForeground; } |
| 164 | void setForegroundColor(SkPaint paint) { |
| 165 | fHasForeground = true; |
| 166 | fForeground = std::move(paint); |
| 167 | } |
| 168 | void clearForegroundColor() { fHasForeground = false; } |
| 169 | |
| 170 | bool hasBackground() const { return fHasBackground; } |
| 171 | SkPaint getBackground() const { return fBackground; } |
| 172 | void setBackgroundColor(SkPaint paint) { |
| 173 | fHasBackground = true; |
| 174 | fBackground = std::move(paint); |
| 175 | } |
| 176 | void clearBackgroundColor() { fHasBackground = false; } |
| 177 | |
| 178 | // Decorations |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 179 | Decoration getDecoration() const { return fDecoration; } |
| 180 | TextDecoration getDecorationType() const { return fDecoration.fType; } |
Julia Lavrova | 18db52f | 2020-05-04 15:03:18 -0400 | [diff] [blame] | 181 | TextDecorationMode getDecorationMode() const { return fDecoration.fMode; } |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 182 | SkColor getDecorationColor() const { return fDecoration.fColor; } |
| 183 | TextDecorationStyle getDecorationStyle() const { return fDecoration.fStyle; } |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 184 | SkScalar getDecorationThicknessMultiplier() const { |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 185 | return fDecoration.fThicknessMultiplier; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 186 | } |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 187 | void setDecoration(TextDecoration decoration) { fDecoration.fType = decoration; } |
Julia Lavrova | 18db52f | 2020-05-04 15:03:18 -0400 | [diff] [blame] | 188 | void setDecorationMode(TextDecorationMode mode) { fDecoration.fMode = mode; } |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 189 | void setDecorationStyle(TextDecorationStyle style) { fDecoration.fStyle = style; } |
| 190 | void setDecorationColor(SkColor color) { fDecoration.fColor = color; } |
| 191 | void setDecorationThicknessMultiplier(SkScalar m) { fDecoration.fThicknessMultiplier = m; } |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 192 | |
| 193 | // Weight/Width/Slant |
| 194 | SkFontStyle getFontStyle() const { return fFontStyle; } |
| 195 | void setFontStyle(SkFontStyle fontStyle) { fFontStyle = fontStyle; } |
| 196 | |
| 197 | // Shadows |
| 198 | size_t getShadowNumber() const { return fTextShadows.size(); } |
| 199 | std::vector<TextShadow> getShadows() const { return fTextShadows; } |
| 200 | void addShadow(TextShadow shadow) { fTextShadows.emplace_back(shadow); } |
| 201 | void resetShadows() { fTextShadows.clear(); } |
| 202 | |
Julia Lavrova | c5313e6 | 2019-12-10 12:11:17 -0500 | [diff] [blame] | 203 | // Font features |
| 204 | size_t getFontFeatureNumber() const { return fFontFeatures.size(); } |
| 205 | std::vector<FontFeature> getFontFeatures() const { return fFontFeatures; } |
| 206 | void addFontFeature(const SkString& fontFeature, int value) |
| 207 | { fFontFeatures.emplace_back(fontFeature, value); } |
| 208 | void resetFontFeatures() { fFontFeatures.clear(); } |
| 209 | |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 210 | SkScalar getFontSize() const { return fFontSize; } |
| 211 | void setFontSize(SkScalar size) { fFontSize = size; } |
| 212 | |
| 213 | const std::vector<SkString>& getFontFamilies() const { return fFontFamilies; } |
| 214 | void setFontFamilies(std::vector<SkString> families) { |
| 215 | fFontFamilies = std::move(families); |
| 216 | } |
| 217 | |
| 218 | void setHeight(SkScalar height) { fHeight = height; } |
Julia Lavrova | db9f669 | 2019-08-01 16:02:17 -0400 | [diff] [blame] | 219 | SkScalar getHeight() const { return fHeightOverride ? fHeight : 0; } |
| 220 | |
| 221 | void setHeightOverride(bool heightOverride) { fHeightOverride = heightOverride; } |
| 222 | bool getHeightOverride() const { return fHeightOverride; } |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 223 | |
| 224 | void setLetterSpacing(SkScalar letterSpacing) { fLetterSpacing = letterSpacing; } |
| 225 | SkScalar getLetterSpacing() const { return fLetterSpacing; } |
| 226 | |
| 227 | void setWordSpacing(SkScalar wordSpacing) { fWordSpacing = wordSpacing; } |
| 228 | SkScalar getWordSpacing() const { return fWordSpacing; } |
| 229 | |
| 230 | SkTypeface* getTypeface() const { return fTypeface.get(); } |
| 231 | sk_sp<SkTypeface> refTypeface() const { return fTypeface; } |
| 232 | void setTypeface(sk_sp<SkTypeface> typeface) { fTypeface = std::move(typeface); } |
| 233 | |
| 234 | SkString getLocale() const { return fLocale; } |
| 235 | void setLocale(const SkString& locale) { fLocale = locale; } |
| 236 | |
| 237 | TextBaseline getTextBaseline() const { return fTextBaseline; } |
| 238 | void setTextBaseline(TextBaseline baseline) { fTextBaseline = baseline; } |
| 239 | |
Julia Lavrova | db9f669 | 2019-08-01 16:02:17 -0400 | [diff] [blame] | 240 | void getFontMetrics(SkFontMetrics* metrics) const; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 241 | |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 242 | bool isPlaceholder() const { return fIsPlaceholder; } |
| 243 | void setPlaceholder() { fIsPlaceholder = true; } |
| 244 | |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 245 | private: |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 246 | Decoration fDecoration = { |
| 247 | TextDecoration::kNoDecoration, |
| 248 | // TODO: switch back to kGaps when (if) switching flutter to skparagraph |
| 249 | TextDecorationMode::kThrough, |
| 250 | // It does not make sense to draw a transparent object, so we use this as a default |
| 251 | // value to indicate no decoration color was set. |
| 252 | SK_ColorTRANSPARENT, TextDecorationStyle::kSolid, |
| 253 | // Thickness is applied as a multiplier to the default thickness of the font. |
| 254 | 1.0f}; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 255 | |
| 256 | SkFontStyle fFontStyle; |
| 257 | |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 258 | std::vector<SkString> fFontFamilies = { SkString(DEFAULT_FONT_FAMILY) }; |
| 259 | SkScalar fFontSize = 14.0; |
| 260 | SkScalar fHeight = 1.0; |
| 261 | bool fHeightOverride = false; |
| 262 | SkString fLocale = {}; |
| 263 | SkScalar fLetterSpacing = 0.0; |
| 264 | SkScalar fWordSpacing = 0.0; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 265 | |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 266 | TextBaseline fTextBaseline = TextBaseline::kAlphabetic; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 267 | |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 268 | SkColor fColor = SK_ColorWHITE; |
| 269 | bool fHasBackground = false; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 270 | SkPaint fBackground; |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 271 | bool fHasForeground = false; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 272 | SkPaint fForeground; |
| 273 | |
| 274 | std::vector<TextShadow> fTextShadows; |
| 275 | |
| 276 | sk_sp<SkTypeface> fTypeface; |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 277 | bool fIsPlaceholder = false; |
Julia Lavrova | c5313e6 | 2019-12-10 12:11:17 -0500 | [diff] [blame] | 278 | |
| 279 | std::vector<FontFeature> fFontFeatures; |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 280 | }; |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 281 | |
| 282 | typedef size_t TextIndex; |
| 283 | typedef SkRange<size_t> TextRange; |
| 284 | const SkRange<size_t> EMPTY_TEXT = EMPTY_RANGE; |
| 285 | |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 286 | struct Block { |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 287 | Block() = default; |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 288 | Block(size_t start, size_t end, const TextStyle& style) : fRange(start, end), fStyle(style) {} |
| 289 | Block(TextRange textRange, const TextStyle& style) : fRange(textRange), fStyle(style) {} |
| 290 | |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 291 | void add(TextRange tail) { |
| 292 | SkASSERT(fRange.end == tail.start); |
| 293 | fRange = TextRange(fRange.start, fRange.start + fRange.width() + tail.width()); |
| 294 | } |
Julia Lavrova | 90bfd1c | 2019-12-04 11:43:32 -0500 | [diff] [blame] | 295 | |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 296 | TextRange fRange = EMPTY_RANGE; |
Julia Lavrova | 5207f35 | 2019-06-21 12:22:32 -0400 | [diff] [blame] | 297 | TextStyle fStyle; |
| 298 | }; |
| 299 | |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 300 | |
| 301 | typedef size_t BlockIndex; |
| 302 | typedef SkRange<size_t> BlockRange; |
| 303 | const size_t EMPTY_BLOCK = EMPTY_INDEX; |
| 304 | const SkRange<size_t> EMPTY_BLOCKS = EMPTY_RANGE; |
| 305 | |
| 306 | struct Placeholder { |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 307 | Placeholder() = default; |
Julia Lavrova | f3ed273 | 2019-09-05 14:35:17 -0400 | [diff] [blame] | 308 | Placeholder(size_t start, size_t end, const PlaceholderStyle& style, const TextStyle& textStyle, |
| 309 | BlockRange blocksBefore, TextRange textBefore) |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 310 | : fRange(start, end) |
| 311 | , fStyle(style) |
Julia Lavrova | f3ed273 | 2019-09-05 14:35:17 -0400 | [diff] [blame] | 312 | , fTextStyle(textStyle) |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 313 | , fBlocksBefore(blocksBefore) |
| 314 | , fTextBefore(textBefore) {} |
| 315 | |
John Stiles | 059ed67 | 2020-07-27 15:53:28 -0400 | [diff] [blame] | 316 | TextRange fRange = EMPTY_RANGE; |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 317 | PlaceholderStyle fStyle; |
Julia Lavrova | f3ed273 | 2019-09-05 14:35:17 -0400 | [diff] [blame] | 318 | TextStyle fTextStyle; |
Julia Lavrova | 916a904 | 2019-08-08 16:51:27 -0400 | [diff] [blame] | 319 | BlockRange fBlocksBefore; |
| 320 | TextRange fTextBefore; |
| 321 | }; |
| 322 | |
Julia Lavrova | a3552c5 | 2019-05-30 16:12:56 -0400 | [diff] [blame] | 323 | } // namespace textlayout |
| 324 | } // namespace skia |
| 325 | |
| 326 | #endif // TextStyle_DEFINED |