diegomura / diegomura/react-pdf
Superscripts and subscripts are not rendered correctly
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 1.3k
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 52
Description
**Describe the bug**
Trying to render select superscripts and subscripts results in a wrong rendering.
**To Reproduce**
Steps to reproduce the behavior including code snippet (if applies):
1. Render the following snippet:
```
U+00Bx (correct): x², x³, x¹
U+207x: x⁰, xⁱ, x⁴, x⁵, x⁶, x⁷, x⁸, x⁹, x⁺, x⁻, x⁼, x⁽, x⁾, xⁿ
U+208x: x₀, x₁, x₂, x₃, x₄, x₅, x₆, x₇, x₈, x₉, x₊, x₋, x₌, x₍, x₎
U+209x: xₐ, xₑ, xₒ, xₓ, xₔ, xₕ, xₖ, xₗ, xₘ, xₙ, xₚ, xₛ, xₜ
```
2. Notice that only the [U+00Bx chars](https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts#Superscripts_and_subscripts_block) are rendered correctly.
**Expected behavior**
All the superscripts and subscripts are rendered correctly.
**Screenshots**
**Desktop:**
- OS: Windows
- Browser: Ecosia (Chromium)
- React-pdf version: 4.3.2
Contributor guide
Assessment
This issue has not been assessed yet.