Added needed to support to control the font setting for browser.
Reference: https://review.tizen.org/gerrit/c/277844
Change-Id: I051d586183dadfa928f97415dfb246e4b32b361a
Signed-off-by: Bakka Uday Kiran <b.kiran@samsung.com>
FontCache& operator=(const FontCache&) = delete;
~FontCache();
+#if BUILDFLAG(IS_EFL)
+ void SetFontFamilyTizenBrowser() { tizen_browser_font_family = true; }
+ bool IsFontFamilyTizenBrowser() const { return tizen_browser_font_family; }
+#endif
+
private:
// BCP47 list used when requesting fallback font for a character.
// inlineCapacity is set to 4: the array vector not need to hold more than 4
void PurgePlatformFontDataCache();
void PurgeFallbackListShaperCache();
+#if BUILDFLAG(IS_EFL)
+ bool tizen_browser_font_family = false;
+#endif
+
friend class SimpleFontData; // For fontDataFromFontPlatformData
friend class FontFallbackList;
friend class FontPlatformDataCache;
#include "third_party/skia/include/core/SkFontMgr.h"
#include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/core/SkTypeface.h"
+#if BUILDFLAG(IS_TIZEN)
+#include "tizen_src/chromium_impl/tizen/system_info.h"
+#endif
namespace blink {
}
#endif // BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_TIZEN)
+ if (IsMobileProfile() && Get().IsFontFamilyTizenBrowser())
+ name = "SamsungOneUI";
+ else if (!name.length() || (DeprecatedEqualIgnoringCase(
+ String(name.data()), "standardFontFamily")))
+ name = "Tizen";
+#endif
+
#if BUILDFLAG(IS_WIN)
// TODO(vmpstr): Deal with paint typeface here.
if (sideloaded_fonts_) {
void EWebView::SetBrowserFont() {
#if !defined(EWK_BRINGUP) // FIXME: m94 bringup
RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
- if (render_view_host)
- render_view_host->Send(
- new EwkViewMsg_SetBrowserFont(render_view_host->GetRoutingID()));
+ if (render_view_host) {
+ IPC::Message* message =
+ new EwkViewMsg_SetBrowserFont(render_view_host->GetRoutingID());
+
+ if (render_view_host->IsRenderViewLive())
+ render_view_host->Send(message);
+ else
+ delayed_messages_.push_back(message);
+ }
#endif
}
Eina_Bool ewk_settings_use_system_font_set(Ewk_Settings* settings, Eina_Bool use)
{
- LOG_EWK_API_MOCKUP();
- return false;
+ if (IsMobileProfile()) {
+ EWebView* impl = EWebView::FromEvasObject(settings->getEvasObject());
+ if (impl) {
+ if (use)
+ impl->UseSettingsFont();
+ else
+ impl->SetBrowserFont();
+ return EINA_TRUE;
+ }
+ }
+ return EINA_FALSE;
}
Eina_Bool ewk_settings_use_system_font_get(Ewk_Settings* settings)