pnarimani / rtltmpro Goto Github PK
View Code? Open in Web Editor NEWRight-To-Left Text Mesh Pro for Unity. This plugin adds support for Persian and Arabic languages to TextMeshPro.
License: MIT License
Right-To-Left Text Mesh Pro for Unity. This plugin adds support for Persian and Arabic languages to TextMeshPro.
License: MIT License
Hello
first thank you so much for this amazing addition
I am facing some issue in introducing new Arabic fonts
can you please elaborate more on that
my Unity version is 2017.3.0p1
when I Open ur project or import ur rtl and textmesh folder in new project always shows this error:
Assembly has reference to non-existent assembly 'Unity.TextMeshPro' (Assets/RTLTMPro/Scripts/Runtime/RTLTMPro.asmdef)
Hi Moh,
I seem to be having an issue with Hamzas (ء) not appearing over certain characters.
For example, الأحمد and الأمة
I am using the supplied font 'segoeui'.
Many thanks,
Thomas
I had many errors after importing like this
Assets\RTLTMPro\Scripts\Editor\RTLTextMeshProEditor.cs(48,91): error CS0117: 'TMP_UIStyleManager' does not contain a definition for 'boldFoldout'
Assets\RTLTMPro\Scripts\Editor\RTLTextMeshProEditor.cs(54,21): error CS0103: The name 'm_HavePropertiesChanged' does not exist in the current context
Assets\RTLTMPro\Scripts\Editor\RTLTextMeshProEditor.cs(60,17): error CS0103: The name 'm_HavePropertiesChanged' does not exist in the current context
Assets\RTLTMPro\Scripts\Editor\RTLTextMeshProEditor.cs(70,13): error CS0103: The name 'm_TextComponent' does not exist in the current context
Please help
Hi, I have a project for a customer that wants to support the Kurdish language. I thought it is like the Arabic, so I used this project to do the job and the problem seems to be in special characters . for example the character ێ with another character like ت, for example, will not render correctly, it should look like ێت but it renders like ێ ت (without space), any idea? I am sure that the character exists in my font...
Hello
i get text property of inputfield but it shows like سلام how to fix it?
سلام
مقدار اینپوت رو دریافت میکنم اما حروف بصورت اشتباه نمایش داده میشن.مثلا میخوام متن رو به سرور ارسال کنم و توی دیتابیس ذخیره کنم
It's better to restructure the plugin in a way that it can be directly added to a project as a submodule.
The repo should only have contents of the RTLTMPro
folder.
Currently if we want to do a bug fix or feature, we have to do it inside RTLTMPro
project in this repository.
But if we be able to add the plugin as submodule to the other projects, we can backport bug fixes directly from those projects. This speeds up the development time.
i know its in the regex but i dont know how to fix it.
rtl needs to write closing tags to work properly but i have lots of texts that has no closing tags as text mesh pro doesnt need it. how can i fix it?
Hi,
I seem to be having issues with certain connectives when using RTLTMPro.
The letter ى (alif maqṣūrah) when positioned at the end of a word, does not connect to the previous letters including lām ل and nūn ن. However, it seems to display fine when not connecting.
I am using the supplied font 'segoeui'.
Can you please advise?
Thanks,
Tom
Hi,
I am using RTLTMPro to display Urdu words in my game. I tried using Segoeui RTL SDF for it without creating a new font asset but some letters were missing for Urdu so I created a new font asset with two more letters to test if it works. Now the letters I added are displaying but they are not properly connected to other letters when I type a word. For example, if write "بت" it displays fine but if I write "بٹ" it displays "ب ٹ".
How can I add rules when I add new letters in letter ranges?
hey
after adding the package to my project i face these errors:
Assets/RTLTMPro/Editor/RTLTextMeshPro3DEditor.cs(62,91): error CS0117: TMPro.EditorUtilities.TMP_UIStyleManager' does not contain a definition for 'boldFoldout'
and
Assets/RTLTMPro/Editor/RTLTextMeshProEditor.cs(62,91): error CS0117: TMPro.EditorUtilities.TMP_UIStyleManager' does not contain a definition for 'boldFoldout'
im using Unity 2018.2.17f1 and TextMeshPro is added to project
Any idea?
Thanks
سلام
در ابتدا تشکر میکنم بابت تهیه این پلاگین کاربردی
طبق همون مشکل شناخته شده، من با
dropdown menu
و
input field
مشکل دارم و نهایتا به ارور زیر برخورد کردم
Assets/RTLTMPro/RTLTextMeshPro.cs(14,32): error CS0506: RTLTMPro.RTLTextMeshPro.text': cannot override inherited member
TMPro.TMP_Text.text' because it is not marked virtual, abstract or override
در ادامه فایل
TMP_Text.text
رو پیدا کردم، اما ظاهرا توی متادیتا هست و قابل تغییر از ویژوال استودیو نبود. از پوشه ای که توی اون بود فایل رو باز کردم و خط 340 رو به :
public virtual string text { get; set; }
تغییر دادم. منتهی ارور باقی مونده هنوز
لطفا بررسی بفرمائید
Hi,
i've recently upgraded my project to Unity 2020 and reinstalled TextMeshPro3 via Package Manager.
After all these steps i get this error:
Assets\RTLTMPro\Scripts\Editor\RTLTextMeshProEditor.cs(8,41): error CS0246: The type or namespace name 'TMP_UiEditorPanel' could not be found (are you missing a using directive or an assembly reference?)
What should I do?
Thank you
Assets/Plugins/RTLTMPro/Editor/RTLTextMeshPro3DEditor.cs(62,91): error CS0117: 'TMPro.EditorUtilities.TMP_UIStyleManager' does not contain a definition for 'boldFoldout'
I used "NotoNaskh-Regular.ttf" With TextMeshPro 1.5.0
Have any idea about this?
Here download .ttf
https://drive.google.com/file/d/1BxNeXx2USvc1mNvLFkKYE2S15VCVZF3t/view?usp=sharing
<#183e7f>عدد اللعبة</color>
The Arabic text of the color-rich text label omitted color 'writing can not be properly resolved
It doesn't appear in any other text
<#183e7f>正常显示</color>
The outer rich text tag is not parsed and does not appear correctly when multiple rich text tags are displayed
<i><size=25>ة</size></i>
Hey Mr Narimani , I have a problem with showing IDs that formed from Farsi characters and numbers that are joined with an underline: like "علیرضا_1234"
The plugin joins Numbers and Chars connected together and shows the underline at the end :
like "_علیرضا1234".
Do you have any suggestion to manage this situation ?
I added a text the size of a page. there is no problem when i use textmesh pro, but with rtltextmesh pro i get this error:
IndexOutOfRangeException: Index was outside the bounds of the array.
it refers to this method in FastStringBuilder class:
public void Append(char ch)
{
if (capacity < Length)
EnsureCapacity(Length, true);
array[Length] = ch;
Length++;
}
it seems like you have declared an array that can store for example 8 elements not 9. why the code isn't in a try/catch block? how to solve this problem?
if you write something like
سلام😌
(there is no space between word and emoji)
this plugin will produce this Unicode array
\uFEB3\uFEFC\uFEE1\uDE0C\uD83D
instead of
\uFEB3\uFEFC\uFEE1\uD83D\uDE0C
this will lead to further errors like :
Non-fatal Exception: java.lang.Exception: IndexOutOfRangeException : Index was outside the bounds of the array.
at TMPro.TMP_Text.StringToCharArray(TMPro.TMP_Text)
at TMPro.TMP_Text.ParseInputText(TMPro.TMP_Text)
at TMPro.TextMeshProUGUI.OnPreRenderCanvas(TMPro.TextMeshProUGUI)
at TMPro.TextMeshProUGUI.Rebuild(TMPro.TextMeshProUGUI)
at UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate(UnityEngine.UI.CanvasUpdateRegistry)
at UnityEngine.Canvas:SendWillRenderCanvases(UnityEngine)
since it cant find characters on font asset.
Hi,
This is more of a question about the character ranges; what is the process to get the entire character range to ensure that any character for a given language can be properly drawn?
I am aware of the http://unicode.org website; but it is unclear to me how to know precisely which character ranges are required for each language; and in a way such that outdated/unused characters are excluded from the ranges.
I realize that this is probably not the best place to ask the question; but given that you have experience in this area, your input would be very much appreciated.
Many thanks!
when adding _PDMS Saleem QuranFont font...
http://quran.mursil.com/Web-Print-Publishing-Quran-Text-Graphics-Fonts-and-Downloads/fonts-optimized-for-quran
It can be reproduced using the following method:
public class RTLTextSetGet
{
public RTLTextMeshPro text1 ,text2;
void Start()
{
SetGetText();
}
private void SetGetText()
{
if(text1 && text2)
text1.text=text2.text;
}
}
Soloution :
Change the access modifier oforiginalText
property inRTLTextMeshPro.cs
fromprotected
topublic
and usetext2.originalText
instead oftext2.text
will solve the issue.
when i run the project this exception happened while trying to write in input field
: Index was outside the bounds of the array.
TMPro.TMP_InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, UnityEngine.Vector2 roundingOffset) (at Library/PackageCache/[email protected]/Scripts/Runtime/TMP_InputField.cs:3307)
TMPro.TMP_InputField.OnFillVBO (UnityEngine.Mesh vbo) (at Library/PackageCache/[email protected]/Scripts/Runtime/TMP_InputField.cs:3275)
TMPro.TMP_InputField.UpdateGeometry () (at Library/PackageCache/[email protected]/Scripts/Runtime/TMP_InputField.cs:3213)
TMPro.TMP_InputField.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/[email protected]/Scripts/Runtime/TMP_InputField.cs:3188)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at D:/Instaled Games/Unity Hub/2019.4.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:210)
UnityEngine.Canvas:SendWillRenderCanvases()
Above is how the text
المؤثرات الصوتية
looks in my unity project.
A Lebanese friend has advised that the ؤ letter seems to be throwing things off. I am a bit out of my depth not being a writer or reader of arabic :\
I did look into it as much as I could and it seems like an issue in the conversion since the character definitely exists correctly in the font
Currently the RLTSupport
is a big monolithic class that does the conversion.
With splitting it up, The code will be easier to read and maintain.
Also it can reduce GC allocations since each subsystem will be able re-use variables instead of creating it on each conversion.
Hey, I have updated my Unity project to 2019.2.9f1 and I am getting this error when I type something in a RTLTMP_Inputfield :
IndexOutOfRangeException: Index was outside the bounds of the array. TMPro.TMP_InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, UnityEngine.Vector2 roundingOffset) (at Packages/[email protected]/Scripts/Runtime/TMP_InputField.cs:3307) TMPro.TMP_InputField.OnFillVBO (UnityEngine.Mesh vbo) (at Packages/[email protected]/Scripts/Runtime/TMP_InputField.cs:3275) TMPro.TMP_InputField.UpdateGeometry () (at Packages/[email protected]/Scripts/Runtime/TMP_InputField.cs:3213) TMPro.TMP_InputField.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Packages/[email protected]/Scripts/Runtime/TMP_InputField.cs:3188) UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/Program Files/Unity/Hub/Editor/2019.2.9f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:198) UnityEngine.Canvas:SendWillRenderCanvases() (at C:/buildslave/unity/build/Modules/UI/ScriptBindings/UICanvas.bindings.cs:72)
It appears every second or when I type a new letter.
I have tried using a normal TMP input field and it works fine. I have also downgraded to 2019.6 (same error). The latest working version is 2018.3.
Quick help would be very very much appreciated,
Thanks.
Hello Abdulla,
Let me first thank you for the nice plugin you made,
It really helped me a lot.
I have a little issue though,
I noticed there is a very important missing character used in arabic typing which is : Arabic Tatweel,
find details about it here :
http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=%D9%80&mode=char
I managed to add that to TextMeshPro - Font Asset Creator,
but now when I used the character at the middle of a word, other characters don't re-shape as should,
please give it a try.
I hope you can fix that.
My Regards,
Rami Ibrahim
public RTLTMPro.RTLTextMeshPro contentText;
contentText.text = sometext;
this will not work in play mode i tried to add
contentText.ForceMeshUpdate(true);
but no solution the only thing that worked is i have to put some dummy text in Arabic so that i can then update that field with English text vice versa.
Great job on the package. Works great!
Why is ForceFix in RTLTextMeshPro protected and not public?
The user can change the language of my app at any time. I want to dynamically update forcefix on some of my text fields depending on the chosen language. Sometimes the phrases start with player names or numbers so the automatic detection based on content doesn't work always.
I changed ForceField to public and it seems to work as expected most of the time (but not inside dropdowns, need to dig deeper). Wondering if there is a reason it was protected in the first place and whether making it public would cause any problems.
Hello
My first question, does this support Hebrew characters?
If not, is this something that could be introduced?
I attempted to add the following into 'RTLSupport.cs' at the start of the IsRTLCharacter
function:
if (ch >= 0x0590 && ch <= 0x05FF) // Hebrew
return true;
But found that the rendered Hebrew text is malformed.
سلام
فونت لاله زار خیلی برای بازی مناسبه
اما وقتی ازین فونت استفاده میشه و
letter range
کپی میشه
پس از ساخت اطلس خطای
missing character
میده و تمام حروف آخر فارسی داخل اطلس وارد نمیشن در حالی که حروف اول وارد میشن
به عنوان مثال
"ب"
وارد نمی شود اما
"بـ"
وارد می شود
Hi.
I get a copy of the shader used to RTLTMPRO and made some changes to it.
There is a uniform variable in the shader. I update the value of this variable in runtime. I see the result in the TMPro but when I use my shader for RTLTMPRO I don't see the real change on the UI of the game until I disable and enable RTLTMPRO component.
Do you have any idea?
By simply trying to drag and drop the component and running the scene, any input in the field gives an error:
ndexOutOfRangeException: Array index is out of range. TMPro.TMP_InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, Vector2 roundingOffset) (at Library/Unity/cache/packages/packages.unity.com/[email protected]/Scripts/Runtime/TMP_InputField.cs:2819)
Since TextMeshPro is now a package in Unity, the "known issue" (https://github.com/sorencoder/RTLTMPro#known-issues) cannot be fixed as the source code the TMPro is not accessible. Also this seems like a totally different error.
The font in the input box doesn't show in WebGL build
hey
I added the package to project and its working fine
but unity shows one error for every RTLTMpro (Text)component after stopping the game!
here is the error:
MissingReferenceException: The object of type 'Material' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
TMPro.TextMeshProUGUI.GenerateTextMesh () (at C:/Users/myusr/AppData/Local/Unity/cache/packages/packages.unity.com/[email protected]/Scripts/Runtime/TMPro_UGUI_Private.cs:2080)
TMPro.TextMeshProUGUI.GenerateTextMesh () (at C:/Users/myusr/AppData/Local/Unity/cache/packages/packages.unity.com/[email protected]/Scripts/Runtime/TMPro_UGUI_Private.cs:2649)
TMPro.TextMeshProUGUI.GenerateTextMesh () (at C:/Users/myusr/AppData/Local/Unity/cache/packages/packages.unity.com/[email protected]/Scripts/Runtime/TMPro_UGUI_Private.cs:2649)
TMPro.TextMeshProUGUI.GenerateTextMesh () (at C:/Users/myusr/AppData/Local/Unity/cache/packages/packages.unity.com/[email protected]/Scripts/Runtime/TMPro_UGUI_Private.cs:2649)
TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at C:/Users/myusr/AppData/Local/Unity/cache/packages/packages.unity.com/[email protected]/Scripts/Runtime/TMPro_UGUI_Private.cs:1642)
TMPro.TextMeshProUGUI.Rebuild (CanvasUpdate update) (at C:/Users/myusr/AppData/Local/Unity/cache/packages/packages.unity.com/[email protected]/Scripts/Runtime/TextMeshProUGUI.cs:209)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:150)
UnityEngine.Canvas:SendWillRenderCanvases()
Any idea?
thanks in advance
I am getting these compile errors. Please advise.
Assets/RTLTMPro/Editor/RTLTextMeshPro3DEditor.cs(62,91): error CS0117: TMPro.EditorUtilities.TMP_UIStyleManager' does not contain a definition for
boldFoldout'
Assets/RTLTMPro/Editor/RTLTextMeshProEditor.cs(62,91): error CS0117: TMPro.EditorUtilities.TMP_UIStyleManager' does not contain a definition for
boldFoldout'
Hi, your RTLTMPro work fine with tag in <sprite=1>
syntax. When I change to <sprite name="smiling">
, it doesn't display sprite as it should be.
when text have Tashkel like "هاُني" the word count is 2 not 1 , it consider from index 0 to Tashkel a word and the rest word
Hello, I am trying to create an RTL Text Mesh Pro field that will hide characters outside its box.
If I set overflow to "Truncate" and use "english" characters, it works well. If I use arabic, it hides all the text.
سلام
جناب نریمانی، ضمن عرض تشکر مجدد بابت پلاگین،
من روی نسخه ی 2018.3.18 یونیتی از پلاگین شما استفاده میکردم و مشکلی نبود. پروژه رو به یونیتی 2018.4.23 آپگرید کردم و پلاگین شما رو هم آپدیت کردم توی پروژه، منتهی برخی از قسمت ها دچار مشکل شده اند. مثلا
InputField ها
مقدار پیشفرض شون نمایش داده میشه، اما هنگام تایپ کردن، محتوا نمایش داده نمیشه
و مشکل بزرگتر اینکه لیست های
DropDown
همونطور که در تصویر زیر می تونید ببینید، کلماتشون بهم ریخته و درست نمیشوند.
http://s14.picofile.com/file/8407903376/s1.PNG
ممنون میشم راهنمایی بفرمائید.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.