diff --git a/README.md b/README.md index 7c33020e5..8925fdcff 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ robust and performant open tools for a variety of font engineering and production tasks. For an overview of the motivations, see [googlefonts/oxidize][oxidize]. - ## structure Currently, this repo contains three main library crates: [`font-types`][], [`read-fonts`][], @@ -27,6 +26,49 @@ and [`write-fonts`][], in addition to one binary crate, [`otexplorer`][]: It is developed as a debugging tool, and may also be useful as an example of how the [`read-fonts`][] crate can be used. +## depgraph + +Shows the non-dev dependency relationships among the font-related crates in fontations. fontc primarily uses the fontations crates via write-fonts and skrifa. + +```mermaid +%% This is a map of non-dev font-related dependencies. +%% See https://mermaid.live/edit for a lightweight editing environment for +%% mermaid diagrams. + +graph LR + %% First we define the nodes and give them short descriptions. + %% We group them into subgraphs by repo so that the visual layout + %% maps to the source layout, as this is intended for contributors. + %% https://github.com/googlefonts/fontations + subgraph fontations[fontations repo] + fauntlet[fauntlet\ncompares Skrifa & freetype] + font-types[font-types\ndefinitions of types\nfrom OpenType and a bit more] + read-fonts[read-fonts\nparses and reads OpenType fonts] + skrifa[skrifa\nhigher level lib\nfor reading OpenType fonts] + write-fonts[write-fonts\ncreates and edits font-files] + end + + %% https://github.com/linebender/kurbo + kurbo[kurbo\n2d curves lib] + %% https://github.com/linebender/norad + norad[norad\nhandles Unified Font Object files] + %% https://github.com/PistonDevelopers/freetype-rs + freetype-rs[freetype-rs\nbindings for the FreeType library] + + %% Now define the edges. + %% Made by hand on March 20, 2024, probably not completely correct. + %% Should be easy to automate if we want to, main thing is to + %% define the crates of interest. + fauntlet --> skrifa + fauntlet --> freetype-rs + read-fonts --> font-types + skrifa --> read-fonts + write-fonts --> font-types + write-fonts --> read-fonts + write-fonts --> kurbo + norad --> kurbo +``` + ## codegen Much of the code in the `read-fonts` and `write-fonts` crate is generated