{"id":13722188,"url":"https://github.com/bodoni/opentype","last_synced_at":"2025-04-05T21:09:00.472Z","repository":{"id":19627941,"uuid":"22879790","full_name":"bodoni/opentype","owner":"bodoni","description":"Builder and parser of OpenType fonts","archived":false,"fork":false,"pushed_at":"2024-12-20T19:55:18.000Z","size":8863,"stargazers_count":38,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T20:07:33.178Z","etag":null,"topics":["font","opentype","parsing","typeface","typography"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bodoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2014-08-12T14:11:57.000Z","updated_at":"2024-12-20T19:55:22.000Z","dependencies_parsed_at":"2023-02-19T17:30:40.406Z","dependency_job_id":"0785b5ef-2af3-4fd8-9656-a0bec8e7de29","html_url":"https://github.com/bodoni/opentype","commit_stats":{"total_commits":496,"total_committers":2,"mean_commits":248.0,"dds":"0.0020161290322581182","last_synced_commit":"87fc04f5e7000867d5755e47635c374174f52f61"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodoni%2Fopentype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodoni%2Fopentype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodoni%2Fopentype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodoni%2Fopentype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodoni","download_url":"https://codeload.github.com/bodoni/opentype/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399878,"owners_count":20932880,"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","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","opentype","parsing","typeface","typography"],"created_at":"2024-08-03T01:01:25.548Z","updated_at":"2025-04-05T21:09:00.455Z","avatar_url":"https://github.com/bodoni.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# OpenType [![Package][package-img]][package-url] [![Documentation][documentation-img]][documentation-url] [![Build][build-img]][build-url]\n\nThe package provides a builder and parser of OpenType fonts. It might be helpful\nto have a look at a higher-level abstraction called [`font`][font], which\ninternally relies on this package.\n\n## Example\n\n```rust\nuse opentype::truetype::tables::names::{Names, NameID};\nuse opentype::truetype::tables::{FontHeader, HorizontalHeader};\nuse opentype::File;\n\nmacro_rules! ok(($result:expr) =\u003e ($result.unwrap()));\n\nlet path = \"SourceSerifPro-Regular.otf\";\nlet mut tape = ok!(std::fs::File::open(path));\nlet File { mut fonts } = ok!(File::read(\u0026mut tape));\n\nlet font_header: FontHeader = ok!(ok!(fonts[0].take(\u0026mut tape)));\nassert_eq!(font_header.units_per_em, 1000);\n\nlet horizontal_header: HorizontalHeader = ok!(ok!(fonts[0].take(\u0026mut tape)));\nassert_eq!(horizontal_header.ascender, 918);\n\nlet names: Names = ok!(ok!(fonts[0].take(\u0026mut tape)));\nlet names = names\n    .iter()\n    .map(|((_, _, _, name_id), value)| (name_id, value))\n    .collect::\u003cstd::collections::HashMap\u003c_, _\u003e\u003e();\nassert_eq!(ok!(names[\u0026NameID::FullFontName].as_ref()), \"Source Serif Pro\");\nassert_eq!(ok!(names[\u0026NameID::DesignerName].as_ref()), \"Frank Grießhammer\");\n```\n\n## Contribution\n\nYour contribution is highly appreciated. Do not hesitate to open an issue or a\npull request. Note that any contribution submitted for inclusion in the project\nwill be licensed according to the terms given in [LICENSE.md](LICENSE.md).\n\n[font]: https://github.com/bodoni/font\n\n[build-img]: https://github.com/bodoni/opentype/actions/workflows/build.yml/badge.svg\n[build-url]: https://github.com/bodoni/opentype/actions/workflows/build.yml\n[documentation-img]: https://docs.rs/opentype/badge.svg\n[documentation-url]: https://docs.rs/opentype\n[package-img]: https://img.shields.io/crates/v/opentype.svg\n[package-url]: https://crates.io/crates/opentype\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodoni%2Fopentype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodoni%2Fopentype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodoni%2Fopentype/lists"}