1 #ifndef DALI_TEXT_ABSTRACTION_FONT_LIST_H
2 #define DALI_TEXT_ABSTRACTION_FONT_LIST_H
5 * Copyright (c) 2022 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.
22 #include <dali/public-api/common/vector-wrapper.h>
27 #include <dali/public-api/dali-adaptor-common.h>
31 namespace TextAbstraction
33 typedef std::string FontPath;
34 typedef std::string FontFamily;
35 typedef std::string FontStyle;
40 * @brief Enumeration type for the font's width
44 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
56 const char* const Name[] =
68 } // namespace FontWidth
73 * @brief Enumeration type for the font's weight
77 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
80 EXTRA_LIGHT = ULTRA_LIGHT,
83 SEMI_LIGHT = DEMI_LIGHT,
89 SEMI_BOLD = DEMI_BOLD,
92 EXTRA_BOLD = ULTRA_BOLD,
98 const char* const Name[] =
112 } // namespace FontWeight
117 * @brief Enumeration type for the font's slant
121 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
128 const char* const Name[] =
134 } // namespace FontSlant
136 struct FontDescription
140 INVALID, ///< Not valid font.
141 FACE_FONT, ///< A face font.
142 BITMAP_FONT, ///< A bitmap font. Each glyph has a url with the bitmap.
148 width(FontWidth::NONE),
149 weight(FontWeight::NONE),
150 slant(FontSlant::NONE),
155 FontDescription(const FontPath& path,
156 const FontFamily& family,
157 const FontWidth::Type& width,
158 const FontWeight::Type& weight,
159 const FontSlant::Type& slant,
174 FontPath path; ///< The font's file name path.
175 FontFamily family; ///< The font's family name.
176 FontWidth::Type width; ///< The font's width.
177 FontWeight::Type weight; ///< The font's weight.
178 FontSlant::Type slant; ///< The font's slant.
179 Type type; ///< The type of font.
182 typedef std::vector<FontDescription> FontList;
184 DALI_ADAPTOR_API std::ostream& operator<<(std::ostream& o, const FontList& fontList);
186 } // namespace TextAbstraction
190 #endif // DALI_TEXT_ABSTRACTION_FONT_LIST_H