Okay
  Public Ticket #2973619
Self hosted variable font use
Closed

Comments

  •  4
    Zenako started the conversation

    Hi Guys, is there a way I can get variable fonts to correctly be used in Salient (Ideally so I can go and make changes within the Salient dashboard typography area).

    I tried using this example as shown in MDN

    In Salient Dashboard Settings > CSS/Script Related I have this in 'Custom CSS Code'

    @font-face {
        font-family: 'manrope';
        src: url('/wp-content/themes/salient-child/fonts/manrope.woff2') format('woff2-variatons');
        font-weight: 400 600;
        font-style: normal;
    }

    In functions I have:

    // Add custom fonts
    function salient_redux_custom_fonts() {
        return array(
            'Custom Fonts' => array(
                'manrope' => 'manrope'
            )
        );
    }
    add_filter( "redux/salient_redux/field/typography/custom_fonts", "salient_redux_custom_fonts" );

    When I use this method with individual standard .woff2 font it works fine

    Cheers

  •  1,877
    Judith replied

    Hi Zenako,

    Thanks for keeping in touch.

    Please allow me to escalate this to the developer to check it out further.

    Thanks.