When adding a Google font to your WordPress website, using the enqueue function allows you to load multiple font weights without making a separate call for each one. This is more efficient than using @import in CSS.
function em_add_google_fonts() {
if (!is_admin()) {
wp_register_style('google', 'https://fonts.googleapis.com/css?family=Roboto:300,400,700', array(), null, 'all');
wp_enqueue_style('google');
}
}
add_action('wp_enqueue_scripts', 'em_add_google_fonts');