Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StoryPage and BIG_FONT #5617

Closed
DorpsGek opened this issue Jun 25, 2013 · 6 comments
Closed

StoryPage and BIG_FONT #5617

DorpsGek opened this issue Jun 25, 2013 · 6 comments
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

idioty opened the ticket and wrote:

If I create more element, and I use {BIG_FONT} in any element, the Story Page region is small. The last elements not visible.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5617
@DorpsGek
Copy link
Member Author

Zuu wrote:

Usage of font size modifiers was not considered when the StoryBook was implemented. All content will take a multiplier of the normal font size in height. One solution would be to try to block usage of font size modifiers.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5617#comment12347

@DorpsGek
Copy link
Member Author

Rubidium wrote:

I think that the story page entries should get line wrapped as well. If that gets done, then the {BIG_FONT} support is essentially done as well.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5617#comment12407

@DorpsGek
Copy link
Member Author

Zuu wrote:

From what I've understood the code that draw multi-line text, it do not work well with text that uses more than one font-size within the text block. The same goes for the computation of how many pixels of height that a a multi-line text needs.

Last time I had a look at this was before the new text layout changes. Thus it may have changed since then.

That being said, with line wrapping it is possible to support a paragraph consisting of just large, medium or small text. And when/if the text backend support multi-line text with varying text size, the story book will automatically also support that.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5617#comment12522

@DorpsGek
Copy link
Member Author

Zuu wrote:

A fix that involves correctly calculating the content height and line warping has been produced.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5617#comment12607

@DorpsGek
Copy link
Member Author

Alberth wrote:

+ int rest = height % line_height;
+ return height / line_height + (rest > 0 ? 1 : 0);
can also be written as

return (height + line_height - 1) / line_height;


This comment was imported from FlySpray: https://bugs.openttd.org/task/5617#comment12608

@DorpsGek
Copy link
Member Author

Zuu closed the ticket.

Reason for closing: Fixed

In r25768


This comment was imported from FlySpray: https://bugs.openttd.org/task/5617

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Goal/Game script labels Apr 7, 2018
@frosch123 frosch123 added the component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) label Apr 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

2 participants