Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
paragraph_style.cc
Go to the documentation of this file.
1/*
2 * Copyright 2017 Google, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "paragraph_style.h"
18
19#include <vector>
20
21namespace txt {
22
26 result.font_style = font_style;
27 result.font_families = std::vector<std::string>({font_family});
28 if (font_size >= 0) {
29 result.font_size = font_size;
30 }
31 result.locale = locale;
32 result.height = height;
33 result.has_height_override = has_height_override;
34 return result;
35}
36
38 return max_lines == std::numeric_limits<size_t>::max();
39};
40
42 return !ellipsis.empty();
43}
44
56
57} // namespace txt
std::u16string ellipsis
TextDirection text_direction
TextStyle GetTextStyle() const
TextAlign effective_align() const
bool unlimited_lines() const
FontWeight font_weight
Definition text_style.h:46
GAsyncResult * result