View Single Post
01/31/24, 08:43 PM   #8
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 660
Process one single mod folder
Code:
@echo off
setlocal enabledelayedexpansion

rem Store the starting directory in a variable
set "StartingDirectory=%CD%"

echo Processing fonts...

rem Use the starting directory in the loop
for /d /r %%F in (*) do (
    set "parentFolder=%%F"
    set "parentFolder=!parentFolder:%StartingDirectory%\=!"
    echo Searching in folder: "!parentFolder!"
    for %%i in ("%%F\*.ttf" "%%F\*.otf") do (
        .\slugfont.exe "%%i" -o "%%~dpi%%~ni.slug"
        if %errorlevel% neq 0 echo Error processing file: "%%i"
    )
)

echo Processing complete.
This should work from the PChat folder. I dislike creating this file in the mods folder. However, to use this you create your batch file within the mods folder, and copy the slugfont.exe. Run the bat file and it will process the fonts.

Last edited by Sharlikran : 02/01/24 at 03:18 PM.
  Reply With Quote