1 #ifndef DALI_TEXT_ABSTRACTION_FONT_LIST_H
2 #define DALI_TEXT_ABSTRACTION_FONT_LIST_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 #include <dali/public-api/common/vector-wrapper.h>
27 #include <dali/public-api/dali-adaptor-common.h>
32 namespace TextAbstraction
34 typedef std::string FontPath;
35 typedef std::string FontFamily;
36 typedef std::string FontStyle;
41 * @brief Enumeration type for the font's width
45 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
57 const char* const Name[] =
70 } // namespace FontWidth
75 * @brief Enumeration type for the font's weight
79 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
82 EXTRA_LIGHT = ULTRA_LIGHT,
85 SEMI_LIGHT = DEMI_LIGHT,
91 SEMI_BOLD = DEMI_BOLD,
94 EXTRA_BOLD = ULTRA_BOLD,
100 const char* const Name[] =
120 * @brief Enumeration type for the font's slant
124 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
131 const char* const Name[] =
138 } // namespace FontSlant
140 struct FontDescription
144 INVALID, ///< Not valid font.
145 FACE_FONT, ///< A face font.
146 BITMAP_FONT, ///< A bitmap font. Each glyph has a url with the bitmap.
152 width( FontWidth::NONE ),
153 weight( FontWeight::NONE ),
154 slant( FontSlant::NONE ),
161 FontPath path; ///< The font's file name path.
162 FontFamily family; ///< The font's family name.
163 FontWidth::Type width; ///< The font's width.
164 FontWeight::Type weight; ///< The font's weight.
165 FontSlant::Type slant; ///< The font's slant.
166 Type type; ///< The type of font.
169 typedef std::vector<FontDescription> FontList;
171 DALI_ADAPTOR_API std::ostream& operator<<( std::ostream& o, const FontList& fontList );
173 } // namespace TextAbstraction
177 #endif // DALI_TEXT_ABSTRACTION_FONT_LIST_H