Skip to content

MuttonTheLast/FarsiType.NET

Repository files navigation

FarsiType.NET

This is a simple .NET library designed to support RTL Farsi-like languages (such as Arabic).

Showcase

image

Usage

class Program
{
  public static void Main(string[] args)
  {
        
    // Sometimes farsi fonts does not support isolated letters so you should use
    FarsiTypeNet.FarsiType.SetUseIsolated(false);


    // This is the main method but you can use others if u want
    // Converts a string to its contextual Farsi glyph representation and applies the specified text order.
    string str = FarsiTypeNet.FarsiType.GetFarsiGlyph("سلام حالت خوبه؟", FarsiOrder.Default);

    // do whatever you want
  }
}

About

I wanted to use RTL text in ImGui.NET (.NET wrapper for dear imgui) and tried several approaches, but none were satisfactory. Then, I discovered a C++ project called FarsiType, which inspired me to create a similar solution for .NET in C#.

compatibility

  • .net-standard2.1
  • .net8.0, 9.0, above
  • Native Aot Compatible ( So every language that supports C/CPP )

About

FarsiType.NET - type Farsi or Arabic in your C# and .NET apps and get UTF-8 fixed version of it!

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages