From b8b6c9be4e3a3fc712f3d9e2cf38ac19bc10feb3 Mon Sep 17 00:00:00 2001 From: naghim Date: Fri, 3 May 2024 00:56:30 +0300 Subject: [PATCH] Don't close window --- README.md | 12 +++++++++++- fontos/__main__.py | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8230f85..c41b5db 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,17 @@ It will tell you which fonts are missing. Correct each font and try again. If no fonts are missing, the fonts will be collected into a directory called `fonts`. -# Usage +# Usage (executable) + +First, download the latest release from the repository: [GitHub Releases](https://github.com/naghim/Fontos/releases) + +To use the program, drag a subtitle file into the `Fontos.exe` program. + +The program will open a terminal window and will evaluate whether the fonts in the subtitle are installed or not. + +If all fonts are installed, they will be collected into the `fonts` directory. + +# Usage (Git repository) First, install the Python requirements: diff --git a/fontos/__main__.py b/fontos/__main__.py index 8601a33..1458f00 100644 --- a/fontos/__main__.py +++ b/fontos/__main__.py @@ -4,13 +4,15 @@ import os def main(): - font_folder = 'fonts' subtitle_filename = sys.argv[1] if len(sys.argv) > 1 else 'subtitle.ass' if not os.path.exists(subtitle_filename): print(f'{subtitle_filename} is missing!') + input() sys.exit() + font_folder = os.path.join(os.path.dirname(subtitle_filename), 'fonts') + # First, find all installed fonts... installed_font_ttfs = windows.find_installed_ttfs() @@ -34,6 +36,7 @@ def main(): # All fonts are installed, let's save the fonts into a separate folder! install.install_fonts(font_folder, subtitle_fonts, installed_fonts) print('Installed fonts to', os.path.abspath(font_folder)) + input() return # Not all fonts are found, let's print the ones that are missing