Change-Id: I324205cd9638588139e2687f65b691e9d7651c41
{
if( 0u == mPreferredFonts.Count() )
{
{
if( 0u == mPreferredFonts.Count() )
{
- CreatePreferedFontList();
+ StyledFontFamily tizenFont( DEFAULT_FONT_FAMILY_NAME, DEFAULT_FONT_STYLE );
+ CreatePreferedFontList( tizenFont );
}
// Cycle through the preferred list of fonts on the system for 'Tizen'.
}
// Cycle through the preferred list of fonts on the system for 'Tizen'.
void FontController::SetDefaultFontFamily( const StyledFontFamily& styledFontFamily )
{
void FontController::SetDefaultFontFamily( const StyledFontFamily& styledFontFamily )
{
- // reload font configuration files
- const bool ok = FcInitReinitialize();
- DALI_ASSERT_ALWAYS( ok && "FcInitReinitialize failed");
-
- CreatePreferedFontList();
+ CreatePreferedFontList(styledFontFamily);
}
void FontController::AddCachedFont( const StyledFontFamily& styledFontFamily, const std::string& fontPath, _FcCharSet *characterSet )
}
void FontController::AddCachedFont( const StyledFontFamily& styledFontFamily, const std::string& fontPath, _FcCharSet *characterSet )
return NULL_STYLED_FONT_FAMILY;
}
return NULL_STYLED_FONT_FAMILY;
}
-void FontController::CreatePreferedFontList( )
+void FontController::CreatePreferedFontList( const StyledFontFamily& styledFontFamily )
- StyledFontFamily tizenFont;
- tizenFont.first = DEFAULT_FONT_FAMILY_NAME;
- tizenFont.second = DEFAULT_FONT_STYLE;
-
// clear the current list
ClearPreferredFontList();
// clear the current list
ClearPreferredFontList();
- FcPattern* searchPattern = CreateFontFamilyPattern( tizenFont );
+ FcPattern* searchPattern = CreateFontFamilyPattern( styledFontFamily );
FcResult result(FcResultMatch);
FcResult result(FcResultMatch);
/**
* Create a preferred list of fonts to use for when GetFontFamilyForChars() is called.
/**
* Create a preferred list of fonts to use for when GetFontFamilyForChars() is called.
+ * @param[in] styledFontFamily The name of the font's family and the font's style.
- void CreatePreferedFontList();
+ void CreatePreferedFontList( const StyledFontFamily& styleFontFamily );
/**
* Deletes all preferred fonts.
/**
* Deletes all preferred fonts.