Giter VIP home page Giter VIP logo

rtlscript's Introduction

RTLScript

A simple 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 (:

RTLTypeLogo

Screenshots (using ImGui for rendering through ExtremeEngine)

Correct Form:
ScreenShot

Broken:
ScreenShot

About

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.

Features

  1. RTLScript have a full support for Arabic, Hebrew, Farsi and Urdu.
  2. Support extra symbols like: لا, لأ, لآ, لإ, الله.
  3. Very easy to work with it.
  4. Support RTL and LTR text in the same line.

How to use it?

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.
}

Not working?

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.

Possible bugs

  • If you wrote in RTL and LTR in the same line it's maybe will be broken(but it's very rare i think it's just possible).

rtlscript's People

Contributors

oscar7070 avatar amyrahmady avatar mortezaaghazamani avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.