question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SourceSansPro-regular not correctly rendered

See original GitHub issue

Description

SourceSansPro-regular not correctly rendered

Steps to reproduce

Steps to reproduce the behavior:

  1. Choose “download family” from https://fonts.google.com/specimen/Source+Sans+Pro
  2. Register SourceSansPro-regular font with react-pdf
  3. Create a sample to render:
    <Document>
      <Page >
        <Text style={{fontFamily:"SourceSansPro"}}>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Magni voluptatibus dolores accusantium similique mollitia eligendi autem? Voluptate fugit nulla quia tempore consequatur? Perferendis, dicta. Architecto neque iusto quas fuga quia?</Text>
      </Page>
    </Document>
  1. Render pdf
  2. See output lorem

Expected behavior

See properly rendered lorem ipsum text.

Additional information

SourceSansPro-italic seems to be rendered correctly. Others not so much.

Environment

  • react-pdf version: 1.6.12
  • React version: 16.12.0

Workaround Get fonts from https://github.com/google/fonts

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mnowotnikcommented, Jan 26, 2021

@firzx77 I switched to downloading fonts from https://github.com/google/fonts ; they work without a problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adobe Source Sans Pro font does not render correctly on ...
I've found the cause. Just turn off experimental DirectWrite in the flags. It is caused by the font rendering system of chrome.
Read more >
firefox - Source Sans Pro is not fully displayed / looks broken
only in Firefox (v. 103.0.1) one site is complety broken. The font source sans pro is not fully displayed, look at the attached...
Read more >
Source Sans Pro Regular Weight Not Showing Up
Hi all, For some reason the font Source Sans Pro regular weight option is not showing up in Premiere Pro CC 2018 -...
Read more >
Source Sans Pro font is rendered in bold when locally installed
(e. g. Open Sans) It took me a while to find out, why Chrome does not render bold fonts correctly. If I want...
Read more >
Adobe Source Sans Pro font does not render ... - YouTube
Adobe Source Sans Pro font does not render correctly on Windows 10Helpful? Please support me on Patreon: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found