return *this;
}
+void FontClient::ClearCache()
+{
+ GetImplementation(*this).ClearCache();
+}
+
void FontClient::SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi )
{
GetImplementation(*this).SetDpi( horizontalDpi, verticalDpi );
////////////////////////////////////////
/**
+ * @brief Clear all caches in FontClient
+ *
+ */
+ void ClearCache();
+
+ /**
* @brief Set the DPI of the target window.
*
* @note Multiple windows are not currently supported.
return fontClientHandle;
}
+void FontClient::ClearCache()
+{
+ if( mPlugin )
+ {
+ mPlugin->ClearCache();
+ }
+}
+
+
void FontClient::SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi )
{
mDpiHorizontal = horizontalDpi;
static Dali::TextAbstraction::FontClient Get();
/**
+ * @copydoc Dali::TextAbstraction::FontClient::ClearCache()
+ */
+ void ClearCache();
+
+ /**
* @copydoc Dali::TextAbstraction::FontClient::SetDpi()
*/
void SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi );
// INTERNAL INCLUDES
#include <dali/devel-api/text-abstraction/font-list.h>
+
#include <dali/public-api/common/dali-vector.h>
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/integration-api/debug.h>
} // namespace
+
+
using Dali::Vector;
namespace Dali
#ifdef ENABLE_VECTOR_BASED_TEXT_RENDERING
mVectorFontCache = new VectorFontCache( mFreeTypeLibrary );
#endif
+
}
FontClient::Plugin::~Plugin()
FT_Done_FreeType( mFreeTypeLibrary );
}
+void FontClient::Plugin::ClearCache()
+{
+ mFontCache.clear();
+ mValidatedFontCache.clear();
+ mFontDescriptionCache.clear();
+ mFontDescriptionCache.resize( 1u );
+
+ mCharacterSetCache.Clear();
+ mCharacterSetCache.Resize( 1u );
+
+ mFontIdCache.clear();
+ mFallbackCache.clear();
+
+#ifdef ENABLE_VECTOR_BASED_TEXT_RENDERING
+ if(mVectorFontCache)
+ {
+ mVectorFontCache.clear();
+ mVectorFontCache = NULL;
+ }
+#endif
+
+ mEllipsisCache.Clear();
+ mSystemFonts.clear();
+ mDefaultFonts.clear();
+ mDefaultFontDescriptionCached = false;
+ mDefaultFontCharacterSets.Clear();
+ mDefaultFontDescription = FontDescription();
+}
+
void FontClient::Plugin::SetDpi( unsigned int horizontalDpi,
unsigned int verticalDpi )
{
~Plugin();
/**
+ * @copydoc Dali::TextAbstraction::FontClient::ClearCache()
+ */
+ void ClearCache();
+
+ /**
* @copydoc Dali::TextAbstraction::FontClient::SetDpi()
*/
void SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi );
std::istringstream stringStream( currentLocale );
std::string localeString;
- std::getline(stringStream, localeString, '_');
+ std::getline(stringStream, localeString, '.');
hb_buffer_set_language( harfBuzzBuffer, hb_language_from_string( localeString.c_str(), localeString.size() ) );
/* Layout the text */
hb_glyph_info_t* glyphInfo = hb_buffer_get_glyph_infos( harfBuzzBuffer, &glyphCount );
hb_glyph_position_t *glyphPositions = hb_buffer_get_glyph_positions( harfBuzzBuffer, &glyphCount );
const GlyphIndex lastGlyphIndex = glyphCount - 1u;
+
for( GlyphIndex i = 0u; i < glyphCount; )
{
if( rtlDirection )