Wednesday, 2 March 2016

E2B v1.78j with large font support

Recent versions of grub4dos 0.4.6a support 24x24 pixel fonts.

I have added two font hex files to E2B v1.78j and also added some menu support for it.
The two font files added are fxt and sft (traditional Chinese and simplified Chinese, I think?) - they also support English characters but not other language characters, because they do not contain any special characters such as umlaut Ü, etc.. Also, the odd English character may be missing too, e.g. ~.

Because these font are bigger, it means there are less rows and columns on the screen.

800x600   = 33 columns by 25 rows
1024x768 = 42 columns by 32 rows

The font seems to work best for 1024x768 displays because if you set 800x600, then the characters seem run off the end of the screen instead of wrapping-round. This means that the F1 Help menus and some of the console mode text that E2B uses (e.g. if booting Windows Install ISOs), is cut off in 800x600 mode.

Here is an example of a 1024x768 menu:


This contains an animation and a STAMP (top right of menu).

The \_ISO\MyE2B.cfg file is in the \_ISO\docs\Templates\LargeFont folder and is shown below:

!BAT
# E2B LARGE FONT DEMO
# Some menu functions, text and Help menus may not fit on 800 x 600 - 1024x768 is better

# Only English and Chinese supported
if "%LANG%"=="" set LANG=ENG
#set KBD=KBD_QWERTY_UK.g4b

set GMODE=1024
# to use 800x600 uncomment this line
#set GMODE=800

# use 1024x768 background
if "%GMODE%"=="1024" set MYWBMP=/_ISO/docs/Templates/StripedFlat_pwd_is_fred/stripedflat.bmp.gz

# FONT24 specifies the hex font file to use, must be 24x24 characters
# if 1024x768 then 85x32 lines, if 800x600 then 66x25 lines
# choose a 24 pixel high font - yxt or sft fonts (trad or simplified chinese)
set FONT24=/%grub%/yxt

set bdwidth=1
set rstart=3
set menuw=62
# topstart - heading then must start on line 3 or lower (spaces will overwrite top of menu)
set topstart=3
set noitems=14
if "%GMODE%"=="1024" set noitems=20
# use tophelp = topstart + noitems  for menu help text just under menu box - for 640x480  noitems=18 tophelp=20 - for 800x600  noitems=24 tophelp=26
set /a tophelp=%topstart% + %noitems%
set HBTM=2402
if "%GMODE%"=="1024" set HBTM=3003

set HEADING=EASY2BOOT - MAIN MENU %B64% (%VER%)
set CENTREHD=1

# if 800x600 then Help menus are too big for screen
if not "%GMODE%"=="1024" set NOF1=1

# ---- ADVANCED MENU SETTINGS ----- 

set STAMP1=0x80=584=40    /_ISO/docs/Templates/Animate/easy2boot_stamp.bmp

# not enough room for animation if 800x600
if not "%GMODE%"=="1024" goto :EOF

set trans=0x80 && set infinite=0x10
set /A type=%infinite% + %trans% > nul
set delay=0x3
set last=09
set x=850
set y=80
# use (bd) for boot drive or (hd0,0), so that if root drive changes it continues to load from correct drive.
# if images are inside a disk image, specify (fd3)
set FILE=(fd3)/frame_0001.bmp
set ANIMATE=%type%=%delay%=%last%=%x%=%y% %FILE%
set trans= && set infinite= && set delay= && set type= && set last= && set y= && set x= && set FILE=
# If using a floppy disk image (fd3), we must specify the image file
# The floppy disk image is loaded into memory and so the animation is faster and does not constantly access the disk
# ANIMFD3 if a floppy disk image file containing the files - it is mapped to fd3 by E2B
set ANIMFD3=/_ISO/docs/Templates/Animate/E2B_GIF.ima

The new parameter is FONT24 which is used to specify which font file to load.
You cannot use FONT24 together with FONT (to load special English fonts).
To try 800x600, just uncomment the set GMODE=800 line.


The new FONT24 feature should be regarded as 'experimental' at the moment!
If you find a better font file with non-English characters (German, Spanish, etc.) please let me know.