Skip to content

(experimental) full Codepage 437 support in scrolling text #281

@softhack007

Description

@softhack007

feature proposal

Scrolling text only supports standard ASCII characters 32-126, and excludes all special "codepage" characters above 126 - for example German Umlaut, Nordic, French, and ascii "block art characters".

In fact the source code wled00/src/fonts has the full "codepage 437" included, but commented out to save flash space - roughly saving ~6-10 KB flash.

https://en.wikipedia.org/wiki/Code_page_437

Image

Possible Solution

We could allow to use the full codepage as an option, for users who can tolerate the increased firmware size:

  • verify if WebUI, JSON and XML endpoints already use UTF-8 encoding (should be, but not sure)
  • make the compilation of the full font tables optional, for example guarded with #ifdef WLED_FULL_CP437
  • change void Segment::drawCharacter() to first translate the segment name from UTF-8 to CP437, then use the resulting font index to also draw "extended" ASCII characters.
  • maybe include the "€" (Euro) symbol from CP858 as an additional character

Additional Context

This could allow users - with some coding effort - to also add support for their local writing system. It would just be necessary to replace parts of the wled00/src/fonts/*.h files with letters from another codepage, then adjust the UTF-8 translation function in Segment::drawCharacter(), and recompile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfxed in mdevfixed in latest mdev source code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions