Skip to content

AssFontCollector A portable script to check/copy used font inside ass files

License

Notifications You must be signed in to change notification settings

Hqndler/AssFontCollector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ass Font Collector v2

French README

Personal* python solution to check or copy used font in one or more ass file.

*see below

Requirement

Python 3.6+

pip install fontTools colorama ass matplotlib freetype-py

Usage

Put the script inside the folder where the ass files are.
python ass_font_collector.py --check
Done !

Things to know

  • The script will by default, copy all the fonts used in each of the ass files, in folders with the same name as the files (without the extension).
    image

  • You can launch the script with differents arguments if you want :

  • --check will launch the script directly to check mode.

  • --copy will launch the script directly to copy mode.

  • --aio will copy every fonts used in each of the ass files within the same folder.

  • --path "<path>" will scan fonts inside the folder path. Useful if the fonts aren't insalled.

  • -i / --input Alows you to add manualy file or directory as much as you want, only these files will be used.

  • You can also put the script in the path of you're computer to use it anywhere !

Example : python ass_font_collector.py --check --path "path/to/folder" -i file.ass ../dir/other.ass

Origin of the project

Not wanting to open lots of ASS files to extract the fonts used, I created this script.
Since version 2.0.0, the script is just a rewrite of the moi15moi project Fontcollector (a very good project), why not fork it then?
It's an alternative solution to his own, he uses his own tools that he developed.
In this script none of the libraries that moi15moi developed were used. But I recognize that a very large part of the code comes from him, including in particular the part concerning the recovery of font names.

Solution

Not wanting to install his script, I opted for a portable solution in a single file ("but you could compile his project and that was it" yes but also no). Looking for another alternative than muxing fonts in an mkv, I added an option to test the availability of fonts and not a simple copy, improved readability etc.
I also don't find the part of checking glyphs necessary, so this part is removed witch result in better performance.
The script should never crash, do not hesitate to open an issue if it crashes.

Disclaimer

This script does not work like the one in aegisub, user discrission advise

Thanks

moi15moi's project and mine were different at the beginning but we were both inspired by the one and only WheneverDev fontmerge

About

AssFontCollector A portable script to check/copy used font inside ass files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages