react-pdf
react-pdf copied to clipboard
Adding Naira symbol "₦" showing "¦"
Describe the bug I tried adding a naira symbol "₦" but not showing the symbol. Have tried using HTML Entity: (₦) and still didn't get the symbol.
Expected behavior I want to see the Naira symbol (₦). ₦5200. Have tried using HTML Entity: (₦) and still didn't get the symbol.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows
- Browser [chrome]
- React-pdf version [3.2.1]
Are you using a font that has that glyph?
Are you using a font that has that glyph?
@diegomura Yes, I'm using "Roboto".
import { Document, Font, Image, Page, StyleSheet, Text, View } from '@react-pdf/renderer';
Font.register({
family: 'Roboto',
fonts: [
{
src: 'https://cdnjs.cloudflare.com/ajax/libs/ink/3.1.10/fonts/Roboto/roboto-regular-webfont.ttf',
fontWeight: 400,
},
{
src: 'https://cdnjs.cloudflare.com/ajax/libs/ink/3.1.10/fonts/Roboto/roboto-medium-webfont.ttf',
fontWeight: 500,
},
],
});
I am facing the same issue, please help
Anyone with a solution?
Import font as custom file worked for me import font from '../../../fonts/static/Inter-Medium.ttf' Font.register({ family: 'Inter', src: font });
Are you sure that Roboto
has this character's glyph? @Tnaike
I can't find it in this list: https://github.com/googlefonts/roboto/blob/main/res/glyphlist.txt