Skip to main content

A program to correctly display Persian and Arabic words in kivy

Project description

PersianShowInKivy

PersianShowInKivy یک ابزار ساده برای نمایش صحیح متن‌های فارسی در برنامه‌های Kivy است. این ابزار از دو کتابخانه bidi و arabic_reshaper استفاده می‌کند تا متن‌های فارسی را به درستی شکل داده و راست‌چین کند.

ویژگی‌ها

  • حروف‌چینی متن فارسی: اتصال صحیح حروف فارسی با استفاده از arabic_reshaper.
  • راست‌چین کردن متن: تنظیم جهت متن (RTL) با استفاده از bidi.algorithm.
  • مناسب برای برنامه‌هایی که با Kivy توسعه داده شده‌اند.

نحوه استفاده

from persian_show_in_kivy import PersianShowInKivy

نمونه‌سازی از کلاس

persian_renderer = PersianShowInKivy()

متن فارسی مورد نظر

text = "سلام دنیا"

پردازش متن

reshaped_text = persian_renderer.persian_text(text)

نمایش متن پردازش‌شده

print(reshaped_text) # متن آماده برای نمایش در Kivy

وابستگی‌ها

این پروژه از کتابخانه‌های زیر استفاده می‌کند

bidi arabic_reshaper

چرا این ابزار؟

Kivy به‌صورت پیش‌فرض از متن‌های راست‌چین (RTL) پشتیبانی نمی‌کند و نمایش متن فارسی یا عربی ممکن است با مشکل مواجه شود. PersianShowInKivy این مشکل را حل می‌کند و متن را به شکلی که برای Kivy قابل نمایش باشد آماده می‌سازد

لایسنس

این پروژه تحت مجوز MIT منتشر شده است. برای اطلاعات بیشتر به فایل LICENSE مراجعه کنید

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

persiankivy-0.1.1.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

persiankivy-0.1.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file persiankivy-0.1.1.tar.gz.

File metadata

  • Download URL: persiankivy-0.1.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Windows/11

File hashes

Hashes for persiankivy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 718f1999bb0e6668b38f6dcd0e381f822a8db0fbe310bd6f2e099a1155362dd4
MD5 e1fbfd4d7245c7dd4d03c5318a96e760
BLAKE2b-256 c715805e2d18f7c80a8b46effdeefc16d97c07b893d72da8f3c3c7c73e2d22e0

See more details on using hashes here.

File details

Details for the file persiankivy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: persiankivy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Windows/11

File hashes

Hashes for persiankivy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ed0e6e7b9452e47d050d374d570fe3e4d2584de061ad4e380a01fe4bbabe47f
MD5 5a2662437d132cfe4edfb4114fa7a13a
BLAKE2b-256 7341d239f04a3a2a2dbb990f298b76aebef1ed1744bf6cd289b243a099db88dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page