{"id":16616747,"url":"https://github.com/stecman/unicode-input-panel","last_synced_at":"2025-10-29T19:31:18.360Z","repository":{"id":192698027,"uuid":"686481508","full_name":"stecman/unicode-input-panel","owner":"stecman","description":"A human interface device to input any Unicode character","archived":false,"fork":false,"pushed_at":"2023-09-24T06:47:21.000Z","size":1350,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T04:31:51.561Z","etag":null,"topics":["cpp","embedded","firmware","pi-pico","pico"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stecman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-02T23:56:46.000Z","updated_at":"2024-10-08T08:33:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"64024e95-78fd-4348-9a32-7732b6f3439e","html_url":"https://github.com/stecman/unicode-input-panel","commit_stats":null,"previous_names":["stecman/unicode-input-panel"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Funicode-input-panel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Funicode-input-panel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Funicode-input-panel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stecman%2Funicode-input-panel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stecman","download_url":"https://codeload.github.com/stecman/unicode-input-panel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238882226,"owners_count":19546465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","embedded","firmware","pi-pico","pico"],"created_at":"2024-10-12T02:14:07.148Z","updated_at":"2025-10-29T19:31:17.839Z","avatar_url":"https://github.com/stecman.png","language":"C","readme":"# UNICODE Input Terminal\n\n![Front panel illustration](drawings/front-panel-design-rendered.png)\n\nClassic binary data entry meets modern Unicode: 144K characters at your\nfingertips. A physical user interface to enter any UTF-8 sequence over USB.\n\nA display shows a preview of the selected glyph(s), along with metadata about\nthe codepoint - all rendered entirely on-device. Tens of megabytes of font\nfiles are required to render glyphs, which are read from an SD card.\n\nSee the [Hackaday project page](https://hackaday.io/project/192644-unicode-binary-input-terminal) for more detail about the build.\n\n\n## Getting started\n\nParts and wiring can be found in the schematic. The gist is:\n\n - Raspberry Pi Pico\n - A bunch of switches (8x latching toggle, 1x 3-position momentary, 1x 2-position momentary)\n - ST7789 based display (ideally 280x240, but other resolutions could be made to work)\n - SD card receptacle of some form that can be connected via SPI\n\nA pre-built `.uf2` firmware image can be downloaded from the [releases page]()\nif you don't want to build the code yourself.\n\nA package of fonts can be downloaded from the [releases page](). These need to\nbe placed in a folder called `fonts` at the root of a FAT-formatted SD card. If\nyou want to bring your own fonts, see the *Preparing fonts* section towards the\nend of this readme.\n\n\n## Developing\n\nYou'll need an internet connection for the initial configuration as CMake will\nautomatically download several dependencies to build from source (FreeType,\nlibpng, zlib), and some of [Unicode's data tables](https://unicode.org/Public/UNIDATA/).\n\n### Building for desktop\n\nFor fast development and debugging, builds can target the host computer. This\nrenders a virtual screen using SDL2, and doesn't use the Pico SDK at all.\n\n```sh\n# Install SDL2 from your package manager\napt-get install libsdl2-dev\n\n# Configure the build\ncd firmware\nmkdir build\ncd build\ncmake ../ -DPICO_PLATFORM=host\n\n# Compile\nmake -j4\n\n# Run the application\n./firmware path/to/fonts/\n```\n\n### Building for the Pico (command line, Linux)\n\nFirst:\n\n - Install `cmake` and `gcc-arm-none-eabi` from your package manager\n - Install the [Raspberry Pi Pico SDK](https://github.com/raspberrypi/pico-sdk)\n   and set the `PICO_SDK_PATH` environment variable to point to it.\n\nThen:\n\n```sh\n# Configure the build\ncd firmware\nmkdir build\ncd build\ncmake ../\n\n# Build firmware image\nmake -j4\n```\n\nThis will give you a file `firmware.uf2` in the build directory, which can be\ncopied to the Pico (when started with the BOOTSEL button held).\n \n\n### WASM build\n\nThe project can also be built to Web Assembly using Emscripten:\n\n```sh\n# In a fresh build directory\nemcmake cmake -DFONTDIR=path/to/fonts ../\nemmake make -j4\n```\n\n## Notes\n\n### Preparing fonts\n\nIf you want to use fonts other than those in the [prepared bundle](https://github.com/stecman/unicode-input-panel/releases/tag/1.0)\non the device, there are some considerations: FreeType is fairly sparing with\nits memory use, but it still requires loading some sections of a font entirely\ninto memory during initial load/open (`FT_Open_Face`).\n\n- From observation, OTF fonts seem to require more memory to open than TTF fonts.\n  The fonts in the prepared bundle were all converted to TTF using [otf2ttf](https://github.com/awesometoolbox/otf2ttf).\n\n- Fonts with many thousands of glyphs like NotoSansJP can be too large to open\n  on the Pico, even in TTF format. A couple of these large fonts were split\n  into smaller font files with around 500 glyphs each using `pyftsubset`, with\n  some logic in `scripts/split-font.py` to keep codepoints used in ligatures\n  together to preserve that GSUB table data.\n\n### Changing the embedded UI font\n\nA compact version of Open Sans Regular is built into the firmware for use in the UI,\nwhich only needs basic ASCII glyphs. This is about 5x smaller than the original,\navoiding wasted flash space.\n\nFonts can be stripped like this using the `pyftsubset` utility from [fonttols](https://github.com/fonttools/fonttools):\n\n```sh\npython3 -c 'for i in range(0x20, 0x7D): print(\"U+%04X\" % i)' \u003e ascii-codepoints.txt\npyftsubset SomeFont.ttf --output-file=SomeFont-stripped.ttf --unicodes-file=ascii-codepoints.txt\n```\n\n### Debugging memory issues\n\nIf you're getting out of memory panics, malloc debugging messages can be\nenabled with `-DPICO_DEBUG_MALLOC=1` (prints detail of every allocation to\nthe serial port).\n\n\n## Attribution\n\nThis project includes copies of:\n\n - [FatFS SD SPI for Raspberry Pi Pico](https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico),\n   which contains [FatFS](http://elm-chan.org/fsw/ff/00index_e.html). This is included as\n   source in the repository because it need slight tweaks to build correctly.\n\n - A stripped down version of the [OpenSans](https://github.com/googlefonts/opensans)\n   Regular font is included in this repository: Copyright 2020 The Open Sans Project Authors\n\n - The releases page has an archive with redistribution of the Noto Regular fonts\n   ([noto-fonts](https://github.com/googlefonts/noto-fonts/) and\n   [noto-emoji](https://github.com/googlefonts/noto-emoji)): Copyright 2018 The Noto Project Authors\n\nThe respective licenses for these are included with the associated files.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstecman%2Funicode-input-panel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstecman%2Funicode-input-panel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstecman%2Funicode-input-panel/lists"}