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

[OSX] SETX[Y] not ignored in SetFallbackFont #4001

Closed
DorpsGek opened this issue Aug 2, 2010 · 4 comments
Closed

[OSX] SETX[Y] not ignored in SetFallbackFont #4001

DorpsGek opened this issue Aug 2, 2010 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Aug 2, 2010

Rubidium opened the ticket and wrote:

SETX[Y] in "str" are not ignored by SetFallbackFont. So whenever a string is passed that uses that the string "conversion" will not do what you expect it to do; it will fail or horribly mess up the string.

Reported version: 1.0.2
Operating system: Mac OS X


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

DorpsGek commented Oct 8, 2010

planetmaker wrote:

Can you possibly elaborate a bit how or where the other OS treat that? It seems that str is not referenced in any of the three SetFallbackFont routines...


This comment was imported from FlySpray: https://bugs.openttd.org/task/4001#comment8887

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 8, 2010

Rubidium wrote:

Other OSes don't need it because for them the language ID/ISO code works just fine. For Mac OS X the actual string has to be processed.

There are plenty of places, where SETX[Y] is handled, that will show you how to handle those, e.g. in gfx.cpp. Furthermore it might be needed to ignore/remove the other OpenTTD specific characters from the strings as well.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4001#comment8889

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Might want to ignore the text direction ({LRM} etc), string control code ({WEIGHT} etc), and special sprite ({LORRY} etc) characters as well. The {xyz} is how you input it in strgen; they are all translated to some unicode character. SCC_CONTROL_[START|END], SCC_SPRITE_[START|END] and IsTextDirectionChar() might be of use for this.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4001#comment8974

@DorpsGek
Copy link
Member Author

planetmaker closed the ticket.

Reason for closing: Implemented

In r21197


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

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant