{"id":22115747,"url":"https://github.com/yeslogic/fontconfig-rs","last_synced_at":"2025-04-13T09:44:50.469Z","repository":{"id":37334087,"uuid":"221604929","full_name":"yeslogic/fontconfig-rs","owner":"yeslogic","description":"Safe wrapper around freedesktop.org's fontconfig library, for locating fonts on UNIX like systems.","archived":false,"fork":false,"pushed_at":"2025-03-25T00:26:04.000Z","size":139,"stargazers_count":19,"open_issues_count":3,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T01:11:44.361Z","etag":null,"topics":["fontconfig","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/yeslogic.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":"2019-11-14T03:37:25.000Z","updated_at":"2025-03-25T14:54:44.000Z","dependencies_parsed_at":"2024-01-18T02:07:03.579Z","dependency_job_id":"7a59be9c-8f38-48da-9e8b-4a3b5464c1bf","html_url":"https://github.com/yeslogic/fontconfig-rs","commit_stats":{"total_commits":104,"total_committers":11,"mean_commits":9.454545454545455,"dds":"0.41346153846153844","last_synced_commit":"688272a7e606db90db77229086ee3adfb16bda8e"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeslogic%2Ffontconfig-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeslogic%2Ffontconfig-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeslogic%2Ffontconfig-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeslogic%2Ffontconfig-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeslogic","download_url":"https://codeload.github.com/yeslogic/fontconfig-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248694178,"owners_count":21146945,"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":["fontconfig","rust"],"created_at":"2024-12-01T12:17:43.662Z","updated_at":"2025-04-13T09:44:50.449Z","avatar_url":"https://github.com/yeslogic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"fontconfig\n==========\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/yeslogic/fontconfig-rs/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/yeslogic/fontconfig-rs/actions/workflows/ci.yml/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://docs.rs/fontconfig\"\u003e\n    \u003cimg src=\"https://docs.rs/fontconfig/badge.svg\" alt=\"Documentation\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/fontconfig\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/fontconfig.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/yeslogic/fontconfig-rs/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/l/fontconfig.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\nA wrapper around [freedesktop.org's Fontconfig library][homepage], for locating fonts on UNIX-like systems such as Linux and BSD. Requires Fontconfig to be installed.\n\nDependencies\n------------\n\n* Alpine Linux: `fontconfig-dev`\n* Arch Linux: `fontconfig`\n* Debian-based systems: `libfontconfig1-dev`\n* FreeBSD: `fontconfig`\n* Void Linux: `fontconfig-devel`\n\nUsage\n-----\n\n`main.rs`:\n\n```rust\nuse fontconfig::Fontconfig;\n\nfn main() {\n    let fc = Fontconfig::new().unwrap();\n    // `Fontconfig::find()` returns `Option` (will rarely be `None` but still could be)\n    let font = fc.find(\"freeserif\", None).unwrap();\n    // `name` is a `String`, `path` is a `Path`\n    println!(\"Name: {}\\nPath: {}\", font.name, font.path.display());\n}\n```\n\nYou could then, for example, use `font.path` to create a `GlyphCache` from [`opengl_graphics`][gl] and pass it to [`conrod`][conrod].\n\n### Cargo Features\n\n| Feature       | Description                       | Default Enabled | Extra Dependencies    |\n|---------------|-----------------------------------|:---------------:|-----------------------|\n| `dlopen`      | [dlopen] libfontconfig at runtime |        ❌       |                       |\n\nThe `dlopen` feature enables building this crate without dynamically linking to the Fontconfig C library at link time. Instead, Fontconfig will be dynamically loaded at runtime with the [dlopen] function. This can be useful in cross-compiling situations as you don't need to have a version of Fontcofig available for the target platform available at compile time.\n\nOther Fontconfig Crates\n-----------------------\n\n* [servo-fontconfig] — This crate provides a low-level interface only. It\n  depends on [servo-fontconfig-sys], which will fall back to building a\n  vendored version of Fontconfig if a compatible version can't be found. It\n  in-turn depends on [expat-sys], which does the same thing regarding a vendored\n  version of Expat. This makes it easier if you are distributing a code base\n  that needs Fontconfig, but provides less control over the libraries that will\n  be used.\n* [fontconfig-sys] — superseded by [yeslogic-fontconfig-sys].\n* [yeslogic-fontconfig] — This crate was previously published under this name before we were given access to publish it as [fontconfig].\n\nFor our needs in [Prince] we wanted higher-level bindings that did not fall back on vendored versions of libraries, which is what the crates in this repo provide.\n\nCredits\n-------\n\nThanks to [Austin Bonander][abonander] for originally creating the\n`fontconfig` crate and [allowing us to publish ours under that\nname](https://github.com/abonander/fontconfig-rs/issues/9).\n\n[conrod]: https://github.com/PistonDevelopers/conrod\n[expat-sys]: https://crates.io/crates/expat-sys\n[fontconfig-sys]: https://crates.io/crates/fontconfig-sys\n[fontconfig]: https://crates.io/crates/fontconfig\n[gl]: https://github.com/PistonDevelopers/opengl_graphics\n[homepage]: https://www.freedesktop.org/wiki/Software/fontconfig/\n[Prince]: https://www.princexml.com/\n[servo-fontconfig-sys]: https://crates.io/crates/servo-fontconfig-sys\n[servo-fontconfig]: https://crates.io/crates/servo-fontconfig\n[yeslogic-fontconfig]: https://crates.io/crates/yeslogic-fontconfig\n[yeslogic-fontconfig-sys]: https://crates.io/crates/yeslogic-fontconfig-sys\n[abonander]: https://github.com/abonander\n[dlopen]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/dlopen.html\n[dlib]: https://crates.io/crates/dlib\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeslogic%2Ffontconfig-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeslogic%2Ffontconfig-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeslogic%2Ffontconfig-rs/lists"}