Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
How to change fonts in react-pdf

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

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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' } ] })

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!