{"id":24893735,"url":"https://github.com/fetisov/ttf2mesh","last_synced_at":"2025-10-16T09:32:06.700Z","repository":{"id":48075229,"uuid":"262707673","full_name":"fetisov/ttf2mesh","owner":"fetisov","description":"Standalone library for TrueType font tessellation. Allows to load ttf-file and convert its glyphs to 2D or 3D mesh objects without rasterization.","archived":false,"fork":false,"pushed_at":"2024-06-26T01:30:21.000Z","size":462,"stargazers_count":200,"open_issues_count":7,"forks_count":44,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T19:02:30.745Z","etag":null,"topics":["bezier-curves","design-tools","fonts","glyphs","mesh-generation","open-source","opengl","tessellation","textview","triangulation","ttf","ttf-fonts","vector-graphics"],"latest_commit_sha":null,"homepage":"","language":"C++","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/fetisov.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":"2020-05-10T03:55:05.000Z","updated_at":"2025-01-23T16:31:53.000Z","dependencies_parsed_at":"2023-02-12T19:25:18.372Z","dependency_job_id":"fa8c1e60-f9f7-42d1-9de1-ac53a1a17786","html_url":"https://github.com/fetisov/ttf2mesh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fetisov/ttf2mesh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetisov%2Fttf2mesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetisov%2Fttf2mesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetisov%2Fttf2mesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetisov%2Fttf2mesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fetisov","download_url":"https://codeload.github.com/fetisov/ttf2mesh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetisov%2Fttf2mesh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279173258,"owners_count":26119035,"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-16T02:00:06.019Z","response_time":53,"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":["bezier-curves","design-tools","fonts","glyphs","mesh-generation","open-source","opengl","tessellation","textview","triangulation","ttf","ttf-fonts","vector-graphics"],"created_at":"2025-02-01T19:01:29.408Z","updated_at":"2025-10-16T09:32:06.280Z","avatar_url":"https://github.com/fetisov.png","language":"C++","funding_links":["https://www.paypal.me/fetisovs"],"categories":["C","GUI"],"sub_categories":["Font utils"],"readme":"![image](https://github.com/fetisov/ttf2mesh/blob/assets/logo.png?raw=true)\n\nThe ttf2mesh crossplatform library allows to convert a glyphs of truetype font (ttf) to a mesh objects in 2d and 3d space. The library does not require any graphical context and does not use system dependent functions.\n\nThe library consists of two files written in the C language of the **c99 standard**: ttf2mesh.c and ttf2mesh.h.\nThe ttf2mesh.c code implements a **parsing of ttf-files** and a **tessellation algorithm** that provides the formats conversion. The tessellation algorithm uses the [**Delaunay**](https://en.wikipedia.org/wiki/Delaunay_triangulation) test to form an optimal set of triangles. Tessellation (triangulation) process is described in [\"this post\"](https://habr.com/post/501268) and is shown in the animation below.\n\n![image](https://github.com/fetisov/ttf2mesh/blob/assets/tessellation.gif?raw=true)\n\nThe library has a simple doxygen-documented API for loading TTF files and converting glyphs into mesh objects. Examples of using the library are presented in **examples/src** directory. There are three main examples:\n\n|FILE                           |Description                  |\n|-------------------------------|-----------------------------|\n|examples/src/simple.c          |The simplest code that shows how a user can load a font from the system directory and convert its glyph to a 2d mesh object. The converted glyph is rendering to an opengl window as a filled mesh, wireframe or the glyph contours.|\n||![image](https://raw.githubusercontent.com/fetisov/ttf2mesh/assets/2d.png)|\n|examples/src/glyph3d.c         |Same as simple.c example, except that the font glyphs are converted to a 3D mesh object, which is displayed in the opengl window with animation.|\n||![image](https://raw.githubusercontent.com/fetisov/ttf2mesh/assets/3d.png)|\n|examples/src/ttf2obj.c         |Console application for converting TTF font input file to a Wavefront object file (.obj). Each object in the output file includes the plane geometry of the corresponding glyph and its parameters: Unicode ID, advance and bearing.|\n||![image](https://raw.githubusercontent.com/fetisov/ttf2mesh/assets/objfile.png)|\n\nTo compile examples on Linux system you can use the GNU make utility: `make -C examples/build-linux-make all`. In the Windows operating system, you can use for compilation the Microsoft Visual Studio C++ project files that are located in the `examples/build-win-msvc` directory. Additionally, the `examples\\build-any-qmake` directory contains pro files for building examples using the qtcreator IDE.\n\nYou can read information on how the library works at [this link](https://habr.com/post/501268).\n\n[PayPal me](https://www.paypal.me/fetisovs) or:\n*MasterCard* 5469 3800 5517 1176\n*wmz* Z518568605100 *wmr* R885157851601\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffetisov%2Fttf2mesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffetisov%2Fttf2mesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffetisov%2Fttf2mesh/lists"}