Skip to content

Commit

Permalink
Merge pull request #855 from googlefonts/readme-depgraph
Browse files Browse the repository at this point in the history
Add depgraph showing relationships among the crates
  • Loading branch information
rictic authored Apr 1, 2024
2 parents bb468ed + 7ad2da3 commit 9a440e5
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`][],
Expand All @@ -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
Expand Down

0 comments on commit 9a440e5

Please sign in to comment.