Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
font size
#1
Does anyone know of an engine or something that i can use to make fonts bigger? i'm using screen 12. thanks.
Reply
#2
Use a library. If you're looking to use screen 12, then check out future library. I'm not too familiar with it, but there's probably something in there you're looking for. I'm only familiar with screen 13 libraries.
Reply
#3
You mean scalable fonts (multiple sizes) or just a big font?
Reply
#4
i guess scalable fonts- i just want the words to be bigger, because i'm writing a program for someone with bad eyesight, and normal size fonts are too small for him to comfortably read.

Just as a thought, would using a different screen entirely be better? i.e. - would it allow for a better library or something?
Reply
#5
Not really. Most scalable font routines for QB are either highly pixelated at large sizes, or draw the letters as stick figures with a line thickness of 1 pixel regardless of scale. Neither are really great if you want large, nice looking, readable text.

QB 7.1 comes with a font toolkit that can load and use Windows 3.x bitmap fonts. FON files (Win3.x fonts) usually include a small variety of different point sizes - as high as 64 point I think. You could try that.

And if you need FON files, my font editor includes some of the ones that originally came with Win 3.x, all of which should work with QB 7.1's toolkit.
Reply
#6
You can use this library:
http://www.fomalhautsoft.narod.ru/download/screen12.zip
Store all the letters you need to the array. Write the sub that put these letters to the screen (with PUT12) according to the given string. You can store default font, then put the letters with SPUT12 (scaled put) with size you want.

Example:
Storing symbols:
DEFINT A-Z
'$INCLUDE: 'vga.bi'

SCREEN 12

DIM sym(20000)
symxsize = 8
symysize = 16
symsize = 2 + symysize * INT((symxsize + 7) / 8) * 4
'calculates quantity of array INTEGER items for single letter

FOR n = 32 TO 127
LOCATE 1, 1: PRINT CHR$(n)
Get12 0, 0, symxsize, symysize, sym((n - 32) * symsize)
NEXT n

DEF SEG = VARSEG(sym(0))
BSAVE "screen12.fnt", VARPTR(sym(0)), 96 * 2 * symsize
'* 2 because the length here is in bytes
DEF SEG



Printing the text:
DECLARE SUB textprint (x%, y%, m$)

DEFINT A-Z
'$INCLUDE: 'vga.bi'

SCREEN 12

DIM SHARED sym(20000), symxsize, symysize
CONST symsize = 66

DEF SEG = VARSEG(sym(0))
BLOAD "screen12.fnt", VARPTR(sym(0))
DEF SEG

DO
symxsize = INT(RND * 30) + 8
symysize = INT(RND * 50) + 16
x = INT(RND * (640 - symxsize * 15))
y = INT(RND * (480 - symysize))
textprint x, y, "It woooooorks!!"
LOOP WHILE INKEY$ = ""

SUB textprint (x, y, m$)
FOR n = 1 TO LEN(m$)
nn = ASC(MID$(m$, n, 1)) - 32
sput12 x + (n - 1) * symxsize, y, symxsize, symysize, 0, sym(symsize * nn), pset12
NEXT n
END SUB
Reply
#7
Try Josh Heaton's font routines at my website(www.basix.8m.net in the downloadZ section) or try searching for Bobby Krusty's font routines on the web. Using his editor you can resize fonts provided by him. He has provided the most used fonts like Arial, Times New Roman etc.
Reply
#8
Or if you do want to use another screen mode after all that: SCREEN 13

Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)