-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot show copyright symbol in PDF files #2277
Comments
I know it's not a solution but when i insert the ohm resistance symbol Ω , the rendered pdf shows a copyright symbol instead maybe this could be a momentary solution to your problem |
@nicopollon Will give it a try. Thanks! |
Any update on symbols working properly? The Ω symbol for me does not work. It actually outputs the Ω symbol itself. I'm using the "montserrat" font family. |
Yeah it seems to depend on the font family. I'm doing the same thing and I actually get the omega symbol. It's also weird that this is an issue, when those symbols worked in previous versions of this package. |
I'm having the same issue but with the trademark symbol, ™. I've tried html entities, unicode and using the symbol directly. I'm using a google font, Plus Jakarta San, which does render the symbol. |
I ended up exporting the symbol manually, making it an SVG, and using it that way. Hopefully this will get fixed at some point. |
@SM2DevLLC I've had to do the same. Hopefully this does get fixed, as my project has many many pages of content and it is nerve-racking to think of some symbols not rendering. |
@nikels I may be a bit late for the party, but I'm struggling with the same. Inspired by the omega - copyright symbol connection, I tried the greek alphabet and the "iota" (Ι) greek character is rendered as the TM symbol, at least in the default font set. My problem was not solved, as I'm using Manrope, but may help you and others. |
I am not 100% sure, but could this line be causing this issue? https://github.com/diegomura/react-pdf/blob/master/packages/pdfkit/src/font/afm.js#L239 |
To get the copyright symbol to show, I had to use Font.registerEmojiSource({
format: 'png',
url: 'https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/',
// url: 'https://cdn.jsdelivr.net/npm/[email protected]/img/apple/64/',
// withVariationSelectors: true,
}); It looks like the copyright symbol ©️ is actually an emoji when it is displayed |
Note to others: I was having trouble with this, even after the fix in #2496. I had to switch from using TIL there are two different copyright symbols in UTF-8... 🤦 |
No matter how many fonts I used. |
Describe the bug
The library appears to be unable to render copyright symbols into the generated PDF file.
To Reproduce
Steps to reproduce the behavior including code snippet (if applies):
Text
component.I've tried different ways without luck:
©
,©
,©
.content: "\00A9"
I am using Poppins font family, but tried also with Times New Roman and got the same output.
Expected behavior
The copyright symbol should be displayed in the PDF.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: