X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Ftext%2Ftext-abstraction%2Ffont-client-impl.h;h=def0799469f8541c30252a2136274576b6df6516;hb=468193cb7df6a8ab691bfa841fd9e0af1d26ecd2;hp=0bbba30e3f980f103551e75595dcf41318d8bafe;hpb=95d52d6c221703c2797513afb71283bec47e0c83;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/text/text-abstraction/font-client-impl.h b/dali/internal/text/text-abstraction/font-client-impl.h old mode 100644 new mode 100755 index 0bbba30..def0799 --- a/dali/internal/text/text-abstraction/font-client-impl.h +++ b/dali/internal/text/text-abstraction/font-client-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_TEXT_ABSTRACTION_FONT_CLIENT_IMPL_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -24,6 +24,9 @@ // INTERNAL INCLUDES #include + +struct FT_FaceRec_; + namespace Dali { @@ -56,6 +59,18 @@ public: static Dali::TextAbstraction::FontClient Get(); /** + * @brief This is used to improve application launch performance + * + * @return A pre-initialized FontClient + */ + static Dali::TextAbstraction::FontClient PreInitialize(); + + /** + * @copydoc Dali::TextAbstraction::FontClient::ClearCache() + */ + void ClearCache(); + + /** * @copydoc Dali::TextAbstraction::FontClient::SetDpi() */ void SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi ); @@ -133,6 +148,11 @@ public: FaceIndex faceIndex ); /** + * @copydoc Dali::TextAbstraction::FontClient::GetFontId( const BitmapFont& bitmapFont ) + */ + FontId GetFontId( const BitmapFont& bitmapFont ); + + /** * @copydoc Dali::TextAbstraction::FontClient::IsScalable( const FontPath& path ) */ bool IsScalable( const FontPath& path ); @@ -154,6 +174,11 @@ public: Dali::Vector< PointSize26Dot6 >& sizes ); /** + * @copydoc Dali::TextAbstraction::FontClient::HasItalicStyle() + */ + bool HasItalicStyle( FontId fontId ) const; + + /** * @copydoc Dali::TextAbstraction::FontClient::GetFontMetrics() */ void GetFontMetrics( FontId fontId, FontMetrics& metrics ); @@ -169,9 +194,9 @@ public: bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal ); /** - * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool softwareItalic, bool softwareBold, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ) + * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ) */ - void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool softwareItalic, bool softwareBold, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ); + void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool isItalicRequired, bool isBoldRequired, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ); /** * @copydoc Dali::TextAbstraction::FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth ) @@ -193,6 +218,34 @@ public: */ bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex ); + /** + * @copydoc Dali::TextAbstraction::FontClient::CreateEmbeddedItem() + */ + GlyphIndex CreateEmbeddedItem( const TextAbstraction::FontClient::EmbeddedItemDescription& description, Pixel::Format& pixelFormat ); + + /** + * @brief Retrieves the pointer to the FreeType Font Face for the given @p fontId. + * + * @param[in] fontId The font id. + * + * @return The pointer to the FreeType Font Face. + */ + FT_FaceRec_* GetFreetypeFace( FontId fontId ); + + /** + * @brief Retrieves the type of font. + * + * @param[in] fontId The font id. + * + * @return FACE_FONT if the font has been loaded by FreeType, BITMAP_FONT if it's a font that has been loaded from images or INVALID if it's a non valid font. + */ + FontDescription::Type GetFontType( FontId fontId ); + + /** + * @copydoc Dali::TextAbstraction::FontClient::AddCustomFontDirectory() + */ + bool AddCustomFontDirectory( const FontPath& path ); + private: /** @@ -215,6 +268,8 @@ private: unsigned int mDpiHorizontal; unsigned int mDpiVertical; + static Dali::TextAbstraction::FontClient gPreInitializedFontClient; + }; // class FontClient } // namespace Internal