How to make the choice of font in the WP theme?

Good afternoon.

Did a standard setting in Customizer
$wp_customize->add_setting( 'sky_typography_font_family', array(
 'default' => 'roboto',
 'sanitize_callback' => 'sky_sanitize_select',
 ) );

 $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'sky_typography_font_family', array(
 'label' => esc_html__('Font Family', 'sky'),
 'section' => 'sky_typography_body',
 'settings' => 'sky_typography_font_family',
 'priority' => 10,
 'type' => 'select',
 'choices' => array(
 'roboto' => esc_html( 'Roboto', 'sky' ),
 'open-sans' => esc_html( 'Open Sans', 'sky' ),
)
 ) ) );

How to make when choosing Roboto was polucilasi link to the Google Roboto font, if you change to Open Sans, then connect the link to Open Sans.

Tried using font-family: '', sans-serif; } but it displays the keys and not the values and the font is not applied.

Tell me, how do you implement?
March 23rd 20 at 18:56
0 answer

Find more questions by tags WordPress