Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Original Nazanin Fonts (True Type)

  Asked By: Lambodar    Date: Feb 11    Category: Java    Views: 1414

I have a problem to dispalying persian and english contentes together in a textfield in a JasperReport, when I use BNazanin Font to display a textfield.
I used some free (Nazanin/Bnazanin) fonts, but all of them have problem!

I have tested my jasper to another fonts like Tahoma and I could show my desire content in my textfiled.

I think it is because of non standard font and I would be provide the "Original Font",
I could find a standard pack of the nazanin font (Bold and Light) here, and I hope I could bypass this problem by this font.
please visit www.fonts.com/findfonts/detail.htm?pid=436576
As you see, this font supparts all of popular Unicode:

Unlikely these fonts aren't free and I could not find those another places!

Is there any person has this/these font(s).



2 Answers Found

Answer #1    Answered By: Abana Cohen     Answered On: Feb 11

call the below method to change English numbers to Farsi numbers. It works well.

public static String convertDigitsToFarsi(String input) {
NumberFormat nf = NumberFormat.getInstance();
if (nf instanceof DecimalFormat) {
DecimalFormat df = (DecimalFormat) nf;
DecimalFormatSymbols dfs = df.getDecimalFormatSymbols();


char[] cs = input.toCharArray();
for (int i = 0; i < cs.length; i++) {
int j = "0123456789".indexOf(cs[i]);
if (j != -1) {
cs[i] = nf.format(new Long(cs[i] + "")).toCharArray()[0];

return new String(cs);

Answer #2    Answered By: Lu Fischer     Answered On: Feb 11

I used some methods to decode my content to the unicode and I could display  all of content to the Farsi.

I am unable to display content by a non true  type font
As I told before, I could display every thing with any true type  font!

I just have problem  to non true type fonts, because iText can not resolve "Identify-H" for non true type fonts  in jasper report project!

I just need to the Nazanin True Type font, if anyone so, please send it to me.

Didn't find what you were looking for? Find more on Original Nazanin Fonts (True Type) Or get search suggestion and latest updates.