X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmulti-language-support-impl.h;h=ff5e94d9d0b9cf85195036fddd6c26e4424fb0cf;hp=781aed539657a7bac0502ffb85139c1783476153;hb=3e30971f9884dc48e80ef82de4ef85fc9dba1229;hpb=cdefdbdee1cb3fd4051e220bb185d97b6000a037 diff --git a/dali-toolkit/internal/text/multi-language-support-impl.h b/dali-toolkit/internal/text/multi-language-support-impl.h index 781aed5..ff5e94d 100644 --- a/dali-toolkit/internal/text/multi-language-support-impl.h +++ b/dali-toolkit/internal/text/multi-language-support-impl.h @@ -27,6 +27,12 @@ namespace Dali { +namespace TextAbstraction +{ +//Forward declaration +class FontClient; +} + namespace Toolkit { @@ -61,12 +67,43 @@ struct ValidateFontsPerScript * * @return @e true if the font is in the vector of valid fonts. */ - bool FindValidFont( FontId fontId ) const; + bool IsValidFont( FontId fontId ) const; Vector mValidFonts; }; /** + * @brief Stores default font ids per script. It can be different sizes for a default font family. + */ +struct DefaultFonts +{ + /** + * Default constructor. + */ + DefaultFonts() + : mFonts() + {} + + /** + * Default destructor. + */ + ~DefaultFonts() + {} + + /** + * @brief Finds a default font for the given @p size. + * + * @param[in] fontClient The font client. + * @param[in] size The given size. + * + * @return The font id of a default font for the given @p size. If there isn't any font cached it returns 0. + */ + FontId FindFont( TextAbstraction::FontClient& fontClient, PointSize26Dot6 size ) const; + + Vector mFonts; +}; + +/** * @brief Multi-language support implementation. @see Text::MultilanguageSupport. */ class MultilanguageSupport : public BaseObject @@ -110,7 +147,7 @@ public: Vector& fonts ); private: - Vector mDefaultFontPerScriptCache; ///< Caches the default font for a script. + Vector mDefaultFontPerScriptCache; ///< Caches default fonts for a script. Vector mValidFontsPerScriptCache; ///< Caches valid fonts for a script. };