gatsby google font

JavaScript
yarn add gatsby-plugin-google-fonts
// or
npm install gatsby-plugin-google-fonts --save

module.exports = {
  siteMetadata: {
    title: `I like Google fonts`
  },
  plugins: [
    {
      resolve: `gatsby-plugin-google-fonts`,
      options: {
        fonts: [
          `limelight`,
          `source sans pro\:300,400,400i,700` // you can also specify font weights and styles
        ],
        display: 'swap'
      }
    }
  ]
}
Source

Also in JavaScript: