View Single Post
01/29/24, 10:13 PM   #4
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 660
Process all mod folders
Code:
@echo off
setlocal enabledelayedexpansion

echo Processing fonts...

for /d /r %%F in (*) do (
    set "parentFolder=%%F"
    set "parentFolder=!parentFolder:%CD%\=!"
    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.
So what I did was make a slugs.bat in Addons, copied slugfont.exe to the Addons folder and then ran the batch file. It creates a .slug file within the Addon folder where it finds the font file with the same name.

Last edited by Sharlikran : 01/31/24 at 08:51 PM.
  Reply With Quote