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

Resolve a problem in font generation when y_offset is negative. #1268

Merged
merged 5 commits into from
Dec 27, 2021

Conversation

richardclli
Copy link
Collaborator

@richardclli richardclli commented Dec 17, 2021

Fixes #1199

Summary of changes:

  • fixed a problem in font bitmap generation when y_offset is negative
  • fixed missing special char because of hardcoded list (use dynamic list instead just like cjk) only for color radios
  • isolated encoding method for B/W radios
  • fixed B/W radio encoding based on the fixed fonts

@pfeerick pfeerick added bug 🪲 Something isn't working translation labels Dec 17, 2021
@richardclli
Copy link
Collaborator Author

Found some char is wrong mapping in other languages, will try to fix as well.

@richardclli
Copy link
Collaborator Author

Can anybody help to test different languages? This should fix all languages wrong char problem.

@pfeerick
Copy link
Member

I can build a set of all of them if needed, but would need some native/bilingual people to actually test/read it...

@richardclli
Copy link
Collaborator Author

I will try to test a few one anyway. It is interesting that this problem is here for some time but seems nobody reported this.

@richardclli
Copy link
Collaborator Author

And well, it should works anyway, now the CJK and other languages shared the same code in special character handling. The differences are just the code mapping, CJK used 2 byte encoding while others use the remaining space besides standard and extended, and I checked the language that has the most special character (CZ) and it seems ok in the simulator.

@richardclli
Copy link
Collaborator Author

I have tested 5 languages in my TX16S (en, cn, tw, es, cz) , all looks good. I think now need somebody to test the lowest config of a B/W radio with languages (en, es, and cz), and if these are ok, other languages should be good to go.

@richardclli
Copy link
Collaborator Author

richardclli commented Dec 21, 2021

@pfeerick As this will not affect B/W radios, I think it is good to merge now. Should merge to 2.6 branch as well.

@pfeerick pfeerick added this to the 2.6 milestone Dec 21, 2021
@pfeerick
Copy link
Member

Sounds good to me... I'll give it a try later today and merge/cherrypick across.

@richardclli
Copy link
Collaborator Author

richardclli commented Dec 21, 2021

The old code tried to translate these Upper case to lower case:
"Č": "č",
"Ě": "ě",
"Š": "š",
"Ú": "ú",
"Ů": "ů",
"Ž": "ž"

Not sure about the purpose, but it seems no harm for not doing translations, characters can still properly displayed anyway.

@pfeerick pfeerick self-assigned this Dec 21, 2021
@pfeerick
Copy link
Member

pfeerick commented Dec 21, 2021

To me... these pictures say it all (before and after) 😁

image
image
image

The lower case conversion may be used by the B&Ws... i.e.

image

Whilst the after for X9D+2019 is an improvement... I believe it should be telemetría

@richardclli
Copy link
Collaborator Author

richardclli commented Dec 21, 2021

Let me check the B/W font and see if Uppercase chars missing. Umm......... B/W used fixed fonts, encoding may have a problem then. Let me check how B/W fonts are managed first. Fixed fonts requires fixed encoding, and dynamic encoding will break anyway.

@pfeerick
Copy link
Member

Just another sample for you

image

@richardclli
Copy link
Collaborator Author

I think I will try to isolate B/W and color encoding method, based on the fonts used.

@richardclli
Copy link
Collaborator Author

I used a fixed encoding for B/W LCD that matches the font files, hope this solves the problems in B/W LCD. @pfeerick Please help to do some tests.

@richardclli
Copy link
Collaborator Author

richardclli commented Dec 24, 2021

A few before/after images for cz and es, all looks good now.

IMG 001
IMG 008
IMG 009
IMG 012
IMG 013

Copy link
Member

@pfeerick pfeerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on sampling a few languages and comparing with source text. Lets see if any nightly users complain! 😁

@pfeerick pfeerick merged commit 230ac34 into EdgeTX:main Dec 27, 2021
pfeerick pushed a commit that referenced this pull request Dec 27, 2021
…uages, and some wrong characters used (#1268)

* Resolve a problem in font generation when y_offset is negative.

* Change to use full dynamic detection of special chars, generalized for all languages including cjk.

* Isolated colorlcd and bwlcd translation encoding method.

* Fixed the cz char mapping.

* Only cz requires subset lowercase handling.
stephenaa pushed a commit to stephenaa/edgetx that referenced this pull request Dec 28, 2021
…uages, and some wrong characters used (EdgeTX#1268)

* Resolve a problem in font generation when y_offset is negative.

* Change to use full dynamic detection of special chars, generalized for all languages including cjk.

* Isolated colorlcd and bwlcd translation encoding method.

* Fixed the cz char mapping.

* Only cz requires subset lowercase handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compiled in spanish have a line above
2 participants