[Support request] Could you help adding custom font?

Home Forums Support Could you help adding custom font?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #989049
    Silvio

    Hi, I am trying to add Replica to a new site, but something is not working.

    I have this css

    
    /* Replica Regular */
    @font-face {
      font-family: 'Replica';
      font-style: normal;
      font-weight: 400;
      src: url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Regular.eot'); /* IE9 Compat Modes */
      src: url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
           url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Regular.woff') format('woff'), /* Modern Browsers */
           url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Regular.ttf') format('truetype'), /* Safari, Android, iOS */
    
    /* Replica Light */
    @font-face {
      font-family: 'Replica';
      font-style: light;
      font-weight: 300;
      src: url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Light.eot'); /* IE9 Compat Modes */
      src: url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Light.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
           url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Light.woff') format('woff'), /* Modern Browsers */
           url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Light.ttf') format('truetype'), /* Safari, Android, iOS */
    }
    
    /* Replica Bold */
    @font-face {
      font-family: 'Replica Bold';
      font-style: bold;
      font-weight: 700;
      src: url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Bold.eot'); /* IE9 Compat Modes */
      src: url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
           url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Bold.woff') format('woff'), /* Modern Browsers */
           url('http://staging.picampus.flywheelsites.com/wp-content/themes/generatepress_child/fonts/Replica-Bold.ttf') format('truetype'), /* Safari, Android, iOS */
    }
    

    and this function

    add_filter( 'generate_typography_default_fonts', function( $fonts ) {
        $fonts[] = 'Replica';
        return $fonts;
    } );
    

    I have the Replica font in the customizer, but it’s not rendered.
    To view the site use:

    USR picampusdev
    PWD picampusdev

    Thanks in advance

    #989297
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Looks like you’ve done everything right, but your first @font-face block is missing the closing } character.

    Let me know 🙂

    #989885
    Silvio

    what a shame 🙁

    anyway, I fixed it, but nothing changed.

    #990152
    Tom
    Lead Developer
    Lead Developer

    Very strange. Does it work if you try a different font? I can’t see any issues with the way it’s set up right now.

    #990513
    Silvio

    well, I did’t try, but it’s working on the live website

    #990589
    Tom
    Lead Developer
    Lead Developer

    What’s working on the live site? Replica?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.