X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Ftext%2Fbitmap-font.h;h=33b9775486549bfa78732bdfdb053878ebb971d7;hb=cb2229846d61445fdaff58fd5521dc3fb36e7676;hp=ca068b440e93360945f4efa2f32ff3b6ef59489c;hpb=6e1032b5996011523338aa4bc5cdbeffcfc71ad5;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/text/bitmap-font.h b/dali-toolkit/devel-api/text/bitmap-font.h old mode 100755 new mode 100644 index ca068b4..33b9775 --- a/dali-toolkit/devel-api/text/bitmap-font.h +++ b/dali-toolkit/devel-api/text/bitmap-font.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_FONT_BITMAP_DEVEL_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,25 +19,22 @@ */ // EXTERNAL INCLUDES -#include #include +#include #include namespace Dali { - namespace TextAbstraction { // Forward declarations struct BitmapFont; -} +} // namespace TextAbstraction namespace Toolkit { - namespace DevelText { - /** * @brief Struct that stores the needed info to create a bitmap glyph. */ @@ -52,14 +49,26 @@ struct DALI_TOOLKIT_API Glyph Glyph(); /** + * @brief Constructor. + * + * Initialize the members with the given values. + * + * @param[in] url The url of the bitmap for that glyph. + * @param[in] utf8 The utf8 codification of the glyph. + * @param[in] ascender The ascender of the glyph. + * @param[in] descender The descender of the glyph. + */ + Glyph(const std::string& url, const std::string utf8, float ascender, float descender); + + /** * @brief Default destructor. */ ~Glyph(); - std::string url; ///< The url of the glyph. - std::string utf8; ///< the glyph encoded in utf8 - float ascender; ///< The ascender. The distance from the base line to the top of the glyph. - float descender; ///< The descender. The distance from the base line to the bottom of the glyph. + std::string url; ///< The url of the glyph. + uint8_t utf8[4]; ///< the glyph encoded in utf8 + float ascender; ///< The ascender. The distance from the base line to the top of the glyph. + float descender; ///< The descender. The distance from the base line to the bottom of the glyph. }; /** @@ -79,10 +88,11 @@ struct DALI_TOOLKIT_API BitmapFontDescription */ ~BitmapFontDescription(); - std::vector glyphs; ///< Vector of glyphs. - std::string name; ///< Name of the font. - float underlinePosition; ///< The position of the underline from the base line. - float underlineThickness; ///< The thickness of the underline. + std::vector glyphs; ///< Vector of glyphs. + std::string name; ///< Name of the font. + float underlinePosition; ///< The position of the underline from the base line. + float underlineThickness; ///< The thickness of the underline. + bool isColorFont : 1; ///< Whether the glyphs of this font have their own colors. }; /** @@ -96,7 +106,7 @@ struct DALI_TOOLKIT_API BitmapFontDescription * * @note If the @e ascender and @e descender of the glyphs are zero, the @e descender value will be left as zero and all the bitmaps will be loaded to find out the @e ascender value. */ -DALI_TOOLKIT_API void CreateBitmapFont( const BitmapFontDescription& description, TextAbstraction::BitmapFont& bitmapFont ); +DALI_TOOLKIT_API void CreateBitmapFont(const BitmapFontDescription& description, TextAbstraction::BitmapFont& bitmapFont); } // namespace DevelText