Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro How to write Persian/Farsi using TextMesh Pro - Complete Guide

Discussion in 'UGUI & TextMesh Pro' started by afshin_a_1, Feb 12, 2020.

  1. afshin_a_1

    afshin_a_1

    Joined:
    Apr 26, 2015
    Posts:
    50
    hi everyone and @Stephan_B
    i want to be able to write arabic/persian using textmesh pro, but since i don't know much about fonts and characters i'm asking for help here
    using unity 2019.3 - TextMesh Pro 2.0.1
    i did test with 2 fonts, 1- B Nazanin and 2- Arial(it supports arabic)
    first way: i just right clicked on the b nazanin font. Create/TextMesh Pro/Font Asset. it will automatically create font asset.
    second way: i did set from window/TextMeshPro/Font asset creator, the character set to be "Unicode Range(Hex)" and render mode to be "sdf16" and others were default. and character sequence(hex) i used from this page
    https://docs.antura.org/HowTo/ArabicFont.html

    in both ways i can write arabic right to left(words aren't squares, meaning it's work). but the words are seperate from each other. as you know right to left languages like arabic/persian/urdu etc, letters stick together most times. so what should i do to write arabic instead of some right to left words???? If you help us step by step, it help both me and those who search for it in the future.
    wrong_textmeshpro_arial_persian.jpg
    correct Right to left in notepad: correct_notepad.jpg
    if there is no way to write/display Right to left officially then i should go with this solution i think:
    https://github.com/mnarimani/RTLTMPro

    i appreciate any help. thanks in advance.
     

    Attached Files:

    Last edited: Feb 18, 2020
  2. diviniy149

    diviniy149

    Joined:
    Mar 9, 2018
    Posts:
    1
    Hey Afshin, have you fixed your problem? I might be able to help