FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: RFC: Inline Rendering / Styled multiline text / Font issues  (Read 2212 times)

phoku

  • Developer
  • Full Member
  • *
  • Posts: 102
    • View Profile
    • IZ dev blog
RFC: Inline Rendering / Styled multiline text / Font issues
« on: January 31, 2008, 04:08:30 am »

One missing feature which has bugged me for a long time,
is that inside a gui widget it is hard or next to impossible
to create a multiline label.

While tackling this would probably a very self-contained task
i consider aiming a bit higher:

In a text the game/gui designers should be be able to
mark up which text parts get a bold face, a red color
and so on. The current font handling is too simplistic
to allow that.

I think that this would need an enhanced font handling
inside the engine gui code that fonts can be referenced by
the markup by names/identifiers.

Step 1:
Rework font handling in the engine so that
GUIManager.getFont("name") works.
Remove Font handling code from pychan.
Inspect current font definitions.

Step 2:
Design and integrate a tiny markup
for multiline texts, automatic wrapping
would be nice. Kerning would be awesome,
but probably too hard.

Basically get a renderMultiLineText()
function integrated somewhere sane.

Let the floating bubbles use that.
Write a MultiLineLabel (or something similar).

--

I don't think this feature is not a showstopper
but a nice too have. I would volunteer to add
it over some time.

So what do you think?

-phoku




Logged

jasoka

  • Developer
  • Jr. Member
  • *
  • Posts: 51
    • View Profile
Re: RFC: Inline Rendering / Styled multiline text / Font issues
« Reply #1 on: January 31, 2008, 09:30:13 am »

adding some markup support sounds like a nice idea. Did you already check the implementation of
Image* FontBase::getAsImageMultiline(const std::string& text) ?

Implementation residing in FontBase should be usable both in guichan widgets and in plain video area (floating texts, coordinates...)

Logged