View Single Post
01/30/24, 02:20 PM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,000
I've put the bat file and the exe to live/AddOns/pChat and it somehow did not work

Originally Posted by Sharlikran View Post
Code:
@echo off
setlocal enabledelayedexpansion
set "LogFile=font_processing_log.txt"

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 (
        if /I not "%%~xi" == ".dds" if /I not "%%~xi" == ".lua" if /I not "%%~xi" == ".xml" if /I not "%%~xi" == ".txt" (
            .\slugfont.exe "%%i" -o "%%~dpi%%~ni.slug"
            if %errorlevel% neq 0 echo Error processing file: "%%i"
        ) else (
            echo Skipping excluded file: "%%i"
        )
    )
)

echo Processing complete. Check %LogFile% for details.
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.


Thanks Sharlikran but it does not find the *.ttf and *.otf files in pChat/fonts/ e.g. /Arvo/Arvo-Regular.ttf?
The bat file runs, the command line opens, it writes Processing fonts... and then for each folder found 1 line with
Searching in folder: "!parentFolder!"

And then nothing, no return code/error code nor any error message nor skipped message.

At the end it writes the line Processing complete. Check %LogFile% for details. but there is no log file.
Maybe an Antivirus/Windows protection issue.

Edit:
Find attached the pChat slug files
Attached Files
File Type: zip 20240130_pChat-slug_fonts.zip (6.03 MB, 170 views)

Last edited by Baertram : 01/31/24 at 03:11 AM.
  Reply With Quote