我有一个名为"hindi.txt"的文件.它的内容如下.我正在使用Python3.5.
??????? ??????? ?? ??? ??? ??? ?????? ?????????, ??????? ???? ?????: ???????
9 ??? ?? ???? ????? ??? ?????, 59000 Cr ??? ???? ??????? 36 ????? ?????
WhatsApp ?? ????? ???? ??????????? ?????????? ?? ??? ??? ???? ?? Allo ???????
???? ???? ?? 10 ??????: ????? ??? ??? 150 ???? ???? ?? ??? ?? ?? ??? ?? ?????
???? ????? ???? ?? ???? ??? ????? PAK ?? LoC ?? ??? ????? ??? ?????
PAK ?? ????? ??? ???? ???? …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用python3上的pil更改图像上文本的方向,但我无法这样做,因为未安装依赖项libraqm 。我找不到安装libraqm 的方法。
我尝试通过pip安装,但是没有成功。
我也尝试找到它,我找到了,但是没有关于如何在Windows 10上安装它的说明;仅适用于 Mac 操作系统和 Linux。链接是: https: //github.com/HOST-Oman/libraqm/
from PIL import Image, ImageDraw, ImageFont, ImageTk, features
Coords = [0,0]
Text = 'Hello World'
colour = '#225643'
Font = ImageFont.truetype("Font/GentiumBasic-Regular.ttf", 40,
encoding="unic"))
direction = 'rtl' #Right to Left
Alignment= 'right'
til = Image.new("RGBA", (800, 500))
draw = ImageDraw.Draw(til)
draw.text(Coords, Text, colour, font=Fonts,
align=Alignment, direction=direction)
til.show()
Run Code Online (Sandbox Code Playgroud)
加薪:
文件“C:\Users\Yousef\AppData\Roaming\Python\Python37\site-packages\PIL\ImageFont.py”,第 185 行,在 getmask2 中 …
python installation dependencies python-imaging-library python-3.x