/* 
 Theme Name:   Hello Elementor Child
 Theme URI:    
 Description:  
 Author:       ssplawdmin
 Author URI:   https://development1.spp.law
 Template:     hello-elementor
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 /* == Add your own styles below this line ==
--------------------------------------------*/


/**
 * Manrope
 */
function register_local_fonts() {
    wp_register_style( 'manrope-local-font', false );
    wp_enqueue_style( 'manrope-local-font' );

    $base = content_url( '/uploads/fonts/' );

    $weights = array(
        'ExtraLight' => 200,
        'Light'      => 300,
        'Regular'    => 400,
        'Medium'     => 500,
        'SemiBold'   => 600,
        'Bold'       => 700,
        'ExtraBold'  => 800,
    );

    $font_css = '';
    foreach ( $weights as $label => $weight ) {
        $font_css .= "
            @font-face {
                font-family: 'Manrope';
                src: url('{$base}Manrope-{$label}.woff2') format('woff2');
                font-weight: {$weight};
                font-style: normal;
                font-display: swap;
            }
        ";
    }

    wp_add_inline_style( 'manrope-local-font', $font_css );
}
add_action( 'wp_enqueue_scripts', 'register_local_fonts' );