Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (603)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (651)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Cross platform text  (Read 1543 times)
0 Members and 1 Guest are viewing this topic.
Offline darcone

Junior Devvie

Size matters

« Posted 2004-05-05 08:47:21 »

Is there any way to make text look exactly the same on all devices? Nokia, SE, Motorola etc...
I am working on a lightweight class for this but perhaps there already is a simple solution to this?
Offline davidaprice

Junior Devvie

« Reply #1 - Posted 2004-05-05 13:58:33 »

All the high-level UIs and also the low-level method Graphics.drawString make use of the phone's built-in fonts, so you can't make those look the same on different phones.

What you can do is include a 'font' image bitmap in your MIDlet JAR file, load it as an image, set the clip rectangle so that only the wanted character is drawn, then draw the image. Repeat for each character in the text you want to display.

Offline darcone

Junior Devvie

Size matters

« Reply #2 - Posted 2004-05-05 16:01:04 »

Yeah I know that method and Ive been using it. Just working on a better one (?)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davidaprice

Junior Devvie

« Reply #3 - Posted 2004-05-06 06:42:22 »

Until/unless some future version of MIDP allows you to load a Font definition from your JAR file, there isn't another solution, as far as I can see.
Offline larry

Junior Devvie

.. son of jor-el, kneel before zod ...

« Reply #4 - Posted 2004-06-07 10:27:28 »

Im also interested in such a library.
would appreciate if hearing how your progress goes.

Offline darcone

Junior Devvie

Size matters

« Reply #5 - Posted 2004-06-07 10:49:57 »

I am already using it in my 2 games and it works very well. Only downside to this library is the speed at which the fonts are rendered. But for menus or RPG/games where you dont need max fps at that moment, it works great.
Offline larry

Junior Devvie

.. son of jor-el, kneel before zod ...

« Reply #6 - Posted 2004-08-22 12:54:47 »

Any chance I could use your library?

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

SHC (11 views)
2015-08-01 03:58:20

Jesse (17 views)
2015-07-29 04:35:27

Riven (38 views)
2015-07-27 16:38:00

Riven (19 views)
2015-07-27 15:35:20

Riven (22 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (32 views)
2015-07-25 00:14:37

BurntPizza (43 views)
2015-07-24 22:06:39

BurntPizza (25 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!