summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Strzelczyk <piotr@eps.gda.pl>2009-11-07 00:02:24 +0000
committerPiotr Strzelczyk <piotr@eps.gda.pl>2009-11-07 00:02:24 +0000
commit979ba9364639d18a0b005e1deb1d42d6bc3d52ca (patch)
treeb5db00018cd273ffaf0979268158a0ff6a7e60e0
parentdf97c7576b7b5360ead1ff807b589a81f380f418 (diff)
more font generation fixes, tfmpath processing
git-svn-id: svn://tug.org/texlive/trunk@15943 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/bin/win32/dviout.bat7
-rw-r--r--Master/tlpkg/dviout/gen_pk25
2 files changed, 21 insertions, 11 deletions
diff --git a/Master/bin/win32/dviout.bat b/Master/bin/win32/dviout.bat
index f950efc9677..bd3a74485c2 100755
--- a/Master/bin/win32/dviout.bat
+++ b/Master/bin/win32/dviout.bat
@@ -35,6 +35,7 @@ set tfmpath=%tfmpath:!!=%
set tfmpath=%tfmpath:/=\%
rem Split font path var into arguments and rebuild it with only existing 'fonts' dirs
call :build_tfmpath ";" "%tfmpath:;=" "%"
+if "%tfmpath:~0,1%"==";" set tfmpath=%tfmpath:~1%
rem Use TL gostscript
set GS_LIB=%tlroot%\tlpkg\tlgs\fonts;%tlroot%\tlpkg\tlgs\lib;%tlroot%\tlpkg\tlgs\Resource
@@ -67,11 +68,7 @@ for /f "delims=;" %%I in ("%fontsdir%") do (set fontsdir=%%~sfI)
rem Continue if dir does not exist
if not exist "%fontsdir%\" goto :build_tfmpath
rem Add dir to path
-if not defined tfmpath (
- set tfmpath=%fontsdir%
-) else (
- set tfmpath=%tfmpath%;%fontsdir%
-)
+set tfmpath=%tfmpath%;%fontsdir%
goto :build_tfmpath
:no_tl
diff --git a/Master/tlpkg/dviout/gen_pk b/Master/tlpkg/dviout/gen_pk
index 2357e63c5d2..2d04b7c3b8e 100644
--- a/Master/tlpkg/dviout/gen_pk
+++ b/Master/tlpkg/dviout/gen_pk
@@ -1,8 +1,21 @@
%1st
-setlocal
-for %%I in (mktexpk.exe) do set "MKTEXPK_EXE=%%~$PATH:I"
-if not defined MKTEXPK_EXE exit 1
-%2nd
-"%MKTEXPK_EXE%" --mfmode / --dpi ^d --bdpi ^D --mag ^M "^s"
-%3rd
+setlocal enableextensions disabledelayedexpansion
+for %%I in (mktexpk.exe) do set "mktexpk=%%~$PATH:I"
+if not defined mktexpk exit 1
+for /f "usebackq skip=17 tokens=1,2,3* delims=|" %%I in (%0) do (
+ set dpi=%%I
+ set bdpi=%%J
+ set mag=%%K
+ set font=%%L
+ goto :sanitize
+)
+:sanitize
+if defined dpi set "dpi=%dpi:"=%"
+if defined bdpi set "bdpi=%bdpi:"=%"
+if defined mag set "mag=%mag:"=%"
+if defined font set "font=%font:"=%"
+"%mktexpk%" --mfmode / --dpi "%dpi%" --bdpi "%bdpi%" --mag "%mag%" "%font%"
del %0 & exit %errorlevel%
+%2nd
+^d|^D|^M|^s
+%3rd \ No newline at end of file