App.jsx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
import GoogleFontLoader from "react-google-font"; function App() { return ( <> <GoogleFontLoader fonts={[ { font: "Roboto", weights: [400, "400i"], }, { font: "Roboto Mono", weights: [400, 700], }, { font: "Lobster", weights: [400], }, { font: "Merriweather", weights: [300, 700], }, { font: "Open Sans", weights: [400, 600], }, { font: "Poppins", weights: [400, 500, 700], }, { font: "Playwrite CO Guides", weights: [400], }, ]} /> <p style={{ fontFamily: "Roboto Mono, monospaced" }}> This text is styled with Roboto Mono! </p> <p style={{ fontFamily: "Roboto, sans-serif" }}> This text is styled with Roboto! </p> <p style={{ fontFamily: "Lobster, cursive" }}> This text is styled with Lobster! </p> <p style={{ fontFamily: "Merriweather, serif" }}> This text is styled with Merriweather! </p> <p style={{ fontFamily: "Open Sans, sans-serif" }}> This text is styled with Open Sans! </p> <p style={{ fontFamily: "Poppins, sans-serif" }}> This text is styled with Poppins! </p> <p style={{ fontFamily: "Playwrite CO Guides,sans-serif" }}> This text is styled with custom fonts </p> </> ); } export default App; |