non-latin font (Persian fonts) upside-down
See original GitHub issueI did try register Persian fonts, everything looks fine unless text gets larger than one line. this is my codes:
mock text:
export const data = {
text_persian: 'لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد.',
text_english: 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.',
};
and this is my template:
import React from 'react';
import { data } from './mock';
import { Page, Text, View, Document, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
page: { fontFamily: "iransans" },
textRight: { textAlign: 'right' },
});
export function invoicePdfTemplate() {
return (
<Document>
<Page size="A4" style={styles.page}>
<View>
<Text>
{data.text_english}
</Text>
<Text style={styles.textRight}>
{data.text_persian}
</Text>
</View>
</Page>
</Document>
)
}
and this is the final result:
the problem is in Persian font if the text gets larger than a line, it will be rendered upside-down
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
non-latin font (Persian fonts) upside-down - Bountysource
I did try register Persian fonts, everything looks fine unless text gets larger than one line. this is my codes: mock text:
Read more >Persian fonts looks ugly : r/linuxquestions - Reddit
Hi, I just installed Arch in my machine every thing is good but Persian fonts just looks really ugly. screenshot.
Read more >Quirkus Upside Down font - Fonts2u
Font family. Quirkus Upside Down. Font subfamily. Regular. Unique subfamily identification. Quirkus Upside Down: 2009. Full font name. Quirkus Upside Down.
Read more >Upside down, backwards letters and symbols
Upside down font generator. Just type something in and this generator is going to flip and reverse your text characters upside down and...
Read more >Can I use a font for English text, and another font for Arabic ...
If this is for a web project, you can just put both fonts in your font stack: font-family: EnglishFont, ArabicPersianFont, sans-serif;.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have some progress made on supporting RTL text using the style
direction: rtl
although it’s not yet finished. I’m clos to, but need more time unfortunately, which I lack lately 😅 Will post updates as soon as I have themI should mention that registering font, works fine (both URL and import).
the only problem is when the text gets larger than one line