TVke / react-native-tailwindcss

A react-native style system based on TailwindCSS
https://tvke.github.io/react-native-tailwindcss/
MIT License
565 stars 34 forks source link

Fonts don't update #14

Closed TomasNiDo closed 4 years ago

TomasNiDo commented 4 years ago

I added a font following this guide: https://medium.com/@mehran.khan/ultimate-guide-to-use-custom-fonts-in-react-native-77fcdf859cf4

I tried to update my serif font in the tailwind config like this:

fontFamily: {
  sans: 'Arial',
  serif: 'EBGaramond-Regular',
  mono: 'Courier New',
},

but it doesn't seem to work when I used it.

TVke commented 4 years ago

Hey @VerzatileTom

some questions for more details:

Let me know if you checked these things

In the docs there is a custom fonts section: (it's a small summary of the medium article) https://tvke.github.io/react-native-tailwindcss/typography/font-family.html#monospaced

Greetings @TVke

TomasNiDo commented 4 years ago

I managed to add the font by deleting the tailwind.config.js I copied from https://tvke.github.io/react-native-tailwindcss/installation.html because the npx RNtailwindcss command returns an error.

Then, I initialize the tailwind config again by running tailwind init --full then added my font like this

serif: [
  'EBGaramond-Regular',
  'Georgia',
  'Cambria',
  '"Times New Roman"',
  'Times',
  'serif',
],
TVke commented 4 years ago

Hi @VerzatileTom

Can I ask which kind of error did the command return? And now everything works as intended?

greetings @TVke

TomasNiDo commented 4 years ago

Can I ask which kind of error did the command return?

cp: cannot stat '../react-native-tailwindcss/stubs/defaultConfig.stub.js': No such file or directory

And now everything works as intended?

Yes, now works fine as expected.

TVke commented 4 years ago

Hey @VerzatileTom

What version of react-native-tailwindcss do you use? as this error was fixed in v1.1.9

Hope this helps even more

Greetings Thomas

TomasNiDo commented 4 years ago

Hello @TVke,

I'm using v1.1.9.

TVke commented 4 years ago

Hey @VerzatileTom

Good to know I will research it more but for now this issue seems fixed

greetings Thomas