I am using i-text for generating pdf from my android application. But it worked fine for English fonts. When I was trying to generate pdf for my locale, Bangla, I got some problems. After getting some tips from some blog I have got the implementation in the way mentioned bellow:
String fontName = "Nikosh.ttf";
InputStream is = context.getAssets().open(fontName);
int size = is.available();
byte[] buffer = new byte[size];
int a = is.read(buffer);
BaseFont customFont = BaseFont.createFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED, true, buffer, buffer);
Font banglaFont = new Font(customFont, 12);
Now the output looks like this:
This is the output for Bangla text using a bangla font
But the output text is broken. Whereas the original one looks like this one:
Original text in Bangla

Any help regarding how to solve this type of problem for unicode in android would be highly appreciated. N.B. I am using i-text 5.5.x