Using a bitmap font to display and edit texts

One of the problems I am currently facing is displaying complex texts (English + Persian / Arabic). English and Persian / Arabic letters are not displayed in the correct order. To solve this problem, I created a Bitmap Font library that draws these complex texts correctly. Now I want to convert all texts in all widgets in my program to their bitmap equivalent. For example, if I have a TextView in my program, I want to get its text, convert it to a bitmap with my bitmap font library, and finally replace it with the TextView. The problem is finding a generic solution that can be applied to any widget that can display text like ListView, EditText, Menus, ...

enter image description here

+3


source to share


3 answers


You can try looking at the source of the TextView and changing it to suit your needs (i.e. whenever the user enters a character using the IME, captures the event and inserts the correct bitmap character into your custom view ...)



+2


source


You've seen Arabic Reshaper from everything I've understood, it can be used to display texts containing both RTL (Arabic) and LTR correctly.



+2


source


You can use the font library in C ++ and display the correct font albeit a bit long

+1


source







All Articles