2

I am developing an android application and I strongly need to use Justify text alignment and also I should use custom font for texts. my application is in Persian language.

If I use TextView for showing texts I cant set text alignment to Justify.

If I use WebView and load html to it I cant use font for it (I know that I can set font using html and css but it does not work for some languages like Persian and Arabic , I tested it, only on android 4.4.2 i see my custom font but on other versions of android webview show android default font)

I tried converting font to SVG but nothings changed.

also I searched in github for a custom webview or textview , I fount one custom textView , both font and text alignment was ok but the direction was left to right but i need it be right to left (I tried changing gravity and other things but cant fix problem).

So what is your suggestion ? Thank you so much for helping.

Regards.

Morteza Soleimani
  • 2,652
  • 3
  • 25
  • 44

1 Answers1

0

Take a look at this forum.I used this library with the following attrs and everything works perfectly:

ext:documentView_reverse="true"
ext:documentView_textAlignment="justified"
ext:documentView_textFormat="formatted"
Community
  • 1
  • 1
Arash
  • 825
  • 2
  • 11
  • 19