Merge "Doxygen grouping" into devel/master
[platform/core/uifw/dali-adaptor.git] / text / dali / devel-api / text-abstraction / font-list.h
1 #ifndef __DALI_TEXT_ABSTRACTION_FONT_LIST_H__
2 #define __DALI_TEXT_ABSTRACTION_FONT_LIST_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23 #include <iostream>
24 #include <dali/public-api/common/vector-wrapper.h>
25
26 namespace Dali
27 {
28
29 namespace TextAbstraction
30 {
31 typedef std::string FontPath;
32 typedef std::string FontFamily;
33 typedef std::string FontStyle;
34
35 namespace FontWidth
36 {
37   /**
38    * @brief Enumeration type for the font's width
39    */
40   enum Type
41   {
42     ULTRA_CONDENSED,
43     EXTRA_CONDENSED,
44     CONDENSED,
45     SEMI_CONDENSED,
46     NORMAL,
47     SEMI_EXPANDED,
48     EXPANDED,
49     EXTRA_EXPANDED,
50     ULTRA_EXPANDED,
51   };
52 } // namespace FontWidth
53
54 namespace FontWeight
55 {
56   /**
57    * @brief Enumeration type for the font's weight
58    */
59   enum Type
60   {
61     THIN,
62     ULTRA_LIGHT,
63     EXTRA_LIGHT = ULTRA_LIGHT,
64     LIGHT,
65     DEMI_LIGHT,
66     SEMI_LIGHT = DEMI_LIGHT,
67     BOOK,
68     NORMAL,
69     REGULAR = NORMAL,
70     MEDIUM,
71     DEMI_BOLD,
72     SEMI_BOLD = DEMI_BOLD,
73     BOLD,
74     ULTRA_BOLD,
75     EXTRA_BOLD = ULTRA_BOLD,
76     BLACK,
77     HEAVY = BLACK,
78     EXTRA_BLACK = BLACK
79   };
80 }
81
82 namespace FontSlant
83 {
84   /**
85    * @brief Enumeration type for the font's slant
86    */
87   enum Type
88   {
89     NORMAL,
90     ROMAN = NORMAL,
91     ITALIC,
92     OBLIQUE
93   };
94 } // namespace FontSlant
95
96 struct FontDescription
97 {
98   FontDescription()
99   : path(),
100     family(),
101     width( FontWidth::NORMAL ),
102     weight( FontWeight::NORMAL ),
103     slant( FontSlant::NORMAL )
104   {}
105
106   ~FontDescription()
107   {}
108
109   FontPath         path;   ///< The font's file name path.
110   FontFamily       family; ///< The font's family name.
111   FontWidth::Type  width;  ///< The font's width.
112   FontWeight::Type weight; ///< The font's weight.
113   FontSlant::Type  slant;  ///< The font's slant.
114 };
115
116 typedef std::vector<FontDescription> FontList;
117
118 DALI_IMPORT_API std::ostream& operator<<( std::ostream& o, const FontList& fontList );
119
120 } // namespace TextAbstraction
121
122 } // namespace Dali
123
124 #endif // __DALI_TEXT_ABSTRACTION_FONT_LIST_H__