We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Non Latin Characters specifically Hindi Characters are not getting rendered properly, some characters even words change to blank while rendering.
My sample code:
import React from "react"; import notoSansHindi from '../../assets/fonts/NotoSansDevanagari-Regular.ttf' import { Page, Text, View, Document, StyleSheet, Font } from "@react-pdf/renderer"; const BORDER_COLOR = '#bfbfbf' const BORDER_STYLE = 'solid' const COLN_WIDTH = 100 / 3 const FONT_FAMILY = 'Noto Sans Hindi' Font.register({ src: notoSansHindi, family: FONT_FAMILY } ); Font.registerHyphenationCallback(word => [word]); const styles = StyleSheet.create({ body: { padding: 8, }, table: { display: "table", width: "auto", borderStyle: BORDER_STYLE, borderColor: BORDER_COLOR, }, heading: { textAlign: 'center', fontFamily: FONT_FAMILY, }, }); export default function PdfSubscriberList() { return ( <Document> <Page size="A4" style={styles.body}> <View style={styles.table}> <Text style={styles.heading} > श्री माधव त्रिपाठी शर्मा </Text> </View> </Page> </Document> ); }
which results in :
श्री माधव त्रिपाठी
Expected behavior श्री माधव त्रिपाठी शर्मा
This is just one sample, I have I can see many bugs rendering with half words, character missing etc.
Please help ! Tried almost everything but not working. I hope someone else must have fixed this library to use with Hindi fonts.
Desktop
The text was updated successfully, but these errors were encountered:
i have this problem with persian font. please fix these bug i need it
Sorry, something went wrong.
I switched to pdf-make and that library is awesome @chimanSeyedhashemi
Same issue with Vietnamese characters
Successfully merging a pull request may close this issue.
Non Latin Characters specifically Hindi Characters are not getting rendered properly, some characters even words change to blank while rendering.
My sample code:
which results in :
श्री माधव त्रिपाठी
Expected behavior
श्री माधव त्रिपाठी शर्मा
This is just one sample, I have I can see many bugs rendering with half words, character missing etc.
Please help ! Tried almost everything but not working. I hope someone else must have fixed this library to use with Hindi fonts.
Desktop
The text was updated successfully, but these errors were encountered: