fix: match Chrome's font fallback behavior (#15486)
* fix: match Chrome's font fallback behavior Fixes #15481 * add a cache * add test * another test * fix tests * arial -> dejavu sans on linux apparently?
This commit is contained in:
parent
ca2d74e118
commit
7e0e12b8a3
7 changed files with 264 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "atom/browser/atom_resource_dispatcher_host_delegate.h"
|
||||
#include "atom/browser/atom_speech_recognition_manager_delegate.h"
|
||||
#include "atom/browser/child_web_contents_tracker.h"
|
||||
#include "atom/browser/font_defaults.h"
|
||||
#include "atom/browser/io_thread.h"
|
||||
#include "atom/browser/media/media_capture_devices_dispatcher.h"
|
||||
#include "atom/browser/native_window.h"
|
||||
|
@ -301,6 +302,8 @@ void AtomBrowserClient::OverrideWebkitPrefs(content::RenderViewHost* host,
|
|||
prefs->default_maximum_page_scale_factor = 1.f;
|
||||
prefs->navigate_on_drag_drop = false;
|
||||
|
||||
SetFontDefaults(prefs);
|
||||
|
||||
// Custom preferences of guest page.
|
||||
auto* web_contents = content::WebContents::FromRenderViewHost(host);
|
||||
auto* web_preferences = WebContentsPreferences::From(web_contents);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue