Working With Fonts
Learn how to use different types of fonts in a way that works with React and Styled Components.
We'll cover the following...
Adding fonts
A common approach to introducing fonts when not using React involves adding links to the head section of our page, and then referring to those fonts within the CSS. We’ll follow a similar approach, but do it in a way that works with React and styled-components.
Our process will be to create a new file, fonts.js
, and create a styled-components global style that includes all the @font-face
commands we need. We then put that component into our top-level App
component. The fonts can ...