mirror of
https://github.com/electron/electron.git
synced 2026-01-11 00:18:02 -05:00
feat: Allow customizing the default math font (#38514)
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
* `monospace` string (optional) - Defaults to `Courier New`.
|
||||
* `cursive` string (optional) - Defaults to `Script`.
|
||||
* `fantasy` string (optional) - Defaults to `Impact`.
|
||||
* `math` string (optional) - Defaults to `Latin Modern Math`.
|
||||
* `defaultFontSize` Integer (optional) - Defaults to `16`.
|
||||
* `defaultMonospaceFontSize` Integer (optional) - Defaults to `13`.
|
||||
* `minimumFontSize` Integer (optional) - Defaults to `0`.
|
||||
|
||||
@@ -450,6 +450,10 @@ void WebContentsPreferences::OverrideWebkitPrefs(
|
||||
iter != default_font_family_.end())
|
||||
prefs->fantasy_font_family_map[blink::web_pref::kCommonScript] =
|
||||
iter->second;
|
||||
if (auto iter = default_font_family_.find("math");
|
||||
iter != default_font_family_.end())
|
||||
prefs->math_font_family_map[blink::web_pref::kCommonScript] =
|
||||
iter->second;
|
||||
}
|
||||
|
||||
if (default_font_size_)
|
||||
|
||||
Reference in New Issue
Block a user