Skip to main content

FontCollector

FontCollector - Version FontCollector - Python Version FontCollector - Downloads FontCollector - Coverage FontCollector - mypy

FontCollector for Advanced SubStation Alpha file. This tool allows to recover and/or mux the fonts necessary in an mkv.

Installation

pip install FontCollector

PS: If you get the error error: externally-managed-environment (PEP 668), you might wanna use pipx instead of pip.

Dependencies

FontCollector Usage

$ fontcollector --help
usage: fontcollector [-h] [--input INPUT [INPUT ...]] [-mkv MKV] [--use-ass-in-mkv] [--output OUTPUT] [-mkvtoolnix MKVTOOLNIX] [--delete-fonts] [--additional-fonts ADDITIONAL_FONTS [ADDITIONAL_FONTS ...]]
                     [--additional-fonts-recursive ADDITIONAL_FONTS_RECURSIVE [ADDITIONAL_FONTS_RECURSIVE ...]] [--exclude-system-fonts] [--collect-draw-fonts] [--dont-convert-variable-to-collection] [--logging [LOGGING]]

FontCollector for Advanced SubStation Alpha file.

options:
  -h, --help            show this help message and exit
  --input INPUT [INPUT ...], -i INPUT [INPUT ...]
                        Subtitles file. Must be an ASS file/directory. You can specify more than one .ass file/path.
  -mkv MKV
                        Video where the fonts will be merge. Must be a Matroska file.
  --use-ass-in-mkv, -ass-mkv
                        If specified, it will use the .ass file muxed to the mkv and collect those fonts and mux them to the mkv. If not specified, it will do nothing.
  --output OUTPUT, -o OUTPUT
                        Destination path of the font. If -o and -mkv aren't specified, it will be the current path.
  -mkvtoolnix MKVTOOLNIX
                        Path to the MKVToolNix folder if not in variable environments. If -mkv is not specified, it will do nothing.
  --delete-fonts, -d
                        If -d is specified, it will delete the font attached to the mkv before merging the new needed font. If -mkv is not specified, it will do nothing.
  --additional-fonts ADDITIONAL_FONTS [ADDITIONAL_FONTS ...], -add-fonts ADDITIONAL_FONTS [ADDITIONAL_FONTS ...]
                        May be a directory containing font files or a single font file. You can specify more than one additional-fonts. If it is a directory, it won't search recursively for fonts
  --additional-fonts-recursive ADDITIONAL_FONTS_RECURSIVE [ADDITIONAL_FONTS_RECURSIVE ...], -add-fonts-rec ADDITIONAL_FONTS_RECURSIVE [ADDITIONAL_FONTS_RECURSIVE ...]
                        Path to font directory, which will be recursively searched for fonts.
  --exclude-system-fonts
                        If specified, FontCollector won't use the system font to find the font used by an .ass file.
  --collect-draw-fonts
                        If specified, FontCollector will collect the font used by the draw. For more detail when this is usefull, see: https://github.com/libass/libass/issues/617
  --dont-convert-variable-to-collection
                        If specified, FontCollector won't convert variable font to a font collection. see: https://github.com/libass/libass/issues/386
  --logging [LOGGING], -log [LOGGING]
                        Destination path of log. If it isn't specified, it will be YYYY-MM-DD--HH-MM-SS_font_collector.log.

Examples

Recover fonts from 2 .ass files and save them in the current folder

fontCollector -i "file1.ass" "file2.ass"

Take all the .ass files from the current folder and save the font in the current folder

fontCollector -i .

Mux font from .ass file into an mkv

fontCollector -i "file1.ass" -mkv "example.mkv" -mkvtoolnix "C:\Program Files\MKVToolNix"

Mux the font from the .ass file into an mkv and delete the currently attached fonts.

fontCollector -i "file1.ass" -mkv "example.mkv" -mkvtoolnix "C:\Program Files\MKVToolNix" -d

MKVFontValidator Usage

$ mkvfontvalidator --help
usage: mkvfontvalidator [-h] -mkv MKV [-mkvtoolnix MKVTOOLNIX] [--need-draw-fonts] [--delete-fonts-not-used] [--logging [LOGGING]]

MKV font validator for Advanced SubStation Alpha file.

options:
  -h, --help
                        show this help message and exit
  -mkv MKV
                        The video file to be verified. Must be a Matroska file.
  -mkvtoolnix MKVTOOLNIX
                        Path to the MKVToolNix folder if not in variable environments.
  --need-draw-fonts
                        If specified, MKVFontValidator will report a error if a font used in a draw isn't muxed to the mkv. For more detail when this is usefull, see: https://github.com/libass/libass/issues/617
  --delete-fonts-not-used, -d
                        If specified, MKVFontValidator will remove the fonts that aren't used by the subtitle(s) of the mkv file.
  --logging [LOGGING], -log [LOGGING]
                        Destination path of log. If it isn't specified, it will be YYYY-MM-DD--HH-MM-SS_mkvfontvalidator.log.

Variable Font

Since Libass does not support variable font, this tool will automatically generate a OpenType Font Collection. The generated collection is designed to simulate how VSFilter/GDI handles variable font.

Acknowledgments

  • fontmerge for the idea to automatically merge the font into the mkv.
  • Myaamori-Aegisub-Scripts Without this tool, I probably could never have created the fontCollector. I got a lot of inspiration from his work.
  • PyonFX I inspired myself from his setup.py to create mine.
  • rcombs for her help with how VSFilter pick font when faux-bold need to be applied.
  • assfc for all the idea behind the font_loader.
  • Christopher Leung for his help on how GDI handle variable font.

Release files for FontCollector 4.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for FontCollector 4.0.3
File Size Uploaded
fontcollector-4.0.3.tar.gz 54.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for FontCollector 4.0.3
File Interpreter ABI Platform
fontcollector-4.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 124.5 kB

Release files / fontcollector-4.0.3.tar.gz

Download URL fontcollector-4.0.3.tar.gz
Size 54.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8dca9a33e525b69e86c235940a8504543d5e4f97010af56928e97ab8eff086ff
BLAKE2b-256 checksum
How to use checksums
cafc441cd0d31be7a7de5b26198246121234021e4b156b3c18066cc21e3b992b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.

Transparency log

Release files / fontcollector-4.0.3-py3-none-any.whl

Download URL fontcollector-4.0.3-py3-none-any.whl
Size 70.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78a3db940d11c7829d2c3f1d3620c4a32135e2343c4b623e7de2b9af9f0cfe1e
BLAKE2b-256 checksum
How to use checksums
c9768dbd3ebaa10af784204e73125002c16790f485679bfc53fab9c13fae09ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page