{"id":17912644,"url":"https://github.com/danielgatis/go-freetype","last_synced_at":"2026-04-15T12:37:27.640Z","repository":{"id":57571320,"uuid":"267979446","full_name":"danielgatis/go-freetype","owner":"danielgatis","description":"Go bindings for the FreeType library. Only the high-level API is bound.","archived":false,"fork":false,"pushed_at":"2020-09-26T04:33:33.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-30T11:51:28.226Z","etag":null,"topics":["font","fonts","freetype","freetype-bindings","freetype2","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/danielgatis.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}},"created_at":"2020-05-30T00:13:07.000Z","updated_at":"2024-01-12T04:08:16.000Z","dependencies_parsed_at":"2022-09-17T15:26:02.015Z","dependency_job_id":null,"html_url":"https://github.com/danielgatis/go-freetype","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielgatis/go-freetype","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgatis%2Fgo-freetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgatis%2Fgo-freetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgatis%2Fgo-freetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgatis%2Fgo-freetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielgatis","download_url":"https://codeload.github.com/danielgatis/go-freetype/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielgatis%2Fgo-freetype/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31842187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T11:29:19.690Z","status":"ssl_error","status_checked_at":"2026-04-15T11:29:19.171Z","response_time":63,"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":["font","fonts","freetype","freetype-bindings","freetype2","go","golang"],"created_at":"2024-10-28T19:46:20.684Z","updated_at":"2026-04-15T12:37:27.612Z","avatar_url":"https://github.com/danielgatis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-freetype\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/danielgatis/go-freetype?style=flat-square)](https://goreportcard.com/report/github.com/danielgatis/go-freetype)\n[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/danielgatis/go-freetype/master/LICENSE)\n[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/danielgatis/go-freetype)\n\nGo bindings for the FreeType library. Only the high-level API is bound.\n\n## Install\n\n```bash\ngo get -u github.com/danielgatis/go-freetype\n```\n\nAnd then import the package in your code:\n\n```go\nimport \"github.com/danielgatis/go-freetype/freetype\"\n```\n\n### Example\n\nAn example described below is one of the use cases.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"image/png\"\n\t\"io/ioutil\"\n\t\"os\"\n\n\t\"github.com/danielgatis/go-findfont/findfont\"\n\t\"github.com/danielgatis/go-freetype/freetype\"\n)\n\nfunc checkErr(err error) {\n\tif err != nil {\n\t\tfmt.Printf(\"Failed: %v\\n\", err)\n\t\tos.Exit(1)\n\t}\n}\n\nfunc main() {\n\tfonts, err := findfont.Find(\"Arial\", findfont.FontRegular)\n\tcheckErr(err)\n\n\tdata, err := ioutil.ReadFile(fonts[0][2])\n\tcheckErr(err)\n\n\tlib, err := freetype.NewLibrary()\n\tcheckErr(err)\n\n\tface, err := freetype.NewFace(lib, data, 0)\n\tcheckErr(err)\n\n\terr = face.Pt(32, 72)\n\tcheckErr(err)\n\n\timg, m, err := face.Glyph('A')\n\tcheckErr(err)\n\n\tf, err := os.Create(\"image.png\")\n\tcheckErr(err)\n\n\terr = png.Encode(f, img)\n\tcheckErr(err)\n\n\tfmt.Printf(\"Image: %v\\n\", f.Name())\n\tfmt.Printf(\"Metrics: %v\\n\", m)\n\n\terr = face.Done()\n\tcheckErr(err)\n\n\terr = lib.Done()\n\tcheckErr(err)\n}\n```\n\n\n```\n❯ go run main.go\nImage: image.png\nMetrics: \u0026{23 23 -1 23 21 -11 3 30}\n```\n\nimage.png\n\n![image.png](image.png)\n\n## License\n\nCopyright (c) 2020-present [Daniel Gatis](https://github.com/danielgatis)\n\nLicensed under [MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgatis%2Fgo-freetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielgatis%2Fgo-freetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielgatis%2Fgo-freetype/lists"}