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;
36 typedef std::vector<FontFamily> FontFamilyList;
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[] =
69 } // namespace FontWidth
74 * @brief Enumeration type for the font's weight
78 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
81 EXTRA_LIGHT = ULTRA_LIGHT,
84 SEMI_LIGHT = DEMI_LIGHT,
90 SEMI_BOLD = DEMI_BOLD,
93 EXTRA_BOLD = ULTRA_BOLD,
99 const char* const Name[] =
113 } // namespace FontWeight
118 * @brief Enumeration type for the font's slant
122 NONE, ///< Means not defined. Will use what is set as default, currently NORMAL.
129 const char* const Name[] =
135 } // namespace FontSlant
137 struct FontDescription
141 INVALID, ///< Not valid font.
142 FACE_FONT, ///< A face font.
143 BITMAP_FONT, ///< A bitmap font. Each glyph has a url with the bitmap.
149 width(FontWidth::NONE),
150 weight(FontWeight::NONE),
151 slant(FontSlant::NONE),
156 FontDescription(const FontPath& path,
157 const FontFamily& family,
158 const FontWidth::Type& width,
159 const FontWeight::Type& weight,
160 const FontSlant::Type& slant,
175 FontPath path; ///< The font's file name path.
176 FontFamily family; ///< The font's family name.
177 FontWidth::Type width; ///< The font's width.
178 FontWeight::Type weight; ///< The font's weight.
179 FontSlant::Type slant; ///< The font's slant.
180 Type type; ///< The type of font.
183 typedef std::vector<FontDescription> FontList;
185 DALI_ADAPTOR_API std::ostream& operator<<(std::ostream& o, const FontList& fontList);
187 } // namespace TextAbstraction
191 #endif // DALI_TEXT_ABSTRACTION_FONT_LIST_H