In the admin under typography add a 3 state switch.
GoogleAPI/Coollabs api/ custom
Then in "templates/j51_xxx/inc/fonts.php." pull the state of that switch into a var.
use google api url for google, coollabs api for GPDR and if custom use
$app->getDocument()->addStyleSheet('/templates/j51_xxx/css/local-fonts.css');
so, it would look something like this...
$fontsource = "fonts.googleapis.com"
if $fontsource !== 'local'{
foreach ($googlefonts as $v) { // loop
$app->getDocument()->addStyleSheet('//' . $fontsource . '/css?family=' . $v . ':' . $font_weights . '&&subset=' . $font_subset . '&display=swap');
}
} else {
$app->getDocument()->addStyleSheet('/templates/j51_xxx/css/local-fonts.css');
}