torchfont.datasets.folderΒΆ
Font folder dataset utilities for glyph loading and indexing.
Examples
Iterate glyph samples from a directory of fonts:
from torchfont.datasets import FontFolder
dataset = FontFolder(root="~/fonts")
sample, target = dataset[0]
- Guidance:
Fonts are cached by absolute path to limit redundant disk access during dataset iteration.
Functions
|
Convert a glyph outline to tensor representations. |
|
Load a font file and cache the resulting |
Classes
|
Dataset that yields glyph samples from a directory of font files. |