8
\$\begingroup\$

I need to have some text showing up in my Godot game in a way that each character overlaps the character directly to its right, like so:

     -- ---    -- --
   /  /     \ |  |  |
  /  /       \|  |  |
 /  /  /---\  \  |   ----
/  /  /  \  \  \ |       |
-- --     -- -- - -------

Using a BMFont (.fnt) in a Label node with the values of xadvance specified in the font smaller than the characters width I get this:

     -- ---    -- --
   /  /     \ |  |  |
  /  /       \|  |  |
 /  /  /---\  |  |   ----
/  /  /  \  \ |  |       |
-- --     -- -- - -------

What approach can I use to still be able to use my .fnt font and also store the text with the characters in their natural order, as it would be stored for using with a normal Label or Button control? Which would help for language localization purposes.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Hack the source, draw in the opposite order? github.com/godotengine/godot/blob/master/scene/gui/… \$\endgroup\$
    – hangar
    Commented Jan 14, 2021 at 22:59
  • 2
    \$\begingroup\$ @hangar it seems it could be accomplished very easily making a few changes to that segment of the source code. I'll be more than happy to award you the bounty if you post an answer with the corresponding snippet of code. \$\endgroup\$
    – rraallvv
    Commented Jan 15, 2021 at 12:44

0

You must log in to answer this question.

Browse other questions tagged .