react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

Does not render U+00B7 special character (∙)

Open heejinlee07 opened this issue 1 year ago • 2 comments

Describe the bug A clear and concise description of what the bug is.

react-pdf doesn't seem to render special character U+00B7 (aka. middle dot, https://www.compart.com/en/unicode/U+00B7)

To Reproduce Steps to reproduce the behavior including code snippet (if applies):

link to repl

Expected behavior A clear and concise description of what you expected to happen.

It should render the middle dot https://fonts.google.com/specimen/Oswald?preview.text=%C2%B7

Screenshots If applicable, add screenshots to help explain your problem. image image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • React-pdf version: 3.1.7 but doesn't work on repl as well: https://react-pdf.org/repl

heejinlee07 avatar Apr 13 '24 14:04 heejinlee07

@heejinlee07, this might've been an issue once, but not anymore. The symbol you have is not displaying because it is not U+00B7. It is U+2219, which the font does not support. I've had this switch happen to me various times when copy/pasting (very frustrating). To show that U+00B7 does in fact work, you can force-embed U+00B7 by adding {"\xB7"} to your text.

(Also, you mention that Oswald supports the character, which is true, but keep in mind that the text it appears in is styled with "Times-Roman" not "Oswald". See line 211)

@diegomura, Please advise: This is still an issue for the character U+00A9 (copyright symbol © ). It does not display, regardless of the font, despite the fact that the fonts I've tried definitely support the glyph (confirmed with fontdrop.info).

CodeSmith32 avatar Oct 14 '24 16:10 CodeSmith32

... This is still an issue for the character U+00A9 (copyright symbol © ).** It does not display, regardless of the font, despite the fact that the fonts I've tried definitely support the glyph (confirmed with fontdrop.info).

II had the same issue with the copyright symbol © (\u00a9), but replacing it with the following combination of unicode codes it worked: \u00a9\ufe0f , that it's the equivalent of the emoji version as far as I could understand: ©️ .

mrsarm avatar Oct 14 '24 17:10 mrsarm

© should work in latest version

diegomura avatar Nov 17 '24 01:11 diegomura