• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef ROSEN_TEXT_EXPORT_ROSEN_TEXT_TYPOGRAPHY_TYPES_H
17 #define ROSEN_TEXT_EXPORT_ROSEN_TEXT_TYPOGRAPHY_TYPES_H
18 
19 namespace OHOS {
20 namespace Rosen {
21 enum class TextDirection {
22     RTL,
23     LTR,
24 };
25 
26 enum class TextAlign {
27     LEFT,
28     RIGHT,
29     CENTER,
30     JUSTIFY,
31     START,
32     END,
33 };
34 
35 enum class BreakStrategy {
36     GREEDY = 0,
37     HIGH_QUALITY = 1,
38     BALANCED = 2
39 };
40 
41 enum class WordBreakType {
42     NORMAL = 0,
43     BREAK_ALL = 1,
44     BREAK_WORD = 2
45 };
46 
47 enum TextDecoration {
48     NONE = 0x0,
49     UNDERLINE = 0x1,
50     OVERLINE = 0x2,
51     LINE_THROUGH = 0x4,
52 };
53 
54 enum class TextDecorationStyle {
55     SOLID,
56     DOUBLE,
57     DOTTED,
58     DASHED,
59     WAVY,
60 };
61 
62 enum class FontWeight {
63     W100, // thin
64     W200,
65     W300,
66     W400, // normal
67     W500,
68     W600,
69     W700, // bold
70     W800,
71     W900,
72 };
73 
74 enum class FontStyle {
75     NORMAL,
76     ITALIC,
77 };
78 
79 enum class TextBaseline {
80     ALPHABETIC,
81     IDEOGRAPHIC,
82 };
83 
84 enum class EllipsisModal {
85     HEAD = 0,
86     MIDDLE = 1,
87     TAIL = 2,
88 };
89 } // namespace Rosen
90 } // namespace OHOS
91 
92 #endif // ROSEN_TEXT_EXPORT_ROSEN_TEXT_TYPOGRAPHY_TYPES_H
93