feat: Allow customizing the default math font (#38514)
This commit is contained in:
parent
5c1321b20a
commit
28332c94bf
2 changed files with 5 additions and 0 deletions
|
@ -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_)
|
||||
|
|
Loading…
Reference in a new issue