setFontFamilies method

Future<void> setFontFamilies(
  1. FontFamilies fontFamilies, {
  2. List<ScriptFontFamilies>? forScripts,
})

Set generic font families. fontFamilies Specifies font families to set. If a font family is not specified, it won't be changed. forScripts Specifies font families to set for individual scripts.

Implementation

Future<void> setFontFamilies(FontFamilies fontFamilies,
    {List<ScriptFontFamilies>? forScripts}) async {
  await _client.send('Page.setFontFamilies', {
    'fontFamilies': fontFamilies,
    if (forScripts != null) 'forScripts': [...forScripts],
  });
}