{"id":29311674,"url":"https://github.com/nickscha/ttf_to_c89","last_synced_at":"2026-05-16T22:35:51.687Z","repository":{"id":302884316,"uuid":"1013818571","full_name":"nickscha/ttf_to_c89","owner":"nickscha","description":"converts a ttf font file to BMP and a C89 compatible header","archived":false,"fork":false,"pushed_at":"2025-07-04T16:03:46.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T16:06:55.890Z","etag":null,"topics":["bmp","c89","font-atlas","ttf-fonts"],"latest_commit_sha":null,"homepage":"","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/nickscha.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,"zenodo":null}},"created_at":"2025-07-04T14:12:11.000Z","updated_at":"2025-07-04T16:03:50.000Z","dependencies_parsed_at":"2025-07-04T16:07:52.011Z","dependency_job_id":"37dcc88c-8aae-48d7-a224-47671f53abf1","html_url":"https://github.com/nickscha/ttf_to_c89","commit_stats":null,"previous_names":["nickscha/ttf_to_c89"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nickscha/ttf_to_c89","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fttf_to_c89","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fttf_to_c89/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fttf_to_c89/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fttf_to_c89/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickscha","download_url":"https://codeload.github.com/nickscha/ttf_to_c89/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fttf_to_c89/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33121334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bmp","c89","font-atlas","ttf-fonts"],"created_at":"2025-07-07T08:15:53.919Z","updated_at":"2026-05-16T22:35:51.681Z","avatar_url":"https://github.com/nickscha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ttf_to_c89\nA small python utility that converts a given ttf font file into a single row font atlas of all ASCII printable characters as a BMP and C89 header file.\n\n## Quick Start\n\nInstall pillow package if not available and run the python file.\n\n```sh\npip install pillow\n\npython ttf_to_c89.py\n```\n\nAfterwards a font_atlas.bmp single row bitmap and a C89 compatible font.h file are generated.\n\nA \"Consolas\" rendered font bitmap would look like this:\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://nickscha.github.io/\"\u003e\u003cimg src=\"example.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Customization\n\nModify the \"ttf_to_bmp_c89\" call in the file and adjust the parameters as needed.\n\nFor a higher/smoother resolution try adjusting the pixel_height parameter since it can vary based on the ttf font.\n\nWorks best with monospaced fonts.\n\n```python\nif __name__ == \"__main__\":\n    \n    ttf_to_c89(\n        font_path    = \"C:\\\\Windows\\\\Fonts\\\\consola.ttf\",  # Path to TTF Font file\n        pixel_height = 32,                                 # Pixel height for each glyph\n        bmp_output   = \"font_atlas.bmp\",                   # Bitmap output file\n        c_output     = \"font_data.h\",                      # C89 single header output file\n        flip_y       = True                                # If true Y axis is inverted for OpenGl/Vulkan compatibility\n    )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Fttf_to_c89","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickscha%2Fttf_to_c89","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Fttf_to_c89/lists"}