A simple tiny library for Arabic, Hebrew, Farsi, Urdu and etc. for modern C++ standards.
RTLScript is a fork of FarsiType: https://github.com/AmyrAhmady/FarsiType
Just a logo that i made for fun i Love to make a logos for my projects (:
Screenshots (using ImGui for rendering through ExtremeEngine)
Hi, i needed RTL text in my project and i found a beautiful repository named FarsiType(https://github.com/AmyrAhmady/FarsiType) and i decided to improve it for my needs.
- RTLScript have a full support for Arabic, Hebrew, Farsi and Urdu.
- Supports extra symbols like: لا, لأ, لآ, لإ, الله.
- Supports Arabic tashkil(diacritic) for example: َ ً ُ ٌ ِ ٍ ْ and some other.
- Very easy to work with it.
- Support RTL and LTR text in the same line.
RTLScript is very easy to use just call "RTLScript::ConvertToFixed":
#include "RTLScript.h"
#include <iostream>
void main()
{
// Without properties.
auto fixedArabicText = RTLScript::ConvertToFixed("أنا أحب الأناناس"); // Convert to fixed text.
std::cout << fixedArabicText; // Print the result.
// With properties.
RTLScriptConverterProperties properties =
{
.JoiningArabicLetters = true,
.EnableSpecialWordAllahForm = true,
.EnableJointLaamAlifForm = false,
};
auto fixedArabicTextWithProperties = RTLScript::ConvertToFixed("أنا أحب الأناناس", &properties); // Convert to fixed text with properties.
std::cout << fixedArabicTextWithProperties; // Print the result.
}
First, if it's not working make sure that your project setted to MultiByte or Unicode and not ASCII.
Second, check that you are using /utf-8.
Third, check if your project files saved in utf-8.
Fourth, choose a font that supports that RTL language that you want to use.