{"id":13802211,"url":"https://gitlab.com/mhepp63/ili934x-micropython","last_synced_at":"2025-05-13T13:30:26.335Z","repository":{"id":62309773,"uuid":"14658643","full_name":"mhepp63/ili934x-micropython","owner":"mhepp63","description":"Library for  using ILI9341 display drivers with Micropython","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":null,"default_branch":"master","last_synced_at":"2024-08-05T00:07:05.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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":null,"metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-04T21:00:35.563Z","updated_at":"2024-01-30T18:45:57.567Z","dependencies_parsed_at":"2022-10-30T13:45:46.569Z","dependency_job_id":null,"html_url":"https://gitlab.com/mhepp63/ili934x-micropython","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/mhepp63%2Fili934x-micropython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/mhepp63%2Fili934x-micropython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/mhepp63%2Fili934x-micropython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/mhepp63%2Fili934x-micropython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/mhepp63","download_url":"https://gitlab.com/mhepp63/ili934x-micropython/-/archive/master/ili934x-micropython-master.zip","host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4515906,"owners_count":6543,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:39.146Z","updated_at":"2024-11-18T17:31:10.907Z","avatar_url":null,"language":null,"funding_links":[],"categories":["Libraries"],"sub_categories":["Display"],"readme":"# ILI934x-micropython\n\nLibrary for  using ILI9341 display drivers with Micropython. Based on \n  * [micropython-ili9341](https://github.com/jeffmer/micropython-ili9341.git) -- core of library and basic functions\n  * [Loboris Micropython port](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo) -- font format and tool for creating C font files (used in original Loboris MP port)\n\nThis library have restricted capabilities, because I do not need draw thing like triangles, circles, etc. You can draw text (with own font), draw images, rectangular, set specified color to specified pixel...\n\n## Usage\n\n### Example\n\n## Images format\n\nSource images must be with indexed color schema, in required size (no scaling)\n\n### Tools for image creation\n\n\n\n## Font format\n\nFont drawing is based on Loboris work -- use his font format translated to PY lib\n\nGreat thing is, you can have only chars, which you want to use. Unnecessary characters can be removed to save memory.\n\nPart of this repository is base font - rcr12.py (Roboto Condensed Regular, 12px)\n\n### Format description\n\nfont itself is organised as bytearray, where first 4B are header and rest is description of each character included:\n\n| header | 4B  |\n|--------|-----|\n| char1  | nB  |\n| char2  | nB  |\n| ...    | ... |\n| charN  | nB  |\n\nHeader bytes:\n\n| 1    | 2          | 3    | 4    |\n|------|------------|------|------|\n| 0x00 | font heigh | 0x00 | 0x00 |\n\nAnd each character have format:\n\n| char       | y\\_offset                 | width                     | height                     | x\\_offset                 | x\\_delta                     | data...                 |\n|------------|---------------------------|---------------------------|----------------------------|---------------------------|------------------------------|-------------------------|\n| 1B, ord(c) | 1B, Offset in Y dimension | 1B, width of visible area | 1B, height of visible area | 1B, Offset in X dimension | 1B, Effective height of char | nB, encoded char,       |\n| 'A' = 0x41 |                           |                           |                            |                           |                              | ((w\\*h)\\/8) + 1 if rest |\n\n\n```\nq_char = b'q\\x06\\x06\\n\\x02\\x0a=\\x14QE\\x13\\xc1\\x04\\x10'\n```\n\n```\nchar: q\n   w: 06,    h:10\nxoff: 02, yoff:06\nxdel: 10, fnth:12\n\n+------x delta-----+\n+xoff+---width---+ |\n|    |           | |\n 0 1 2 3 4 5 6 7 8 9\n . . | . . . . . | . |00--+--+\n . . | . . . . . | . |01  Y  |\n . . | . . . . . | . |02  o  f\n . . | . . . . . | . |03  f  o\n . . | . . . . . | . |04  f  n\n . . | . . . . . | . |05  |  t\n-----+--########-+-- |06--+  h\n . . |## . . .## | . |07  |  e\n . . |## . . .## | . |08  h  i\n . . |## . . .## | . |09  e  g\n . . |## . . .## | . |10  i  h\n . . |## . . .## | . |11  g  t\n_____|__########_|__ |12- h -+\n . . | . . . .## | . |13  t\n . . | . . . .## | . |14  |\n . . | . . . .## | . |15--+\n\n```\n\nHeader and all characters are in continous bytearray, terminated with 0xFF on position of last char.\n\nLibrary `font.py` expects existing variable mvfont, which is memoryview containing described bytearray.\n\n\n### Tools for font creation\n\nFirst tool is ''ttf2c_vc2003.exe'', which convert TTF file to C source file.\n\nThis is a command line Windows program, but can be used under Linux with wine:\n\nUsage:\n\n```\nttf2c_vc2003.exe \u003cpoint-size\u003e \u003cinput-file\u003e \u003coutput-file\u003e [\u003cstart_char\u003e \u003cend_char\u003e]\n```\n\nor, under Linux:\n\n```\nwine ./ttf2c_vc2003.exe \u003cpoint-size\u003e \u003cinput-file\u003e \u003coutput-file\u003e [\u003cstart_char\u003e \u003cend_char\u003e]\n```\n\nExample:\n\n```\nwine ./ttf2c_vc2003.exe 18 Vera.ttf vera.c\n```\n\nAfter the c source is created, use second tool: `c2py_font_gen.py`. This one generates python source code, which can be used directly in ili934x library.\n\nUsage:\n\n```\nc2py_font_gen.py -i \u003cinput-C-file\u003e -o \u003coutput-PY--file\u003e\n```\n\n\n\n\n## Limitations\n\n * Not deeply tested, maybe bugs inside\n * Drawing text is slow.\n * Only 16bit color formats\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fmhepp63%2Fili934x-micropython","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fmhepp63%2Fili934x-micropython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fmhepp63%2Fili934x-micropython/lists"}