Open Districh-ru opened 1 week ago
Hi @Districh-ru , would you be okay to merge this change after 1.1.1 release? I am worried that since we are getting close to the release we might face some issues with such a big change.
Additionally, I noticed that the text is rendered differently with these changes. Is it intentional?
Additionally, I noticed that the text is rendered differently with these changes. Is it intentional?
If you are talking about the MultiFontText: previously the next line offset was considered as the biggest line height of all texts. IMHO it was done to easily calculate text height ( lines_count * line_height ).
Now the next line offset is the height of the current font in which the \n
is used: like it is used to work in most modern text editors. It can be changed to the previous implementation if it is needed. It can be discussed.
If this differences are in the fheroes2::Text
then please let me now where it is - I'll fix it.
This PR changes the fheroes2::Text behavior to calculate text parameters only once and then use them for width, height, rows count and rendering.
This PR changes all texts rendering including buttons text.