I have a problem with changing fonts in react-pdf.
// Register Font
Font.register({
family: "Roboto",
src:
"https://cdnjs.cloudflare.com/ajax/libs/ink/3.1.10/fonts/Roboto/roboto-light-webfont.ttf"
});
So by default with font register is given Roboto font, but I need a Public Sans font and nowhere I can find source of it. Any help would be great
try to download the font ttf file and import it and assign to scr.
enter code here
import roboto from './Roboto-Regular.ttf'
Font.register({ family: 'Roboto', fonts: [ { src: roboto , fontWeight: 'bold' } ] })