{"id":31913491,"url":"https://github.com/sl-ru/sfam_generator","last_synced_at":"2026-03-11T17:02:43.128Z","repository":{"id":92122120,"uuid":"54280596","full_name":"SL-RU/sfam_generator","owner":"SL-RU","description":"Simple scripts for generating bit fonts for STM32, AVR, Arduino or other MCU, game and etc.","archived":false,"fork":false,"pushed_at":"2016-03-23T11:52:21.000Z","size":188,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-24T01:03:26.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/SL-RU.png","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-19T18:18:35.000Z","updated_at":"2024-01-23T05:31:09.000Z","dependencies_parsed_at":"2023-03-30T23:12:39.936Z","dependency_job_id":null,"html_url":"https://github.com/SL-RU/sfam_generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SL-RU/sfam_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SL-RU%2Fsfam_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SL-RU%2Fsfam_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SL-RU%2Fsfam_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SL-RU%2Fsfam_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SL-RU","download_url":"https://codeload.github.com/SL-RU/sfam_generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SL-RU%2Fsfam_generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016623,"owners_count":26085853,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-13T18:49:36.322Z","updated_at":"2025-10-13T18:50:23.306Z","avatar_url":"https://github.com/SL-RU.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Simple Font And Image generator\n\nSimple scripts for generating bit fonts for STM32, AVR, Arduino or other MCU, game and etc.\n\n#How to use Font Generator\n\n1) Install python 3.4 or newer\n\n2) Install [PILLOW](http://python-pillow.org/):\n\n```Bash\npip install Pillow\n```\n\n3) Select font and place it in the folder with scripts\n\n4) Edit config.py\n\n5) run GenerateFontBitmap.py, it will be create and open image with name as bitmap_png value:\n\n```\npython GenerateFontBitmap.py\n```\n\n6) Check and edit bitmap_png. Regenerate font if thats required.\n\nCheck this:\n\n* All chars must be in their cells\n* If cell is blue, that means it's height more then default and it was offseted up.\n* Check if white pixels isn't on cell outline. Like this ![alt text](https://raw.githubusercontent.com/SL-RU/sfam_generator/master/screenshots/bad.png)\n\nIf something wrong you can change anything in any image editor.\n\nGood font must be look like:\n![](https://raw.githubusercontent.com/SL-RU/sfam_generator/master/screenshots/normal.png)\n\n7) Generate code with:\n```\npython BitmapFontToCode.py\n```\n\n8) DONE! Use this font wherever you want! For example:\n![](https://raw.githubusercontent.com/SL-RU/sfam_generator/master/screenshots/cons1.png)\n![](https://raw.githubusercontent.com/SL-RU/sfam_generator/master/screenshots/cons2.png)\n\n#How to use Image generator:\n\n1) Edit \"png\" value in ImageToCode.py. That is a path to image.\n\n2) Generate code and file:\n```\npython ImageToCode.py\n```\nYou can find usage of generated code here: https://github.com/SL-RU/stm32libs/blob/master/HAL/ssd1306/ssd1306.c in function void ssd1306_image(uint8_t *img, uint8_t x, uint8_t y)\n\nVideo: http://www.youtube.com/watch?v=g6N0J6xSCS0\n\n#How to use font with [my ssd1306 stm32 library](https://github.com/SL-RU/stm32libs/tree/master/HAL/ssd1306):\n\n1) Add defenition in fonts.h\n![](https://raw.githubusercontent.com/SL-RU/sfam_generator/master/screenshots/keil2.png)\n\n2) Add generated font data to fonts.c and set params\n```\nconst uint8_t customfont[] = {\n  //output_file text\n};\nFontDef_t custom_font = {\n\twidth,\n\theight,\n\tbyte width, //in the end of output BitmapFontToCode.py\n\tcustomfont\n};\n```\n![](https://raw.githubusercontent.com/SL-RU/sfam_generator/master/screenshots/keil1.png)\n\nGood luck!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsl-ru%2Fsfam_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsl-ru%2Fsfam_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsl-ru%2Fsfam_generator/lists"}