electron/shell/browser/font_defaults.h
trop[bot] 463031b771
fix: resolve font list in default prefernce values (#45918)
* fix: resolve font list in default prefernce values

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* chore: fix unsafe buffer usage

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* docs: add code comment

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-03-07 16:24:09 +01:00

26 lines
885 B
C++

// Copyright (c) 2018 Slack Technologies, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_
#define ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_
namespace blink {
namespace web_pref {
struct WebPreferences;
} // namespace web_pref
} // namespace blink
namespace electron {
// Set the default font preferences. The functionality is copied from
// chrome/browser/prefs_tab_helper.cc with modifications to work
// without a preference service and cache chrome/browser/font_family_cache.cc
// that persists across app sessions.
// Keep the core logic in sync to avoid performance regressions
// Refs https://issues.chromium.org/issues/400473071
void SetFontDefaults(blink::web_pref::WebPreferences* prefs);
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_