hex007 / freej2me

A free J2ME emulator with libretro, awt and sdl2 frontends.
Other
486 stars 75 forks source link

Default font in some games #104

Closed vadosnaprimer closed 2 years ago

vadosnaprimer commented 3 years ago

I checked Bounce Tales and Diamond Rush for 320x240 Nokia, and the fonts lack style I think?

Безымянный

In lowres Diamond Rush it looks okay, though maybe it uses a different approach?

Безымянный1

recompileorg commented 3 years ago

Judging from the way the text is colored, it looks like the 'lowres' version is drawing the text itself.

Font styles should be a very quick fix.

javax.microedition.lcdui.Font already handles style, face, and size correctly. You shouldn't need to modify this.

You'll want to change org.recompile.Mobile.PlatformFont -- I left a "TODO:" comment about this very issue some time ago.

Anyhow, the font passed to the constructor will be a lcdui.Font font. You can use that object to build an AWT font with equivalent properties so that the graphics routines can make use if it. It handles size correctly now, but not face or 'style' (bold, italic, etc.)

jacob-sommer-dev commented 2 years ago

@recompileorg I've implemented a fix for this in a branch but get a 403 when I try to push. What's the preferred way to contribute to freej2me?

recompileorg commented 2 years ago

@jacob-sommer-dev Just submit a pull request. Someone will review it and commit it to the main branch if everything looks okay.

jacob-sommer-dev commented 2 years ago

Ah, I had to fork first. My bad - first time contributing to a project. PR: #129

recompileorg commented 2 years ago

I forgot to close the issue! Thanks again.