Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How should I use non typeface font? #3494

Closed
alishir opened this issue Jan 12, 2018 · 0 comments
Closed

How should I use non typeface font? #3494

alishir opened this issue Jan 12, 2018 · 0 comments

Comments

@alishir
Copy link

alishir commented Jan 12, 2018

Description

I want to use Vazir font with gatsby-starter-blog, I override the theme with fontFamily: 'Vazir' and in the inspection mode I could see the result. but it seems vazir font is not hosted by gatsby.

I installed vazir font with yarn add vazir-font.

Environment

Gatsby version: 1.1.28
Node.js version: v8.9.3
Operating System: Ubuntu 16.04

Actual result

Vazir font does'nt host by gatsby while it is installed.

Expected behavior

Show body text with vazir font.

Steps to reproduce

1. Create fresh site with gatsby-starter-blog

2. Install vazir font with yarn add vazir-font

3. Modify src/utils/typography.js to seem following code block:

import Typography from 'typography'
import Wordpress2016 from 'typography-theme-wordpress-2016'

Wordpress2016.overrideThemeStyles = () => ({
  'body': {
    direction: 'rtl',
    fontFamily: 'Vazir',
  },
  'a.gatsby-resp-image-link': {
    boxShadow: 'none',
  },
})

const typography = new Typography(Wordpress2016)

// Hot reload typography in development.
if (process.env.NODE_ENV !== 'production') {
  typography.injectStyles()
}

export default typography

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant