VOGONS


TEXT font size

Topic actions

First post, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear All,
I am using Dosbox-0.74 and need to reduce font size in the text displayed while running dosbox. In which part of the code can i make changes in order to effect dosbox font size. when i run applications font size is bit big and unable to accommodate 16 rows in my display. so can any one help me.

Thanks in advance.
Chinna.

chinna

Reply 2 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear Dominus Karmawhore,

Thanks for your reply. As you said if we can't control application font size. is there any other way to fit 16 rows in 320x240 display.
If we apply font changes in Dosbox source without running any application can we change the font size. Basically can we change font size in dosbox. Can you suggest me any idea.

Thanks in advance,
Chinna.

chinna

Reply 3 of 18, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You could use int10 calls to load a 8x15 font, if you get/make one somehow

1+1=10

Reply 4 of 18, by robertmo

User metadata
Rank l33t++
Rank
l33t++

you mean this?
i just start vc.com alt+F9 to switch to that font (it is called "EGA lines")and quit vc. and it still works.

Reply 5 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear h-a-l-9000

I tried changing font from 14 to 08 by changing int10 by replacing
int10_font_14[256 * 14] to Bit8u int10_font_08[256 * 8] in src/gui/sdlmain.cpp. correct me if i am wrong.

After this change also font didn't worked for me.

Thanks in advnce,
Chinna

chinna

Reply 6 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

A 320x240 text display? Only tweaked VGA graphics modes have that exact resolution. Using machine=cga with mode 0 or 1 text (40 column) has a native 320x200 resolution, but still with 25 rows. Many DOS programs expect 25 rows, anyway, and won't adapt to fewer.

What is this for, some hand-held device?

Reply 7 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear ripsaw8080,
Yes as u guessed. It is for a hand-held device. All my applications need 16rows. its a landscape display with 320X240 resolution. I am able reduce 25 rows to 15rows as this is exactly fitted into display i am using. I hard coded that to 15 rows, if its 16 rows, last row is below display active area. so my idea is if i can reduce TEXT FONT SIZE I can fit extra row.

Thanks in advance,
Chinna

chinna

Reply 8 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear ripsaw8080,
Tested with machine=cga but what mode i should use, there are securemode and oplmode. when i added machine=cga under dosbox
section in conf file. font changed to bold. correct me if i am wrong. any more suggestions.

chinna

Reply 9 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The attached TSR program sets up a 320x240 native resolution with an 8x15 font, yielding a 40x16 text display. Mode 1 is used as a base because the horizontal parameters are already in place, so only the vertical must be adjusted. The display is double-width and double-height to create a typical 60 Hz frame rate. The font is the VGA 8x16 font with the last line deleted. There is a chance this will work on real VGA, but I don't suggest trying it unless you like taking chances with your hardware.

You can put the TSR in the [autoexec] section of the conf file, or in the command line of the DOSBox executable, to activate the display at startup. If the display becomes deactivated, such as by the DOSBox shell CLS command that sets mode 3, just run the TSR again and it will reactivate without reinstalling itself.

Few DOS programs will adapt well to 40x16 text, and the DOSBox shell is no exception. However, if I understand correctly, your plan is to use purpose-built programs where you should have control over their use of the display. When the TSR is resident, your programs can activate the display by setting mode 1.

Reply 10 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear ripsaw8080,
I will test as you said and get back to you about the development .

chinna

Reply 11 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear ripsaw8080,
For the first time i am able to change the font size of my application. After running your TSR program from conf file font size increased. and two of my applications are not opening at all.
I asked for reduction in font size but it increased drastically. I want to fit 16 lines of text in 320X240 Display. i am attaching the Display with font after executing 40X16.COM
You have given 40X16.ASM how can i modify & create font sizes so as to fit 16 lines in my display. Yes as you said i want to run purpose built programs.

chinna

Reply 12 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

What kind of system is this? DOSBox for phones and the like should use the native 320x240 resolution of the display, but with whatever you're using it's showing the scaler pixel doubling. Double-height and double-width create a normal VGA refresh rate for a 320x240 resolution. You could change the display to normal height and normal width, but the refresh rate would be quadrupled or so, which is not good.

It seems like what you're doing is just showing the upper left corner of the full DOSBox display, which is just a clipped portion, and actual dimensions of the display are past the edges of the visible area.

Reply 13 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Yes i as you said it is left top of dosbox. folowing is the default display. In which 15 rows are displayed i need to display an extra line. Its is a embedded machine with 320X240 display screen

chinna

Reply 14 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Maybe all you want to do is load a 15-line font, but that doesn't change the emulated display dimensions to 320x240; there will still be active screen area beyond the right and bottom edges of your 320x240 viewport.

If you just want the font, get the PC Mag FONTEDIT program available here:
ftp://ftp.pcmag.com/archives/volfiles/VOL7N15.ZIP

Run the font editor, move the cursor to the last row and press F1 to delete the row. Then you can save the 15-line font and reload it subsequently.

You can, of course, use any other font editor program you prefer.

Reply 15 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

I will try what you suggested.
There will be active display area beyond the boundaries. I dont worry about that bcos i adjusted the cursor to be at the bottom of my display active area, when i exit the application. my only problem is to to get displayed the extra line which is going below the active area wich is below the option (O) MEMORY STATUS CHECK as displayed in the figure shown in last post
Thanks for your support and time..

chinna

Reply 16 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Dear ripsaw8080

I am bit busy with other works so late response. As you said i tried by deleting the last row, how can i reload it how to get the entire newly generated font into assembly language file and how to compile it to generate FILE.COM exe.

Regards,
Chinna.

Reply 17 of 18, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The FONTEDIT screen says "F4 Save" in case you missed it somehow. That will give you a .COM file with your choice of filename that loads the font when you run it.

Reply 18 of 18, by chinna

User metadata
Rank Newbie
Rank
Newbie

Thank you i will check for the file