{"id":25549681,"url":"https://github.com/hyx0329/circuitpython-better-pcf-font-loader","last_synced_at":"2026-05-01T16:34:32.965Z","repository":{"id":255805346,"uuid":"853291127","full_name":"hyx0329/circuitpython-better-pcf-font-loader","owner":"hyx0329","description":"Maybe a better PCF font loader for CircuitPython, support different glyph padding schemes","archived":false,"fork":false,"pushed_at":"2024-09-07T06:19:22.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-05-30T17:43:22.570Z","etag":null,"topics":["circuitpython","font"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyx0329.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-06T11:16:09.000Z","updated_at":"2024-09-17T10:16:50.000Z","dependencies_parsed_at":"2024-09-07T07:42:20.582Z","dependency_job_id":null,"html_url":"https://github.com/hyx0329/circuitpython-better-pcf-font-loader","commit_stats":null,"previous_names":["hyx0329/circuitpython-better-pcf-font-loader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hyx0329/circuitpython-better-pcf-font-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyx0329%2Fcircuitpython-better-pcf-font-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyx0329%2Fcircuitpython-better-pcf-font-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyx0329%2Fcircuitpython-better-pcf-font-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyx0329%2Fcircuitpython-better-pcf-font-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyx0329","download_url":"https://codeload.github.com/hyx0329/circuitpython-better-pcf-font-loader/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyx0329%2Fcircuitpython-better-pcf-font-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32505106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["circuitpython","font"],"created_at":"2025-02-20T10:19:33.513Z","updated_at":"2026-05-01T16:34:32.947Z","avatar_url":"https://github.com/hyx0329.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A better PCF font loader for CircuitPython\n\nPCF is abbreviation for X11 Portable Compiled Font.\n\nThere's [Adafruit_CircuitPython_Bitmap_Font](https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font) but it does not support glyphs that padded to bytes \u0026 chars(2 bytes) and the code is a bit confusing.\n\nPros:\n\n- cleaner code(I think)\n- limited glyph cache\n    - useful for fonts with numerous code points(like CJK fonts) so memory won't be exhausted by cache\n- support different glyph paddings\n    - thus font file can be smaller\n- faster(batch load) than Adafruit_CircuitPython_Bitmap_Font\n    - 158ms VS 242ms when loading 72 unique CJK characters\n    - 173ms VS 341ms when loading 72 unique/125 total CJK characters\n    - tested on RP2040, both use the same PCF font, *YMMV though*\n\nCons:\n\n- only PCF is supported\n- may not work on some older CircuitPython\n    - needs `bitmaptools.readinto`\n- consumes __more__ RAM, possibly\n    - about(less than) 1KB with default configuration\n    - maybe neglectable for CircuitPython\n\nExample:\n\n```python\nimport board\nfrom adafruit_display_text import label\nfrom pcf_font import PcfFont\n\n# replace with your own font\nfont = PcfFont(\"fonts/fusion-pixel-12px-proportional-zh_hans.pcf\")\ntext = \"世界，你好！World, hello!\"\ntext_area = label.Label(font, text=text)\ntext_area.x = 10\ntext_area.y = 10\nboard.DISPLAY.root_group = text_area\n```\n\nIt's designed to be API compatible, and can replace Adafruit_CircuitPython_Bitmap_Font if only PCF is used.\n\n## License\n\nThis project is released under [Unlicense](https://unlicense.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyx0329%2Fcircuitpython-better-pcf-font-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyx0329%2Fcircuitpython-better-pcf-font-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyx0329%2Fcircuitpython-better-pcf-font-loader/lists"}