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

160
Views
how to add custom fontFamily to reacr-reader npm

I'm using react-reader npm and I cant put my custom font-family in my project. Does anyone know the answer of this ?

https://www.npmjs.com/package/react-reader

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

0

import React, { useState,useRef } from "react"
import { ReactReader } from "react-reader"

const App = () => {
  const [location, setLocation] = useState(null)
  const renditionRef = useRef(null);

  return (
    <div style={{ height: "100vh" }}>
      <ReactReader
        location={location}
        locationChanged={ (epubcifi)=>setLocation(epubcifi)}
        url="https://gerhardsletten.github.io/react-reader/files/alice.epub"
        getRendition={(rendition) => {
                renditionRef.current = rendition;
                renditionRef.current.themes.register('custom', {
                  p: {
                   'font-family': `Helvetica`,

                  },
                });
               renditionRef.current.themes.select('custom');
              }}
      />
    </div>
  )
}

export default App
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!