A powerful ComfyUI node for rendering text with advanced styling options, including full support for Persian/Farsi and Arabic scripts.
PersianText Node, is an essential tool for designers and creators working with ComfyUI. This node provides a powerful and flexible solution for rendering text with a wide range of styling options, including full support for Persian/Farsi and Arabic scripts. Whether you're creating posters, or text-based visuals, this node brings advanced typography features to your workflow. <br> <br>
<div dir="rtl"> نود PersianText در ComfyUI به شما امکان میدهد متنهای فارسی را با پشتیبانی کامل از اتصال حروف و راستچین (RTL) ایجاد کنید. این نود گزینههای پیشرفتهای برای طراحی متن ارائه میدهد، از جمله:پشتیبانی کامل از زبان فارسی و عربی <br> انتخاب فونت دلخواه: کافیست فایل فونت .ttf را به پوشه Fonts اضافه کنید.<br> چرخش متن: متن را حول مرکز خود بچرخانید.<br> تنظیم سایه: رنگ، فاصله و میزان محوشدگی سایه را شخصیسازی کنید.<br> تنظیم موقعیت و اندازه متن: متن را دقیقاً در موقعیت دلخواه خود قرار دهید.<br>
نود PersianText في ComfyUI يتيح لك إنشاء نصوص عربية بسهولة مع دعم كامل لاتجاه النص من اليمين إلى اليسار (RTL) والاتصالات بين الحروف. الميزات الرئيسية: <br>
دعم كامل للنصوص العربية والفارسية<br> إضافة خطوط مخصصة: يمكنك وضع ملفات الخط .ttf في مجلد Fonts.<br> تدوير النص: تدوير النص حول مركزه الخاص.<br> خيارات الظل: تخصيص اللون والمسافة والتمويه.<br> تحكم دقيق في الموضع والحجم: ضع النص في المكان الذي تريده بدقة.<br> هذا النود أداة رائعة لتصميم الجرافيك بالنصوص العربية والفارسية!<br>
</div> <br>.ttf
fonts in the Fonts
folder and instantly use them in the node.left
, center
, right
) and vertically (top
, center
, bottom
).X
and Y
offsets.Search for PersianText
in "Comfy Manager" or alternatively:
ComfyUI/custom_nodes/
git clone https://github.com/shahkoorosh/ComfyUI-PersianText.git
pip install -r requirements.txt
Fonts
folder inside the repository..ttf
fonts. Any .ttf
font placed in this folder will appear in the font dropdown menu in the node.🎨KG
.Fonts
folder).image_width
and image_height
to define your canvas size.#FF5733
for a vibrant orange).offset_x
, offset_y
) for pixel-perfect positioning.| Parameter | Type | Description |
|-------------------------|-----------|-------------------------------------------------------------------------------------------------|
| text
| String | The text to render. Fully supports Persian/Farsi, Arabic, and other languages. |
| font
| Dropdown | Select a font from the Fonts
folder. |
| size
| Integer | Specify the font size. |
| text_color
| Dropdown | Choose a color for the text from the palette. |
| text_color_hex
| String | Enter a custom hex code for the text color (optional). |
| background_color
| Dropdown | Choose a background color for the canvas. |
| background_color_hex
| String | Enter a custom hex code for the background color (optional). |
| horizontal_align
| Dropdown | Align text horizontally (left
, center
, right
). |
| vertical_align
| Dropdown | Align text vertically (top
, center
, bottom
). |
| rotation
| Float | Rotate the text around its own center. |
| offset_x
| Integer | Adjust the horizontal position of the text. |
| offset_y
| Integer | Adjust the vertical position of the text. |
| shadow_distance
| Integer | Set the distance of the shadow from the text. |
| shadow_blur
| Integer | Adjust the intensity of the shadow blur. |
| shadow_color
| Dropdown | Choose a color for the shadow. |
| shadow_color_hex
| String | Enter a custom hex code for the shadow color (optional). |
| image_width
| Integer | Specify the width of the canvas. |
| image_height
| Integer | Specify the height of the canvas. |
| direction
| Dropdown | Choose the text direction (LTR
or RTL
). |
Feel free to submit issues or pull requests to improve the PersianText Node. Your contributions and feedback are always welcome!
This project would not have been possible without the incredible work of two outstanding contributors to the ComfyUI ecosystem:
Thank you for creating Comfyroll Studio, which inspired many features and design principles of this node. Your innovative nodes set a benchmark for quality and functionality, and they were instrumental in shaping the PersianText Node. Without your work, this project would have taken significantly more time and effort to build.
A huge thank you for ComfyUI Essentials, a cornerstone project that provided essential utilities and best practices for node creation. Your code laid a strong foundation for the development of this node, and your contributions continue to empower the ComfyUI community.
Both of your contributions to the ComfyUI ecosystem have been invaluable, and this project is deeply grateful for the groundwork you’ve provided. Thank you for your dedication and effort in making the community stronger! 🌟