java - Arabic Typesetting font slowers my JTextArea, JTextPane and JTextEditor -


i using jtextarea show heavy text in urdu, arabic , english language in java. problem gui freezes 12-15sec when use arabic typesetting font jtextarea. getting text xml , showing in textarea, using linewrap. window freezes 5sec when re-size window. although on console told time taken setting text : 7.005 when message shown did not show text in jtextarea after 5sec. case same jtextarea, jtextpane , jtexteditor.

interestingly above problems did not occur when use other fonts. text appeared after when time taken setting text message appeared on console. tested many time case same.

i doing in way

//note time start parsing string text=gettextfromxml(); //show parsed time system.out.print("setting text."); textarea.settext(text); system.out.println("setting text done."); //show time taken set text 

here sample outputs different fonts, time in seconds:

**arabic typesetting**//arabic font parsing time: 0.171 setting text. setting text done. time taken setting text: 7.005 //much time taken relevant others text size: 57124   //string length text.length();  **adobe arabic**//arabic font parsing time: 0.172 setting text. setting text done. time taken setting text: 0.499 text size: 57124  **andalus**//arabic font parsing time: 0.109 setting text. setting text done. time taken setting text: 1.388 text size: 57124  **thoma** parsing time: 0.172 setting text. setting text done. time taken setting text: 0.655 text size: 57124  **times new roman**  parsing time: 0.125 setting text. setting text done. time taken setting text: 0.515 text size: 57124 

i not going on factor parsing time factor time taken setting text matter me. want know

what technical problem arabic typesetting font, not compatible or heavy?

  1. as settext takes time others.
  2. also text did not appeared after message appeared.
  3. also gui freezes time when resizing window. , how resolve that?


Comments