torchfont.datasets.repoΒΆ

Dataset wrapper that materializes fonts from remote Git repositories.

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,
)
Requirements:

The system must have git available in PATH and network access when download is set to True.

Classes

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

Font dataset that synchronizes glyphs from a sparse Git checkout.