torchfont.datasets.repoΒΆ

Dataset wrapper that materializes fonts from remote Git repositories.

Notes

The host system must expose git on PATH and allow network access when download is True; otherwise sparse checkouts cannot be refreshed.

Examples

Synchronize a Git-based font corpus locally:

repo_ds = FontRepo(
    root="data/fonts",
    url="https://example.com/fonts.git",
    ref="main",
    patterns=("**/*.ttf",),
    download=True,
)

Classes

FontRepo(root, url, ref, *, patterns[, ...])

Font dataset that synchronizes glyphs from a sparse Git checkout.