Support cursive/fantasy default font families

This commit is contained in:
Kevin Sawicki 2016-12-28 10:29:55 -08:00
parent bc39964ece
commit 5d505f9139
2 changed files with 6 additions and 0 deletions

View file

@ -251,6 +251,10 @@ void WebContentsPreferences::OverrideWebkitPrefs(
prefs->sans_serif_font_family_map[content::kCommonScript] = font;
if (fonts->GetString("monospace", &font))
prefs->fixed_font_family_map[content::kCommonScript] = font;
if (fonts->GetString("cursive", &font))
prefs->cursive_font_family_map[content::kCommonScript] = font;
if (fonts->GetString("fantasy", &font))
prefs->fantasy_font_family_map[content::kCommonScript] = font;
}
int size;
if (self->web_preferences_.GetInteger("defaultFontSize", &size))

View file

@ -269,6 +269,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `serif` String (optional) - Defaults to `Times New Roman`.
* `sansSerif` String (optional) - Defaults to `Arial`.
* `monospace` String (optional) - Defaults to `Courier New`.
* `cursive` String (optional) - Defaults to `Script`.
* `fantasy` String (optional) - Defaults to `Impact`.
* `defaultFontSize` Integer (optional) - Defaults to `16`.
* `defaultMonospaceFontSize` Integer (optional) - Defaults to `13`.
* `minimumFontSize` Integer (optional) - Defaults to `0`.