@echo off
rem fli_base.cmd
set fli_opt=
:next_arg
if "%1"=="/v" goto set_v
if "%1"=="" goto usage
if "%2"=="" goto usage
if "%3"=="" goto usage
if "%4"=="" goto start
:usage
echo Usage:   fli_base [/v] DEVICE RESOLUTION FONTDIR
echo Example: fli_base lj 300 c:\newfonts
goto end

:set_v
set fli_opt=/v
shift
goto next_arg

:start
set fli_opt=%fli_opt% /b%2 /ffontlist
fontlib /c %fli_opt% %1_base =%3\pixel.%1\%%rdpi *0.8 +*.pk *0.9 +*.pk :0 +*.pk :h +*.pk :1 +*.pk :2 +*.pk :3 +*.pk :4 +*.pk
if errorlevel 1 goto error
goto end

:error
echo *** Error!
:end
set fli_opt=
