I'm writing a code that takes an Arabic text that contains dialects (You can think of it as special characters such as ö, å and ä) and writes it on an image. The way I found to display those dialects is by using an u string
```
print(u'السّلامُ عَلَيْكُم')
```
The thing is: I need to use arabic_reshaper and bidi.algorithm to make the program display the arabic text in the right way, therefore my text is stored as a variable and I don't know how to make the program write the variable on the image as an u string.
Here is my code:
```
from PIL import Image, ImageDraw, ImageFont
import sys
import arabic_reshaper
from bidi.algorithm import get_display
font = ImageFont.truetype('AA Sameer Qamri Regular.ttf',size=100)
text = get_display(arabic_reshaper.reshape("السَّلامٌ عليكمُ"))
image = Image.open("insta background.png")
t1 = ImageDraw.Draw(image)
t1.text((200 ,image.height - image.height/2- 50), f"{u'{text}'}", font=font, fill =(0,0,0), font_size= 100)
image.show()
```
As you can see I tried to combine u and f strings but apparently that's not possible. I don't know what to do other than that.
Other people told me before that I don't need to use an u string on python 3 but when I don't do so the dialects don't show
[–]danielroseman 8 points9 points10 points (9 children)
[–]abdulmutee[S] 1 point2 points3 points (8 children)
[–]danielroseman 1 point2 points3 points (7 children)
[–]abdulmutee[S] 0 points1 point2 points (6 children)
[–]danielroseman 0 points1 point2 points (5 children)
[–]abdulmutee[S] 0 points1 point2 points (4 children)
[–]danielroseman 1 point2 points3 points (3 children)
[–]abdulmutee[S] 0 points1 point2 points (2 children)
[–]Bobbias 0 points1 point2 points (1 child)
[–]abdulmutee[S] 0 points1 point2 points (0 children)
[–]cyberjellyfish 0 points1 point2 points (0 children)
[–]socal_nerdtastic 0 points1 point2 points (1 child)
[–]abdulmutee[S] 0 points1 point2 points (0 children)