delegate.OnFontInfoRequested(style, floatTextSize);\r
_ControlManager* pControlManager = _ControlManager::GetInstance();\r
_FontImpl* pFontImpl = _FontImpl::GetInstance(*__pFont);\r
- if (!(__isControlFontChanged || pControlManager->IsDefaultFontChanged())\r
+ if (!(__isControlFontChanged || pControlManager->IsDefaultFontChanged() || pControlManager->IsSystemFontChanged())\r
&& __pFont != null\r
&& ((__pFont->GetSize() == textSize || __pFont->GetSizeF() == floatTextSize))\r
&& (pFontImpl->GetStyle() == static_cast<int>(style)))\r
, __gestureMaxDuration(0)
, __touchedWindow(0)
, __isDefaultFontChanged(false)
+ , __isSystemFontChanged(false)
, __defaultFontName(L"")
, __screenDpi(0)
, __pClipboardOwner(null)
return __defaultFontFileName;
}
bool
-_ControlManager::IsDefaultFontChanged(void)
+_ControlManager::IsDefaultFontChanged(void) const
{
return __isDefaultFontChanged;
}
+bool
+_ControlManager::IsSystemFontChanged(void) const
+{
+ return __isSystemFontChanged;
+}
+
void
_ControlManager::SetDefaultFontChangeState(bool isDefaultFontChanged)
{
if (key == FONT_TYPE || key == LOCALE_COUNTRY || key == LOCALE_LANGUAGE)
{
_FontImpl::UpdateDefaultFont(key);
+ __isSystemFontChanged = true;
+ struct _Visitor
+ : public _Control::Visitor
+ {
+ virtual _Control::VisitType Visit(_Control& control)
+ {
+ control.GetFallbackFont();
+ _IControlDelegate& delegate = control.GetControlDelegate();
+ delegate.OnFontChanged(control.__pFont);
+ return _Control::VISIT_DOWNWARD;
+ }
+ };
+
+ _Visitor visitor;
int count = GetWindowCount();
+ for (int j = 0; j < count; j++)
+ {
+ _Window* pWindow = GetWindow((count-1) - j);
+ pWindow->Accept(visitor);
+ }
+ __isSystemFontChanged = false;
for(int index = 0; index < count ; index++)
{
_Window* pWindow = GetWindow(index);
_LabelPresenter::OnFontChanged(Font* pFont)
{
__pFont = pFont;
-
+ if (__pTextObject)
+ {
+ __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
+ }
return;
}
}
__pTextObject->SetAlignment(horizontalAlign | verticalAlign);
- __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength());
__pTextObject->Compose();
__pTextObject->SetForegroundColor(__pLabel->GetTextColor(), 0, __pTextObject->GetTextLength());
__pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas));
// Font
result SetDefaultFont(const Tizen::Base::String& appFontName);
Tizen::Base::String GetDefaultFont(void);
- bool IsDefaultFontChanged(void);
+ bool IsDefaultFontChanged(void) const;
+ bool IsSystemFontChanged(void) const;
void SetDefaultFontChangeState(bool isDefaultFontChanged);
result SetDefaultFontFromFile(const Tizen::Base::String& fileName);
Tizen::Base::String GetDefaultFontFile(void) const;
Tizen::Base::Collection::IListT<_TouchGestureDetector*>* __pGestureList;
int __gestureMaxDuration;
unsigned int __touchedWindow;
- bool __isDefaultFontChanged;
+ bool __isDefaultFontChanged;
+ bool __isSystemFontChanged;
Tizen::Base::String __defaultFontName;
Tizen::Base::String __defaultFontFileName;
static _ControlManager* __pInstance;