flare-engine icon indicating copy to clipboard operation
flare-engine copied to clipboard

Feature Request: Render crisp fonts

Open jtrees opened this issue 5 years ago • 4 comments

I believe the engine currently has an internal resolution at which it renders stuff and then upscales or downscales accordingly to meet the client's target resolution. This is a reasonable approach for pre-rendered graphics but has the side effect of making text quite blurry. If rendering of text could be handled independently of the scaled graphics, fonts could be rendered crisply, maximizing readability.

jtrees avatar Sep 24 '19 21:09 jtrees

This is definitely something I've wanted for a while, but just haven't come up with a good idea for implementing it. Something like this would be a huge boon towards making the game look "professional", and would benefit the readability of languages with complex glyphs (e.g. Japanese).

Here are my two ideas for how to approach this:

  • Instead of rendering everything to a single texture that gets scaled up, use a mixture of "internal size" and "window size" textures, with graphics being on the former and text being on the latter. This could get quite complex, especially with overlapping loot tooltips.
  • Like the previous idea, but only use two layers; one for graphics, one for text. To handle graphics that overlap text, a "mask" would be generated and applied to the text layer. Unfortunately, text behind semi-transparent graphics would likely be masked out with this method. I also have no idea how we'd go about generating such a mask.

dorkster avatar Sep 25 '19 14:09 dorkster

I think something like the second approach should be sufficient. However, I suggest the following adjustment:

The second layer doesn't just handle text but rather the entire UI, including menus and tooltips, etc. This way there should never be any issues with graphics overlapping text.

jtrees avatar Sep 25 '19 23:09 jtrees

The second layer doesn't just handle text but rather the entire UI, including menus and tooltips, etc. This way there should never be any issues with graphics overlapping text.

The problem with this is that the UI graphics are still raster images. So even if we made higher resolution UI graphics, they would still need to be scaled at some point. In contrast, the text layer could always be 1:1 with the window size.

dorkster avatar Sep 25 '19 23:09 dorkster

Perhaps using a library (e.g. MyGUI) would help?

jtrees avatar Sep 28 '19 09:09 jtrees