Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skia::textlayout::TextStyle Class Reference

#include <TextStyle.h>

Public Member Functions

 TextStyle ()=default
 
 TextStyle (const TextStyle &other)=default
 
TextStyleoperator= (const TextStyle &other)=default
 
TextStyle cloneForPlaceholder ()
 
bool equals (const TextStyle &other) const
 
bool equalsByFonts (const TextStyle &that) const
 
bool matchOneAttribute (StyleType styleType, const TextStyle &other) const
 
bool operator== (const TextStyle &rhs) const
 
SkColor getColor () const
 
void setColor (SkColor color)
 
bool hasForeground () const
 
SkPaint getForeground () const
 
ParagraphPainter::SkPaintOrID getForegroundPaintOrID () const
 
void setForegroundPaint (SkPaint paint)
 
void setForegroundColor (SkPaint paint)
 
void setForegroundPaintID (ParagraphPainter::PaintID paintID)
 
void clearForegroundColor ()
 
bool hasBackground () const
 
SkPaint getBackground () const
 
ParagraphPainter::SkPaintOrID getBackgroundPaintOrID () const
 
void setBackgroundPaint (SkPaint paint)
 
void setBackgroundColor (SkPaint paint)
 
void setBackgroundPaintID (ParagraphPainter::PaintID paintID)
 
void clearBackgroundColor ()
 
Decoration getDecoration () const
 
TextDecoration getDecorationType () const
 
TextDecorationMode getDecorationMode () const
 
SkColor getDecorationColor () const
 
TextDecorationStyle getDecorationStyle () const
 
SkScalar getDecorationThicknessMultiplier () const
 
void setDecoration (TextDecoration decoration)
 
void setDecorationMode (TextDecorationMode mode)
 
void setDecorationStyle (TextDecorationStyle style)
 
void setDecorationColor (SkColor color)
 
void setDecorationThicknessMultiplier (SkScalar m)
 
SkFontStyle getFontStyle () const
 
void setFontStyle (SkFontStyle fontStyle)
 
size_t getShadowNumber () const
 
std::vector< TextShadowgetShadows () const
 
void addShadow (TextShadow shadow)
 
void resetShadows ()
 
size_t getFontFeatureNumber () const
 
std::vector< FontFeaturegetFontFeatures () const
 
void addFontFeature (const SkString &fontFeature, int value)
 
void resetFontFeatures ()
 
const std::optional< FontArguments > & getFontArguments () const
 
void setFontArguments (const std::optional< SkFontArguments > &args)
 
SkScalar getFontSize () const
 
void setFontSize (SkScalar size)
 
const std::vector< SkString > & getFontFamilies () const
 
void setFontFamilies (std::vector< SkString > families)
 
SkScalar getBaselineShift () const
 
void setBaselineShift (SkScalar baselineShift)
 
void setHeight (SkScalar height)
 
SkScalar getHeight () const
 
void setHeightOverride (bool heightOverride)
 
bool getHeightOverride () const
 
void setHalfLeading (bool halfLeading)
 
bool getHalfLeading () const
 
void setLetterSpacing (SkScalar letterSpacing)
 
SkScalar getLetterSpacing () const
 
void setWordSpacing (SkScalar wordSpacing)
 
SkScalar getWordSpacing () const
 
SkTypefacegetTypeface () const
 
sk_sp< SkTypefacerefTypeface () const
 
void setTypeface (sk_sp< SkTypeface > typeface)
 
SkString getLocale () const
 
void setLocale (const SkString &locale)
 
TextBaseline getTextBaseline () const
 
void setTextBaseline (TextBaseline baseline)
 
void getFontMetrics (SkFontMetrics *metrics) const
 
bool isPlaceholder () const
 
void setPlaceholder ()
 

Detailed Description

Definition at line 151 of file TextStyle.h.

Constructor & Destructor Documentation

◆ TextStyle() [1/2]

skia::textlayout::TextStyle::TextStyle ( )
default

◆ TextStyle() [2/2]

skia::textlayout::TextStyle::TextStyle ( const TextStyle other)
default

Member Function Documentation

◆ addFontFeature()

void skia::textlayout::TextStyle::addFontFeature ( const SkString fontFeature,
int  value 
)
inline

Definition at line 239 of file TextStyle.h.

240 { fFontFeatures.emplace_back(fontFeature, value); }

◆ addShadow()

void skia::textlayout::TextStyle::addShadow ( TextShadow  shadow)
inline

Definition at line 233 of file TextStyle.h.

233{ fTextShadows.emplace_back(shadow); }

◆ clearBackgroundColor()

void skia::textlayout::TextStyle::clearBackgroundColor ( )
inline

Definition at line 209 of file TextStyle.h.

209{ fHasBackground = false; }

◆ clearForegroundColor()

void skia::textlayout::TextStyle::clearForegroundColor ( )
inline

Definition at line 189 of file TextStyle.h.

189{ fHasForeground = false; }

◆ cloneForPlaceholder()

TextStyle skia::textlayout::TextStyle::cloneForPlaceholder ( )

Definition at line 12 of file TextStyle.cpp.

12 {
14 result.fColor = fColor;
15 result.fFontSize = fFontSize;
16 result.fFontFamilies = fFontFamilies;
17 result.fDecoration = fDecoration;
18 result.fHasBackground = fHasBackground;
19 result.fHasForeground = fHasForeground;
20 result.fBackground = fBackground;
21 result.fForeground = fForeground;
22 result.fHeightOverride = fHeightOverride;
23 result.fIsPlaceholder = true;
24 result.fFontFeatures = fFontFeatures;
25 result.fHalfLeading = fHalfLeading;
26 result.fBaselineShift = fBaselineShift;
27 result.fFontArguments = fFontArguments;
28 return result;
29}
GAsyncResult * result

◆ equals()

bool skia::textlayout::TextStyle::equals ( const TextStyle other) const

Definition at line 31 of file TextStyle.cpp.

31 {
32
33 if (fIsPlaceholder || other.fIsPlaceholder) {
34 return false;
35 }
36
37 if (fColor != other.fColor) {
38 return false;
39 }
40 if (!(fDecoration == other.fDecoration)) {
41 return false;
42 }
43 if (!(fFontStyle == other.fFontStyle)) {
44 return false;
45 }
46 if (fFontFamilies != other.fFontFamilies) {
47 return false;
48 }
49 if (fLetterSpacing != other.fLetterSpacing) {
50 return false;
51 }
52 if (fWordSpacing != other.fWordSpacing) {
53 return false;
54 }
55 if (fHeight != other.fHeight) {
56 return false;
57 }
58 if (fHeightOverride != other.fHeightOverride) {
59 return false;
60 }
61 if (fHalfLeading != other.fHalfLeading) {
62 return false;
63 }
64 if (fBaselineShift != other.fBaselineShift) {
65 return false;
66 }
67 if (fFontSize != other.fFontSize) {
68 return false;
69 }
70 if (fLocale != other.fLocale) {
71 return false;
72 }
73 if (fHasForeground != other.fHasForeground || fForeground != other.fForeground) {
74 return false;
75 }
76 if (fHasBackground != other.fHasBackground || fBackground != other.fBackground) {
77 return false;
78 }
79 if (fTextShadows.size() != other.fTextShadows.size()) {
80 return false;
81 }
82 for (size_t i = 0; i < fTextShadows.size(); ++i) {
83 if (fTextShadows[i] != other.fTextShadows[i]) {
84 return false;
85 }
86 }
87 if (fFontFeatures.size() != other.fFontFeatures.size()) {
88 return false;
89 }
90 for (size_t i = 0; i < fFontFeatures.size(); ++i) {
91 if (!(fFontFeatures[i] == other.fFontFeatures[i])) {
92 return false;
93 }
94 }
95 if (fFontArguments != other.fFontArguments) {
96 return false;
97 }
98
99 return true;
100}

◆ equalsByFonts()

bool skia::textlayout::TextStyle::equalsByFonts ( const TextStyle that) const

Definition at line 102 of file TextStyle.cpp.

102 {
103
104 return !fIsPlaceholder && !that.fIsPlaceholder &&
105 fFontStyle == that.fFontStyle &&
106 fFontFamilies == that.fFontFamilies &&
107 fFontFeatures == that.fFontFeatures &&
108 fFontArguments == that.getFontArguments() &&
109 nearlyEqual(fLetterSpacing, that.fLetterSpacing) &&
110 nearlyEqual(fWordSpacing, that.fWordSpacing) &&
111 nearlyEqual(fHeight, that.fHeight) &&
112 nearlyEqual(fBaselineShift, that.fBaselineShift) &&
113 nearlyEqual(fFontSize, that.fFontSize) &&
114 fLocale == that.fLocale;
115}
static bool nearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
Definition TextStyle.h:31

◆ getBackground()

SkPaint skia::textlayout::TextStyle::getBackground ( ) const
inline

Definition at line 192 of file TextStyle.h.

192 {
193 const SkPaint* paint = std::get_if<SkPaint>(&fBackground);
194 return paint ? *paint : SkPaint();
195 }
const Paint & paint

◆ getBackgroundPaintOrID()

ParagraphPainter::SkPaintOrID skia::textlayout::TextStyle::getBackgroundPaintOrID ( ) const
inline

Definition at line 196 of file TextStyle.h.

196 {
197 return fBackground;
198 }

◆ getBaselineShift()

SkScalar skia::textlayout::TextStyle::getBaselineShift ( ) const
inline

Definition at line 257 of file TextStyle.h.

257{ return fBaselineShift; }

◆ getColor()

SkColor skia::textlayout::TextStyle::getColor ( ) const
inline

Definition at line 165 of file TextStyle.h.

165{ return fColor; }

◆ getDecoration()

Decoration skia::textlayout::TextStyle::getDecoration ( ) const
inline

Definition at line 212 of file TextStyle.h.

212{ return fDecoration; }

◆ getDecorationColor()

SkColor skia::textlayout::TextStyle::getDecorationColor ( ) const
inline

Definition at line 215 of file TextStyle.h.

215{ return fDecoration.fColor; }

◆ getDecorationMode()

TextDecorationMode skia::textlayout::TextStyle::getDecorationMode ( ) const
inline

Definition at line 214 of file TextStyle.h.

214{ return fDecoration.fMode; }
TextDecorationMode fMode
Definition TextStyle.h:72

◆ getDecorationStyle()

TextDecorationStyle skia::textlayout::TextStyle::getDecorationStyle ( ) const
inline

Definition at line 216 of file TextStyle.h.

216{ return fDecoration.fStyle; }
TextDecorationStyle fStyle
Definition TextStyle.h:74

◆ getDecorationThicknessMultiplier()

SkScalar skia::textlayout::TextStyle::getDecorationThicknessMultiplier ( ) const
inline

Definition at line 217 of file TextStyle.h.

217 {
218 return fDecoration.fThicknessMultiplier;
219 }

◆ getDecorationType()

TextDecoration skia::textlayout::TextStyle::getDecorationType ( ) const
inline

Definition at line 213 of file TextStyle.h.

213{ return fDecoration.fType; }

◆ getFontArguments()

const std::optional< FontArguments > & skia::textlayout::TextStyle::getFontArguments ( ) const
inline

Definition at line 244 of file TextStyle.h.

244{ return fFontArguments; }

◆ getFontFamilies()

const std::vector< SkString > & skia::textlayout::TextStyle::getFontFamilies ( ) const
inline

Definition at line 252 of file TextStyle.h.

252{ return fFontFamilies; }

◆ getFontFeatureNumber()

size_t skia::textlayout::TextStyle::getFontFeatureNumber ( ) const
inline

Definition at line 237 of file TextStyle.h.

237{ return fFontFeatures.size(); }

◆ getFontFeatures()

std::vector< FontFeature > skia::textlayout::TextStyle::getFontFeatures ( ) const
inline

Definition at line 238 of file TextStyle.h.

238{ return fFontFeatures; }

◆ getFontMetrics()

void skia::textlayout::TextStyle::getFontMetrics ( SkFontMetrics metrics) const

Definition at line 167 of file TextStyle.cpp.

167 {
168 SkFont font(fTypeface, fFontSize);
170 font.setSubpixel(true);
171 font.setHinting(SkFontHinting::kSlight);
172 font.getMetrics(metrics);
173 if (fHeightOverride) {
174 auto multiplier = fHeight * fFontSize;
175 auto height = metrics->fDescent - metrics->fAscent + metrics->fLeading;
176 metrics->fAscent = (metrics->fAscent - metrics->fLeading / 2) * multiplier / height;
177 metrics->fDescent = (metrics->fDescent + metrics->fLeading / 2) * multiplier / height;
178
179 } else {
180 metrics->fAscent = (metrics->fAscent - metrics->fLeading / 2);
181 metrics->fDescent = (metrics->fDescent + metrics->fLeading / 2);
182 }
183 // If we shift the baseline we need to make sure the shifted text fits the line
184 metrics->fAscent += fBaselineShift;
185 metrics->fDescent += fBaselineShift;
186}
@ kSlight
minimal modification to improve constrast
@ kAntiAlias
may have transparent pixels on glyph edges
font
Font Metadata and Metrics.
int32_t height
SkScalar fLeading
distance to add between lines, typically positive or zero
SkScalar fAscent
distance to reserve above baseline, typically negative
SkScalar fDescent
distance to reserve below baseline, typically positive

◆ getFontSize()

SkScalar skia::textlayout::TextStyle::getFontSize ( ) const
inline

Definition at line 249 of file TextStyle.h.

249{ return fFontSize; }

◆ getFontStyle()

SkFontStyle skia::textlayout::TextStyle::getFontStyle ( ) const
inline

Definition at line 227 of file TextStyle.h.

227{ return fFontStyle; }

◆ getForeground()

SkPaint skia::textlayout::TextStyle::getForeground ( ) const
inline

Definition at line 169 of file TextStyle.h.

169 {
170 const SkPaint* paint = std::get_if<SkPaint>(&fForeground);
171 return paint ? *paint : SkPaint();
172 }

◆ getForegroundPaintOrID()

ParagraphPainter::SkPaintOrID skia::textlayout::TextStyle::getForegroundPaintOrID ( ) const
inline

Definition at line 173 of file TextStyle.h.

173 {
174 return fForeground;
175 }

◆ getHalfLeading()

bool skia::textlayout::TextStyle::getHalfLeading ( ) const
inline

Definition at line 267 of file TextStyle.h.

267{ return fHalfLeading; }

◆ getHeight()

SkScalar skia::textlayout::TextStyle::getHeight ( ) const
inline

Definition at line 261 of file TextStyle.h.

261{ return fHeightOverride ? fHeight : 0; }

◆ getHeightOverride()

bool skia::textlayout::TextStyle::getHeightOverride ( ) const
inline

Definition at line 264 of file TextStyle.h.

264{ return fHeightOverride; }

◆ getLetterSpacing()

SkScalar skia::textlayout::TextStyle::getLetterSpacing ( ) const
inline

Definition at line 270 of file TextStyle.h.

270{ return fLetterSpacing; }

◆ getLocale()

SkString skia::textlayout::TextStyle::getLocale ( ) const
inline

Definition at line 279 of file TextStyle.h.

279{ return fLocale; }

◆ getShadowNumber()

size_t skia::textlayout::TextStyle::getShadowNumber ( ) const
inline

Definition at line 231 of file TextStyle.h.

231{ return fTextShadows.size(); }

◆ getShadows()

std::vector< TextShadow > skia::textlayout::TextStyle::getShadows ( ) const
inline

Definition at line 232 of file TextStyle.h.

232{ return fTextShadows; }

◆ getTextBaseline()

TextBaseline skia::textlayout::TextStyle::getTextBaseline ( ) const
inline

Definition at line 282 of file TextStyle.h.

282{ return fTextBaseline; }

◆ getTypeface()

SkTypeface * skia::textlayout::TextStyle::getTypeface ( ) const
inline

Definition at line 275 of file TextStyle.h.

275{ return fTypeface.get(); }
T * get() const
Definition SkRefCnt.h:303

◆ getWordSpacing()

SkScalar skia::textlayout::TextStyle::getWordSpacing ( ) const
inline

Definition at line 273 of file TextStyle.h.

273{ return fWordSpacing; }

◆ hasBackground()

bool skia::textlayout::TextStyle::hasBackground ( ) const
inline

Definition at line 191 of file TextStyle.h.

191{ return fHasBackground; }

◆ hasForeground()

bool skia::textlayout::TextStyle::hasForeground ( ) const
inline

Definition at line 168 of file TextStyle.h.

168{ return fHasForeground; }

◆ isPlaceholder()

bool skia::textlayout::TextStyle::isPlaceholder ( ) const
inline

Definition at line 287 of file TextStyle.h.

287{ return fIsPlaceholder; }

◆ matchOneAttribute()

bool skia::textlayout::TextStyle::matchOneAttribute ( StyleType  styleType,
const TextStyle other 
) const

Definition at line 117 of file TextStyle.cpp.

117 {
118 switch (styleType) {
119 case kForeground:
120 return (!fHasForeground && !other.fHasForeground && fColor == other.fColor) ||
121 ( fHasForeground && other.fHasForeground && fForeground == other.fForeground);
122
123 case kBackground:
124 return (!fHasBackground && !other.fHasBackground) ||
125 ( fHasBackground && other.fHasBackground && fBackground == other.fBackground);
126
127 case kShadow:
128 if (fTextShadows.size() != other.fTextShadows.size()) {
129 return false;
130 }
131
132 for (int32_t i = 0; i < SkToInt(fTextShadows.size()); ++i) {
133 if (fTextShadows[i] != other.fTextShadows[i]) {
134 return false;
135 }
136 }
137 return true;
138
139 case kDecorations:
140 return this->fDecoration == other.fDecoration;
141
142 case kLetterSpacing:
143 return fLetterSpacing == other.fLetterSpacing;
144
145 case kWordSpacing:
146 return fWordSpacing == other.fWordSpacing;
147
148 case kAllAttributes:
149 return this->equals(other);
150
151 case kFont:
152 // TODO: should not we take typefaces in account?
153 return fFontStyle == other.fFontStyle &&
154 fLocale == other.fLocale &&
155 fFontFamilies == other.fFontFamilies &&
156 fFontSize == other.fFontSize &&
157 fHeight == other.fHeight &&
158 fHalfLeading == other.fHalfLeading &&
159 fBaselineShift == other.fBaselineShift &&
160 fFontArguments == other.fFontArguments;
161 default:
162 SkASSERT(false);
163 return false;
164 }
165}
#define SkASSERT(cond)
Definition SkAssert.h:116
constexpr int SkToInt(S x)
Definition SkTo.h:29
bool equals(const TextStyle &other) const
Definition TextStyle.cpp:31

◆ operator=()

TextStyle & skia::textlayout::TextStyle::operator= ( const TextStyle other)
default

◆ operator==()

bool skia::textlayout::TextStyle::operator== ( const TextStyle rhs) const
inline

Definition at line 162 of file TextStyle.h.

162{ return this->equals(rhs); }

◆ refTypeface()

sk_sp< SkTypeface > skia::textlayout::TextStyle::refTypeface ( ) const
inline

Definition at line 276 of file TextStyle.h.

276{ return fTypeface; }

◆ resetFontFeatures()

void skia::textlayout::TextStyle::resetFontFeatures ( )
inline

Definition at line 241 of file TextStyle.h.

241{ fFontFeatures.clear(); }

◆ resetShadows()

void skia::textlayout::TextStyle::resetShadows ( )
inline

Definition at line 234 of file TextStyle.h.

234{ fTextShadows.clear(); }

◆ setBackgroundColor()

void skia::textlayout::TextStyle::setBackgroundColor ( SkPaint  paint)
inline

Definition at line 204 of file TextStyle.h.

204{ setBackgroundPaint(std::move(paint)); }
void setBackgroundPaint(SkPaint paint)
Definition TextStyle.h:199

◆ setBackgroundPaint()

void skia::textlayout::TextStyle::setBackgroundPaint ( SkPaint  paint)
inline

Definition at line 199 of file TextStyle.h.

199 {
200 fHasBackground = true;
201 fBackground = std::move(paint);
202 }

◆ setBackgroundPaintID()

void skia::textlayout::TextStyle::setBackgroundPaintID ( ParagraphPainter::PaintID  paintID)
inline

Definition at line 205 of file TextStyle.h.

205 {
206 fHasBackground = true;
207 fBackground = paintID;
208 }

◆ setBaselineShift()

void skia::textlayout::TextStyle::setBaselineShift ( SkScalar  baselineShift)
inline

Definition at line 258 of file TextStyle.h.

258{ fBaselineShift = baselineShift; }

◆ setColor()

void skia::textlayout::TextStyle::setColor ( SkColor  color)
inline

Definition at line 166 of file TextStyle.h.

166{ fColor = color; }
SkColor4f color

◆ setDecoration()

void skia::textlayout::TextStyle::setDecoration ( TextDecoration  decoration)
inline

Definition at line 220 of file TextStyle.h.

220{ fDecoration.fType = decoration; }

◆ setDecorationColor()

void skia::textlayout::TextStyle::setDecorationColor ( SkColor  color)
inline

Definition at line 223 of file TextStyle.h.

223{ fDecoration.fColor = color; }

◆ setDecorationMode()

void skia::textlayout::TextStyle::setDecorationMode ( TextDecorationMode  mode)
inline

Definition at line 221 of file TextStyle.h.

221{ fDecoration.fMode = mode; }
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition switches.h:228

◆ setDecorationStyle()

void skia::textlayout::TextStyle::setDecorationStyle ( TextDecorationStyle  style)
inline

Definition at line 222 of file TextStyle.h.

222{ fDecoration.fStyle = style; }

◆ setDecorationThicknessMultiplier()

void skia::textlayout::TextStyle::setDecorationThicknessMultiplier ( SkScalar  m)
inline

Definition at line 224 of file TextStyle.h.

◆ setFontArguments()

void skia::textlayout::TextStyle::setFontArguments ( const std::optional< SkFontArguments > &  args)

Definition at line 188 of file TextStyle.cpp.

188 {
189 if (!args) {
190 fFontArguments.reset();
191 return;
192 }
193
194 fFontArguments.emplace(*args);
195}
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ setFontFamilies()

void skia::textlayout::TextStyle::setFontFamilies ( std::vector< SkString families)
inline

Definition at line 253 of file TextStyle.h.

253 {
254 fFontFamilies = std::move(families);
255 }

◆ setFontSize()

void skia::textlayout::TextStyle::setFontSize ( SkScalar  size)
inline

Definition at line 250 of file TextStyle.h.

250{ fFontSize = size; }
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

◆ setFontStyle()

void skia::textlayout::TextStyle::setFontStyle ( SkFontStyle  fontStyle)
inline

Definition at line 228 of file TextStyle.h.

228{ fFontStyle = fontStyle; }

◆ setForegroundColor()

void skia::textlayout::TextStyle::setForegroundColor ( SkPaint  paint)
inline

Definition at line 181 of file TextStyle.h.

181{ setForegroundPaint(std::move(paint)); }
void setForegroundPaint(SkPaint paint)
Definition TextStyle.h:176

◆ setForegroundPaint()

void skia::textlayout::TextStyle::setForegroundPaint ( SkPaint  paint)
inline

Definition at line 176 of file TextStyle.h.

176 {
177 fHasForeground = true;
178 fForeground = std::move(paint);
179 }

◆ setForegroundPaintID()

void skia::textlayout::TextStyle::setForegroundPaintID ( ParagraphPainter::PaintID  paintID)
inline

Definition at line 185 of file TextStyle.h.

185 {
186 fHasForeground = true;
187 fForeground = paintID;
188 }

◆ setHalfLeading()

void skia::textlayout::TextStyle::setHalfLeading ( bool  halfLeading)
inline

Definition at line 266 of file TextStyle.h.

266{ fHalfLeading = halfLeading; }

◆ setHeight()

void skia::textlayout::TextStyle::setHeight ( SkScalar  height)
inline

Definition at line 260 of file TextStyle.h.

260{ fHeight = height; }

◆ setHeightOverride()

void skia::textlayout::TextStyle::setHeightOverride ( bool  heightOverride)
inline

Definition at line 263 of file TextStyle.h.

263{ fHeightOverride = heightOverride; }

◆ setLetterSpacing()

void skia::textlayout::TextStyle::setLetterSpacing ( SkScalar  letterSpacing)
inline

Definition at line 269 of file TextStyle.h.

269{ fLetterSpacing = letterSpacing; }

◆ setLocale()

void skia::textlayout::TextStyle::setLocale ( const SkString locale)
inline

Definition at line 280 of file TextStyle.h.

280{ fLocale = locale; }

◆ setPlaceholder()

void skia::textlayout::TextStyle::setPlaceholder ( )
inline

Definition at line 288 of file TextStyle.h.

288{ fIsPlaceholder = true; }

◆ setTextBaseline()

void skia::textlayout::TextStyle::setTextBaseline ( TextBaseline  baseline)
inline

Definition at line 283 of file TextStyle.h.

283{ fTextBaseline = baseline; }

◆ setTypeface()

void skia::textlayout::TextStyle::setTypeface ( sk_sp< SkTypeface typeface)
inline

Definition at line 277 of file TextStyle.h.

277{ fTypeface = std::move(typeface); }

◆ setWordSpacing()

void skia::textlayout::TextStyle::setWordSpacing ( SkScalar  wordSpacing)
inline

Definition at line 272 of file TextStyle.h.

272{ fWordSpacing = wordSpacing; }

The documentation for this class was generated from the following files: