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

Impossible to switch from big/tiny font back to normal in strings #6465

Closed
DorpsGek opened this issue May 15, 2016 · 4 comments
Closed

Impossible to switch from big/tiny font back to normal in strings #6465

DorpsGek opened this issue May 15, 2016 · 4 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

dp opened the ticket and wrote:

There are {BIG_FONT} and {TINY_FONT} control codes but no {NORMAL_FONT} or something.
So it's only possible to use normal font at the beginning of the string.

Reported version: 1.6.0
Operating system: All


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

frosch wrote:

The text renderer also does not support different font sizes in the same text.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6465#comment14181

@DorpsGek
Copy link
Member Author

dp wrote:

Really? Looks fine to me. That's also why I marked it as bug since it doesn't seem to be intended.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6465#comment14182

@DorpsGek
Copy link
Member Author

dp wrote:

Made a pretty straightforward patch that adds {NORMAL_FONT} and {MONO_FONT} control codes, seems to work ok even in weird combinations.
Also attached simple gs for testing that just shows popup message.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6465#comment14207

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
@TrueBrain
Copy link
Member

Looks simple enough; not sure if we want it, but 1 remark on the patch:

With 2 an if() is fine, but now with 4 it becomes a bit much. Especially as a few places map from SCC_NNNFONT to FS_NNN. Maybe a tiny function that does this lookup via a switch or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) good first issue Good for newcomers patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

2 participants