Skip to main content

FontCollector for Advanced SubStation Alpha file.

Project description

FontCollector

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

Installation

pip install FontCollector

Dependencies

Usage

$ fontcollector --help
usage: fontcollector [-h] --input [INPUT ...] [-mkv MKV] [--output OUTPUT] [-mkvpropedit MKVPROPEDIT] [--delete-fonts]
                     [--additional-fonts ADDITIONAL_FONTS [ADDITIONAL_FONTS ...]] [--exclude-system-fonts]

FontCollector for Advanced SubStation Alpha file.

options:
  -h, --help            show this help message and exit
  --input [INPUT ...], -i [INPUT ...]
                        Subtitles file. Must be an ASS file/directory. You can specify more than one .ass file/path.
                        If no argument is specified, it will take all the font in the current path.
  -mkv MKV              
                        Video where the fonts will be merge. Must be a Matroska file.
  --output OUTPUT, -o OUTPUT
                        Destination path of the font. If -o and -mkv aren't specified, it will be the current path.
  -mkvpropedit MKVPROPEDIT
                        Path to mkvpropedit.exe 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 ...]
                        May be a directory containing font files or a single font file. You can specify more than one
                        additional-fonts.
  --exclude-system-fonts
                        If specified, FontCollector won't use the system font to find the font used by an .ass file.

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" -mkvpropedit "C:\Program Files\MKVToolNix\mkvpropedit.exe"

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

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FontCollector-2.1.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

FontCollector-2.1.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file FontCollector-2.1.0.tar.gz.

File metadata

  • Download URL: FontCollector-2.1.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.7

File hashes

Hashes for FontCollector-2.1.0.tar.gz
Algorithm Hash digest
SHA256 74e35b1e503bda2d0db8f17dcf64cf2d5bc13dd740a46a69ade188f9595ffa92
MD5 941f43c8dc2d10380d09e65bcfdc1c6c
BLAKE2b-256 f5008b555bf7be38ad97735e0caaa4222300b7e75cedcf40155b566429c07fa4

See more details on using hashes here.

File details

Details for the file FontCollector-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for FontCollector-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5de04f14239083cad7464e6414f53e0d0b562d9362150584a581a2ed9701cd5
MD5 666b12e1d4782b8155189e034cb20d99
BLAKE2b-256 64bad02484cba9393337471b2a682a9f7f0713c272fb21aea7e8abade35adeb1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page