home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1995 November
/
PCWK1195.iso
/
inne
/
podstawy
/
dos
/
4dos
/
4uzytki
/
ez-btm11.exe
/
FNT.BTM
< prev
next >
Wrap
Text File
|
1994-02-07
|
7KB
|
248 lines
: FNT.BTM
rem Loads VGA/EGA fonts with Yossi Gil's LOADFONT (c)
rem Loads Hercules Graphics Card Plus fonts with RAMFONT
rem Type FNT h (or FNT ?) for help
rem Type FNT gil for more information about Gil's LOADFONT.
rem Type FNT for a selection menu.
rem Itamar Even-Zohar (itamarez@plato.tau.ac.il)
rem Last edited: February 5, 1994
if %@index[%1,h] eq 0 .and. %@len[%1] eq 1 .or. %@index[%1,?] eq 0 .and. %@len[%1] eq 1 goto help
if "%1"=="gil" goto gil
setlocal
gosub chk_video
if "%fontpath"=="" gosub make_path
set path=%path%%fontpath%
:chk1
if %@index[%fontpath,%@char[59]] gt 0 gosub ana_path
gosub fonts_names
if "%1" == "" goto select
:selection
iff "%1" == "0" .or. %1==%@char[27] then goto FINISHED
elseiff "%1" == "h" .or. "%1"=="?" then goto help
elseiff "%1" == "m" then set font=%hebmed
elseiff "%1" == "k" then set font=%hebktabg
elseiff "%1" == "s" then set font=standard.fnt
elseiff "%1" == "f" then set font=sanserif.fnt
elseiff "%1" == "r" then set font=%hebsans
elseiff "%1" == "b" then set font=%hebbig
elseiff "%1" == "2" then goto OTHER
elseiff "%1" == "3" then goto FONTS
else
set font=%1 ^ goto extension
endiff
:load
if not exist %@search[%font] (echo %@upper[%@search[%font]] not found^goto finished)
if %video==1 loadfont %font
if %video==2 ramfont %@search[%font]
cls
if %_batch lt 2 screen 2 0 %@upper[%font] now loaded
goto finished
:other
echo ('FNT' extension can be dropped)
input Type font's name (must be in FONTPATH subdirectory) : %%font
:extension
rem (Allow typing font filename without the FNT extension)
iff %@index[%font,.f] == -1 then
set font=%font.FNT
endiff
goto load
:no_loader1
:gil
echo.
text
This batch requires Yossi Gil's LOADFONT.COM (c), which should be
stored in a subdirectory defines in your "path" command.
(LOADFONT.COM is stored in file fntcolxx.zip, and is downloadable
from ftp.technion.ac.il, cd pub/supported/cs/msdos)
endtext
echo.
quit
:no_loader2
echo.
echo Needs RAMFONT.COM for loading HGC+ fonts
echo.
quit
:un_video
echo.
echo This batch runs on VGA /EGA, or Hercules Graphics Card Plus
echo.
quit
:select
cls
screen 2 2 (A loader for VGA/EGA fonts, or HGC+ fonts)
screen 4 0
text
0 or Esc = Exit
h or ? = Help
m = Hebrew MEDIUM fonts (+ standard Roman)
r = Hebrew MEDIUM fonts (+ sanserif Roman)
k = Hebrew KTAB fonts (+ standard Roman)
b = Hebrew BIG fonts (+ standard Roman)
s = STANDARD fonts (no Hebrew)
f = SANSERIF fonts (no Hebrew)
2 = User selected font
3 = Select font from directory
endtext
drawhline 12 1 45 2 whi on bla
drawbox 3 0 15 46 2 whi on bla
screen 18 0 (F1 for help on option 3)
screen 17 0
inkey /K"[f1][esc]0h?23mkbsfr" Type your choice: %%1
if %1==@59 gosub menu2
goto selection
:fonts
if %video==2 set font=%@search[%font]
set n=-1
call settemp
set f=%@unique[%temp]
if not direxist %fontpath (echo Path "%fontpath" not found^goto exit)
select /d echo>> %f (%fontpath\*.f*)
:fontfile
set n=%@eval[%n+1]
set nl=%@lines[%f]
if %nl==-1 (set font=No new font^goto end)
if %n gt %nl goto end
set font=%@line[%f,%n]
iff %nl gt 0 then
inkey /K"YN" Load now %font? (Y/N) %%rep
if %rep == Y if %video==1 (loadfont %font^*list %@search[ascii.tbl]^cls)
if %rep == Y if %video==2 (ramfont %font^*list %@search[ascii.tbl]^cls)
else
if %video==1 loadfont %font
if %video==2 ramfont %font
endiff
if %nl gt 0 goto fontfile
:end
if .%fp2 != . (set fontpath=%fp2^unset fp2^goto chk1)
del /q %f
cls
screen 1 0 %font loaded
:exit
endlocal
quit
:finished
if %1 == 0 .or. %1 == %@char[27] (cls^echo Aborted...)
endlocal
if not "%rep"=="" unset rep
quit
:----------------sub-routines-----------------
:-(0)--Checking video type--------------------
:chk_video
:vga
if not %_video==vga .or. %_video==ega goto mono
set video=1
::if "%@search[LOADFONT.COM]" == "" goto no_loader1
if not exist %@search[LOADFONT.COM] goto no_loader1
return
:mono
if not %_video==mono goto un_video
if not exist %@search[ramfont] goto no_loader2
set video=2
return
:-(1)--saving diffrent fonts files------------
:fonts_names
iff %video==1 then
set hebsans=vga-hbsn.fnt
set hebmed=heb-medp.fnt
set hebbig=heb-ran.f16
set hebktabg=heb-ktab.f16
elseiff %video==2 then
set hebsans=heb-sans.fnt
set hebmed=heb-med.fnt
set hebbig=heb-big.fnt
set hebktabg=heb-ktab.fnt
endiff
return
:-(2)--sub-routines for making "font path"----
:make_path
cls
screen 6 0
text
FNT.BTM needs to know where you keep your font files. Please define
a "fontpath" variable in your AUTOEXEC.BAT file. The syntax is:
FONTPATH=<name_of_path[; name of path;...]>
You can however specify a name / names for a single run now.
endtext
inkey /k"YNQ" Do you wish to indicate your fonts path(s) now (Y/N/Q)? %%rep
iff %rep == Y then gosub path_name
elseiff %rep == N .or. %rep == Q then
echo program aborted
quit
:path_name
input Type full pathname(s) for your fonts (put ";" for more than one): %%fontpath
return
:-(3)---sub-routine for analyzing font path---
:ana_path
:: (if fontpath contains more than one subdirectory,
:: it is parsed by this routine)
set position=%@index[%fontpath,%@char[59]]
set fp2=%@substr[%fontpath,%@eval[%position+1]]
set fontpath=%@substr[%fontpath,0,%position]
return
:------help text on option 3--------
:menu2
:mult
screen 16 0
text
Option '3' in the selection menu allows loading
a font from your fonts directory. If you have
defined more than one subdirectory, they will be
displayed consecutively. Multiple loading is
enabled by marking filenames (use spacebar to
mark/unmark).
endtext
inkey /K"[f1][esc]023mkbsfr" Type your choice: %%1
return
:--------end of sub-routines--------
:-----------begin help--------------
:help
cls
screen 3 0
text
FNT.BTM loads VGA/EGA, and HGC+ screen fonts. It needs RAMFONT.COM
for HGC+, or Yossi Gil's LOADFONT.COM (c) for VGA/EGA. It also needs
font files. FNT.BTM will load (1) any of the 6 font files specifically
included (type the relevant switch), or (2) any font file indicated by
name (the extension "fnt" can be omitted), or (3) any font from a
subdirectory where font files are stored. If you keep fonts in more than
one subdirectory, they will be displayed one after the other, if you mark
any file in the menu you will get. You must define a "fontpath" variable
in your AUTOEXEC.BAT; if you haven't, you will be asked to indicate your
fonts path/s.
USAGE: FNT [options|<font_filename>]
(loadfont.com)
Gil's LOADFONT.COM (c), can be downloaded from ftp.technion.ac.il
cd pub/supported/cs/msdos, file fntcolxx.zip ('xx' stand for the
version number).
(fontpath)
FNT.BTM needs to know where you keep your font files. Please define
a "fontpath" variable in your AUTOEXEC.BAT file. The syntax is:
FONTPATH=<name_of_path[; name of path;...]>
endtext
quit
:-------------end help--------------