* If font not set through Property system then changing the system font updates the label's font
Signed-off-by: Agnelo Vaz <agnelo.vaz@samsung.com>
Change-Id: If3fa2ddda8fcbc1b5570586fbfd4335c9f577914
case StyleChange::DEFAULT_FONT_CHANGE:
{
DALI_LOG_INFO( gLogFilter, Debug::General, "TextLabel::OnStyleChange StyleChange::DEFAULT_FONT_CHANGE\n");
- if ( mController->GetDefaultFontFamily() == "" )
- {
- // Property system did not set the font so should update it.
- // todo instruct text-controller to update model
- }
+ // Property system did not set the font so should update it.
+ std::string newFont = styleManager.GetDefaultFontFamily();
+ mController->UpdateAfterFontChange( newFont );
break;
}
// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/clipboard.h>
#include <dali/devel-api/text-abstraction/font-client.h>
-#include <iostream>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/layouts/layout-engine.h>
}
mImpl->mFontDefaults->mFontDescription.family = defaultFontFamily;
+ DALI_LOG_INFO( gLogFilter, Debug::General, "Controller::SetDefaultFontFamily %s userDefined: %s\n", defaultFontFamily.c_str(), userDefined ? "true":"false" );
mImpl->mUserDefinedFontFamily = userDefined;
// Clear the font-specific data