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

Ù (U+00D9) no displayed for large fonts #4870

Closed
DorpsGek opened this issue Dec 4, 2011 · 8 comments
Closed

Ù (U+00D9) no displayed for large fonts #4870

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

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Dec 4, 2011

planetmaker opened the ticket and wrote:

For both sets that character is not available in the large font (e.g. Newspaper headings) and shown as '?' instead. It's sprite # 635 in the base grf.

trunk r23419

Reported version: trunk
Operating system: All


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

DorpsGek commented Dec 4, 2011

Rubidium wrote:

Sprite 635 of the (original) base GRF is basically worthless; it's a whole string of characters. So somewhere in the code that character and many others are "removed".

What we could do is remove this revoking and action A replace the sprites with the correct sprite in openttd.grf. Though then we should probably do so for all large characters that are 'rejected' from the base grf.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4870#comment10536

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 5, 2011

frosch wrote:

Related coop task: http://dev.openttdcoop.org/issues/3314

So, IMO: If someone draws all the character for openttd.grf, we can remove that stuff. If not, then OpenGFX shall use Action 12 :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/4870#comment10537

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2011

PaulC wrote:

I've already drawn all of the missing characters for both base sets, they just to be arranged into proper sprite sheets before thay can be coded. If possible it would be useful to know in advance which characters in which fonts can be replaced using action A, then I can keep all of those together and seperate from the action 12 characters.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4870#comment10542

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2011

planetmaker wrote:

Well, we can supply all. Those which have no recongnizable or completely bogus (like sprite # 635) form in trg1.grf can be actionA replaced, the others can be added via action12. I haven't yet prepared an exact list, but something like http://mz.openttdcoop.org/opengfx/newgrf.php?1=2:700 will give us an idea which we can actionA replace (all basically empty ones). We can action12 replace the characters where OpenTTD has its special characters like the plane symbol and similar.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4870#comment10543

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2011

PaulC wrote:

OK, I've had another look at http://hg.openttd.org/openttd/trunk.hg/file/tip/src/table/unicode.h and compared it to the base set, so I think I can see which characters we can action A and which sprites they correspond to. There were just two characters on that list that I'm not sure about:

60 	{ 0x0178, 0x9F }, // Capital letter Y with diaeresis -- seems to work just fine with no action 12/A

61 	{ 0x010D, 0x63 }, // Small letter c with caron -- is this really in the base set, and if so where?

Otherwise it looks reasonably straightforward. I'll try and put something together in the next day or so.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4870#comment10544

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 7, 2011

planetmaker wrote:

Yes, those two lines are needed but need no(t much) attention in this context.

Indeed both characters are in the base set, but at a different place than they should be by the unicode / utf-8 standards, this is the mapping from the unicode place to the TTD place. unicode character 0x178 is found instead at position 0x9F (which corresponds to sprites 2 + 0x9F - 0x20 = 129 (normal), 226 + 0x9F - 0x20 = 353 (tiny) and 450 + 0x9F - 0x20 = 577 (large).

Similar should be true for the small c with caron, but in this case it is simply mapped to the normal letter 'c' - why ever. It is already existing and action12 replaced in the extra grfs and cannot be actionA replaced.

What we can do is actionA replace all those empty sprites which could be a letter which we have in the base grf.

We need to use Action12 for these characters as they are occupied by special symbols:
{ 0x00A0, 0x20 }, // Non-breaking space / Up arrow
{ 0x00AA, CLRA }, // Feminine ordinal indicator / Down arrow
{ 0x00AC, CLRA }, // Not sign / Tick mark
{ 0x00AD, 0x20 }, // Soft hyphen / X mark
{ 0x00AF, CLRA }, // Macron / Right arrow
{ 0x00B4, CLRA }, // Acute accent / Train symbol
{ 0x00B5, CLRA }, // Micro sign / Truck symbol
{ 0x00B6, CLRA }, // Pilcrow sign / Bus symbol
{ 0x00B7, CLRA }, // Middle dot / Aircraft symbol
{ 0x00B8, CLRA }, // Cedilla / Ship symbol
{ 0x00B9, CLRA }, // Superscript 1 / Superscript -1
{ 0x00BC, CLRA }, // One quarter / Small up arrow
{ 0x00BD, CLRA }, // One half / Small down arrow

The rest mentioned in unicode.h probably can be ActionA replaced, which is basically all where CLRL is used to clear the large glyph due to being ugly / not present / wrong; best example is the sprite 635 (U+00D9) which should be an Ù.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4870#comment10546

@DorpsGek
Copy link
Member Author

PaulC wrote:

Right, I've mentioned previously to Rubidium about redrawing the characters in openttd.grf (currently they are taken from OGFX which is not a good match for the original base set) and about adding new characters to provide additional language support etc. Taking all of the above into account as well I've ended up doing a complete redraw and rewrite of the existing files. To summarise this includes:

* All additional OTTD characters redrawn to match the original base set
* New latin letters including those missing from existing translations
* New symbols including a broad selection of currency signs
* All missing base set characters added using action A/12 as appropriate
* Fixed some bugs in the original base set, also redrawn some letters with diacritics to keep them consistant and properly distinguishable (trg1 is a bit of a mess in this regard)

The action A's require the following sprites in the base set to be reactivated: # 384, 582, 584, 585, 586, 587, 592, 594, 595, 596, 597, 604, 608, 626, 633, 634, 635, 640, 648, 658, 665, 666 and 672.

Crits and comments welcome.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4870#comment10577

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r23582. Thanks for the graphics.


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

@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