Flutter Engine
 
Loading...
Searching...
No Matches
paragraph_style.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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#include "paragraph_style.h"
6
7#include <vector>
8
9namespace txt {
10
12 TextStyle result;
13 result.font_weight = font_weight;
14 result.font_style = font_style;
15 result.font_families = std::vector<std::string>({font_family});
16 if (font_size >= 0) {
17 result.font_size = font_size;
18 }
19 result.locale = locale;
20 result.height = height;
22 return result;
23}
24
26 return max_lines == std::numeric_limits<size_t>::max();
27};
28
30 return !ellipsis.empty();
31}
32
44
45} // namespace txt
std::u16string ellipsis
TextDirection text_direction
TextStyle GetTextStyle() const
TextAlign effective_align() const
bool unlimited_lines() const
std::vector< std::string > font_families
Definition text_style.h:40
FontStyle font_style
Definition text_style.h:35
bool has_height_override
Definition text_style.h:45
double font_size
Definition text_style.h:41
std::string locale
Definition text_style.h:46