Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #228750

    VGonzaloMartinez
    Participant

    I need to use Helvetica, Helvetica Light, and Helvetica Neue fonts, how can I use the these fonts as these are not available from the google’s font library? It is important to maintain continuity with our existing complain identity guidelines.

    #228919

    Rue Nel
    Moderator

    Hello There,

    Thanks for posting in!

    You can use Helvetica by uploading your helvetica font in your x theme fonts, wp-content/themes/x-child/fonts/ folder. You need to have the font files in the theme so that it will properly display the font in ordinary user who doesn’t have Helvetica font installed in his computer. You might want to check out this article about helvetica, http://stackoverflow.com/a/12070373

    We highly recommend that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please add the code like the example below in your child theme’s style.css

    @font-face {
      	font-family: 'Helvetica';
      	src: url('fonts/Helvetica/Helvetica.eot');
    	  src: url('fonts/Helvetica/Helvetica.eot?#iefix') format('embedded-opentype'),
           url('fonts/Helvetica/Helvetica.woff2') format('woff2'),
           url('fonts/Helvetica/Helvetica.woff') format('woff'),
           url('fonts/Helvetica/Helvetica.ttf') format('truetype'),
           url('fonts/Helvetica/Helvetica.svg#wf') format('svg');
    }
    
    body {
       font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 
       font-weight: 300;
    }

    The actual code might change depending on the font names and font directory path you might have.

    Please let us know how it goes.

    Cheers,
    X