MCPcopy Index your code
hub / github.com/bodoni/font

github.com/bodoni/font @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
172 symbols 379 edges 39 files 11 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Font Package Documentation Build

The package provides a builder and parser for fonts.

Example

use font::glyph::Segment;
use font::File;

macro_rules! ok(($result:expr) => ($result.unwrap()));

let path = "SourceSerifPro-Regular.otf";
let File { mut fonts } = ok!(File::open(path));
let glyph = ok!(ok!(fonts[0].glyph('a')));
for contour in glyph.iter() {
    for segment in contour.iter() {
        match segment {
            &Segment::Linear(..) => { /* … */ },
            &Segment::Quadratic(..) => { /* … */ },
            &Segment::Cubic(..) => { /* … */ },
        }
    }
}

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.

Extension points exported contracts — how you extend this code

Transform (Interface)
(no doc) [6 implementers]
src/formats/opentype/features/transform.rs
Table (Interface)
(no doc) [2 implementers]
src/formats/opentype/features/rules.rs

Core symbols most depended-on inside this repo

setup
called by 31
tests/support/mod.rs
clone
called by 28
src/formats/opentype/cache.rs
borrow
called by 24
src/formats/opentype/cache.rs
get
called by 23
src/formats/opentype/metrics.rs
borrow_mut
called by 23
src/formats/opentype/cache.rs
transform
called by 9
src/glyph/builder.rs
uncover
called by 9
src/formats/opentype/features/rules.rs
read
called by 8
src/formats/opentype/font.rs

Shape

Function 75
Method 70
Class 16
Enum 9
Interface 2

Languages

Rust100%

Modules by API surface

src/formats/opentype/font.rs15 symbols
src/glyph/builder.rs14 symbols
src/offset.rs11 symbols
src/formats/webtype/font.rs11 symbols
src/formats/opentype/features/rules.rs11 symbols
tests/glyphs.rs10 symbols
src/formats/opentype/features/mod.rs9 symbols
src/formats/opentype/cache.rs8 symbols
tests/features.rs7 symbols
src/formats/opentype/axes.rs7 symbols
src/glyph/mod.rs6 symbols
src/formats/opentype/features/transform.rs6 symbols

For agents

$ claude mcp add font \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact