{"id":13726758,"url":"https://github.com/servo/pathfinder","last_synced_at":"2025-05-12T05:30:11.842Z","repository":{"id":38331708,"uuid":"78266307","full_name":"servo/pathfinder","owner":"servo","description":"A fast, practical GPU rasterizer for fonts and vector graphics","archived":false,"fork":false,"pushed_at":"2025-03-21T16:24:11.000Z","size":9163,"stargazers_count":3739,"open_issues_count":115,"forks_count":219,"subscribers_count":90,"default_branch":"main","last_synced_at":"2025-05-12T02:45:01.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/servo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2017-01-07T07:50:04.000Z","updated_at":"2025-05-10T12:34:01.000Z","dependencies_parsed_at":"2023-02-12T06:46:36.336Z","dependency_job_id":"50b96660-3f0d-4b8c-9ec0-9ab7f8e89ce1","html_url":"https://github.com/servo/pathfinder","commit_stats":{"total_commits":1531,"total_committers":58,"mean_commits":"26.396551724137932","dds":"0.18027433050293928","last_synced_commit":"a3ceb814cac4a817e2883da73df84c3eeddb70de"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servo%2Fpathfinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servo%2Fpathfinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servo%2Fpathfinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/servo%2Fpathfinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/servo","download_url":"https://codeload.github.com/servo/pathfinder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672731,"owners_count":21945482,"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":[],"created_at":"2024-08-03T01:03:20.060Z","updated_at":"2025-05-12T05:30:11.696Z","avatar_url":"https://github.com/servo.png","language":"Rust","readme":"# Pathfinder 3\n\n![Logo](https://github.com/servo/pathfinder/raw/main/resources/textures/pathfinder-logo.png)\n\nPathfinder 3 is a fast, practical, GPU-based rasterizer for fonts and vector graphics using OpenGL\n3.0+, OpenGL ES 3.0+, WebGL 2, and Metal.\n\nPlease note that Pathfinder is under heavy development and is incomplete in various areas.\n\n## Quick start\n\nPathfinder contains a library that implements a subset of the\n[HTML canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API). You can quickly add\nvector rendering to any Rust or C/C++ app with it. The library is available on `crates.io`. See\n`examples/canvas_minimal` for a small example of usage.\n\n### Demos\n\nDemo app sources are available in\n[demo/native](https://github.com/servo/pathfinder/tree/main/demo/native). Simply run:\n\n    $ cd demo/native\n    $ cargo run --release\n\nA variety of small examples are also available to get you up and running quickly. For example, you\ncan run the `canvas_nanovg` example like so:\n\n    $ cd examples/canvas_nanovg\n    $ cargo run --release\n\n## Features\n\nThe project features:\n\n* Rust and C bindings, for easy embedding in your own applications regardless of programming\n  language. (Note that the C bindings are currently less complete; pull requests are welcome!)\n\n* GPU compute-based rendering, where available. Pathfinder has two rendering modes: D3D11, which is\n  based on compute, and D3D9, which is based on hardware rasterization. (Note that these names are\n  purely convenient ways to refer to hardware levels: the project doesn't have a proper Direct3D\n  backend yet.) In the D3D11 mode, Pathfinder uses compute shaders to achieve large reductions in\n  CPU usage and overall better performance than what the built-in GPU rasterization hardware can\n  provide.\n\n* Fast CPU setup if needed, making full use of parallelism. If the D3D9 backend is in use,\n  Pathfinder performs the tiling step using SIMD and Rayon in order to get as much parallelism out\n  of the CPU as possible. (In the D3D11 backend, these steps are done on GPU instead.) The CPU step\n  can be pipelined with the GPU to hide its latency.\n\n* Fast GPU rendering, even at small pixel sizes. Even on lower-end GPUs, Pathfinder often matches\n  or exceeds the performance of the best CPU rasterizers. The difference is particularly pronounced\n  at large sizes, where Pathfinder regularly achieves multi-factor speedups.\n\n* High quality antialiasing. Pathfinder can compute exact fractional trapezoidal area coverage on a\n  per-pixel basis for the highest-quality antialiasing possible (effectively 256xAA).\n\n* Advanced font rendering. Pathfinder can render fonts with slight hinting and can perform subpixel\n  antialiasing on LCD screens. It can do stem darkening/font dilation like macOS and FreeType in\n  order to make text easier to read at small sizes. The library also has support for gamma\n  correction.\n\n* Support for SVG. Pathfinder 3 is designed to efficiently handle workloads that consist of many\n  overlapping vector paths, such as those commonly found in complex SVG and PDF files. It performs\n  tile-based occlusion culling, which often results in dramatic performance wins over typical\n  software renderers that use the painter's algorithm. A simple loader that leverages the `resvg`\n  library to render a subset of SVG is included, so it's easy to get started.\n\n* 3D capability. Pathfinder can render fonts and vector paths in 3D environments without any loss\n  in quality. This is intended to be useful for vector-graphics-based user interfaces in VR, for\n  example.\n\n* Lightweight. Pathfinder is designed first and foremost for simplicity and generality instead of a\n  large number of specialized fast paths. It consists of a set of modular crates, so applications\n  can pick and choose only the components that are necessary to minimize dependencies.\n\n* Portability to most GPUs manufactured in the last decade, including integrated and mobile GPUs.\n  Any GPU capable of Direct3D 9/OpenGL 3.0/WebGL 2.0 should be able to run Pathfinder. Currently,\n  backends are available for OpenGL, OpenGL ES, Metal, and WebGL.\n\n## Building\n\nPathfinder can be used from either Rust or C/C++. See the appropriate section below.\n\n### Rust\n\nSimply run `cargo build --release` at top level to build all the crates. Pathfinder is a set of\nmodular crates, allowing you to select only the parts of the library you need and omit the rest.\nThe libraries are available on `crates.io` with the `pathfinder_` prefix (e.g.\n`pathfinder_canvas`), but you may wish to use the `main` branch for the latest features and bug\nfixes.\n\n### C\n\nThe C bindings use [cargo-c](https://github.com/lu-zero/cargo-c). Install `cargo-c` with\n`cargo install cargo-c`, and then use a command like:\n\n    $ cargo cinstall --destdir=/tmp/pathfinder-destdir --manifest-path c/Cargo.toml\n    $ sudo cp -a /tmp/pathfinder-destdir/* /\n\nThe resulting library is usable via `pkg-config` as `pathfinder`. For examples of use, see the\nexamples in the `examples/` directory beginning with `c_`.\n\n`cargo-c` has a variety of other options such as `--prefix`, which may be useful for packagers.\n\n## Community\n\nThere's a Matrix chat room available at\n[`#pathfinder:mozilla.org`](https://matrix.to/#/!XiDASQfNTTMrJbXHTw:mozilla.org?via=mozilla.org).\nIf you're on the Mozilla Matrix server, you can search for Pathfinder to find it. For more\ninformation on connecting to the Matrix network, see\n[this `wiki.mozilla.org` page](https://wiki.mozilla.org/Matrix).\n\nThe entire Pathfinder community, including the chat room and GitHub project, is expected to abide\nby the same Code of Conduct that the Rust project itself follows. (At the moment, the authors will\nhandle violations.)\n\n## Build status\n\n[![Build Status](https://github.com/servo/pathfinder/actions/workflows/main.yml/badge.svg)](https://github.com/servo/pathfinder/actions)\n\n## Authors\n\nThe primary author is Patrick Walton (@pcwalton), with contributions from the Servo development\ncommunity.\n\nThe logo was designed by Jay Vining.\n\n## License\n\nPathfinder is licensed under the same terms as Rust itself. See `LICENSE-APACHE` and `LICENSE-MIT`.\n\nMaterial Design icons are copyright Google Inc. and licensed under the Apache 2.0 license.\n","funding_links":[],"categories":["Rust","Graphics","2D renderer"],"sub_categories":["Rust 2D renderer"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservo%2Fpathfinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservo%2Fpathfinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservo%2Fpathfinder/lists"}