Viewing 1 replies (of 1 total)
  • Hello @theregoesjb

    It depends upon how you want to use font whether using google api or any custom font.
    If you want to use google API go to this link https://fonts.google.com/ select any font and you will see a popup window at bottom of page where you can see the embeded code
    Eg: Suppose you have selected opensans then embed this code into the <head> of your HTML document.

    <link href=”https://fonts.googleapis.com/css?family=Open+Sans&#8221; rel=”stylesheet”>

    Specify in CSS

    Use the following CSS rules to specify these families in your style.css file:

    ‘.h1 site-title {
    font-family: ‘Open Sans’, Arial, sans-serif;
    }’

    /**************************************************/
    And you want to use font manually Here’s the most basic example which you place at the start of your child themes style.css file:

    @font-face {
        font-family: Adobe Garamond Pro, Lato;  
        src: url(public_html/your-site/wp-content/themes/your-theme/fonts/FontName-Regular.ttf);  
        font-weight: normal;  
    }

    Don’t forget to replace the font name with the one you uploaded and update the code to reflect the correct the file path.

    Add the same CSS code additional times to define bold, italicized, header text and the like, keeping sure you update the file name and path to reflect the purpose of the font.

    Finally, define where your font will be used with some more CSS, such as in the example below:

    .site-title {
    font-family: Adobe Garamond Pro, Lato;
    }

    Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Change site title font in twentysixteen theme?’ is closed to new replies.