1 #ifndef __DALI_TEXT_ABSTRACTION_GLYPH_INFO_H__
2 #define __DALI_TEXT_ABSTRACTION_GLYPH_INFO_H__
5 * Copyright (c) 2018 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/dali-adaptor-common.h>
23 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
28 namespace TextAbstraction
32 * The information describing a glyph (font ID, index, metrics)
33 * The metrics are in pixels.
35 struct DALI_ADAPTOR_API GlyphInfo
38 * @brief Default constructor.
43 * @brief Creates the GlyphInfo without metrics.
45 GlyphInfo( FontId font, GlyphIndex i );
47 FontId fontId; ///< Identifies the font containing the glyph
48 GlyphIndex index; ///< Uniquely identifies a glyph for a given FontId
49 float width; ///< The width of the glyph
50 float height; ///< The height of the glyph
51 float xBearing; ///< The distance from the cursor position to the leftmost border of the glyph
52 float yBearing; ///< The distance from the baseline to the topmost border of the glyph
53 float advance; ///< The distance to move the cursor for this glyph
54 float scaleFactor; ///< The scaling applied (fixed-size fonts only)
61 #endif //__DALI_TEXT_ABSTRACTION_GLYPH_INFO_H__