1

I'm developing j2me application and want to add a custom font into that.So how to add a .ttf file into a j2me project.

bharath
  • 14,283
  • 16
  • 57
  • 95
Megha
  • 1,581
  • 2
  • 18
  • 33

1 Answers1

1

No. You can't use .ttf file for Java ME application. If you want to use custom font, look on this discussion.

I suggest you can use LWUIT framework. Here you can use different type of bitmap fonts.

bharath
  • 14,283
  • 16
  • 57
  • 95
  • Thanks for your answer.i am using LWUIT framework in my j2me application. – Megha Dec 21 '11 at 06:47
  • @ Megha, So you can create the new font in ResourceEdit and use it. – bharath Dec 21 '11 at 06:49
  • Thanks i create the font using LWUIT framework and it allowed me to add different font.but i want to add Open Sans Semibold into my application which is not in the list of font creation in the LWUIT framework . – Megha Dec 21 '11 at 06:59
  • @ Megha, you can't add a new font in ResourceEdit. So try to use [custom fonts.](http://www.developer.nokia.com/Community/Wiki/How_to_create_custom_fonts_in_Java_ME) – bharath Dec 21 '11 at 07:11
  • 1
    @Megha, try installing this font in the system and then read it into the ResourceEditor. – Vimal Dec 21 '11 at 08:08
  • @Bharath, it does work on device. Megha, try my [Localization app](www.megaupload.com/?d=7QSSW6UV) netbeans project. I have tested this app on some devices Nokia S^3, S60 3rd Ed FP1. The password to the zip is `lwuitl10n`. And yes if things don't pan out the way you want bharath's solution will surely work. – Vimal Dec 21 '11 at 10:25