Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can anyone help me (font sizes)
#1
hi i am doing a project for as level computing in quick basic and for my title screen i want the text to be bigger is there any way of changing the font size.
Reply
#2
make your own
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#3
and how do i do that in quickbasic
Reply
#4
PSET, LINE, CIRCLE...

There are two ways of doing this, circa early 1990s:

1) A function that outputs your characters with line statements tied to a SELECT CASE.

2) A function that copies the regular characters to memory *you know, the one that tells you the color at a particular point..) and then outputs them back using PSET or LINE statements larger than they were before..
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#5
There has always been a third way, using the DRAW statement. I made my first DRAW characters way back in 1980 on the Color computer. I have since redone it in QuickBASIC 4.5. Works great, especially since I can change scales very easily, to draw different sizes. For instance, using the equivalent of 5-points high, with a scale (multiplier) of 1, I can easily change the scale to 2, or 3, or 4, thus getting letters of 5, 10, 15 or 20 points high, and the width is also 1, 2, 3 or 4 times.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#6
Could I maybe use this DRAW routine? With proper credit of course.
Reply
#7
axipher:

Here it is. Please note that it isn't a "finished" product, in that the user must know what is going on. For instance, right now, it is set up for TEST. To not use TEST, one must remark out the 6th line shown. Then, it is set up for SCREEN 13, at present, but you can change it to SCREEN 12 or any other screen you wish, all by altering the program slightly. Also, the present size is selected as SIZE = 3 in the 4th line, so, for any other size, you have to change the value in the program. Also, the starting coordinates must be selected, according to your needs. The default I have selected is x = 1, y = 10. One mor thing. I have only furnished the 26 upper case letters. For any other symbol, you will have to add more characters to the present ones. If anyone has a problem doing so, post here, and you will receive an answer.

By my saying that it is not a "finished" program, I mean that it is not a program that you run, and that it asks you what size you want, what screen you want, etc, even though it wouln't take much to add those features, which I leave to who ever wants to use this code, which is free and public, as is all code here published.
Code:
'LETTERS using the DRAW command
CLS
DIM L$(65 TO 90) 'L$() will hold the letters A to Z

SIZE = 3

'to skip test, remark out the next line
TEST = 1
SC = 13

SELECT CASE SC
  CASE 12: Xmax = 639: Ymax = 449
  CASE 13: Xmax = 319: Ymax = 199
END SELECT

SCREEN SC

'starting coordinates
x = 1
y = 10
DRAW "BM" + STR$(x) + "," + STR$(y)

SIZE = 3
LineNum = 1
Separation = 2 'horizontal distance between letters

GOSUB FormLETTERS 'forms the strings to draw the letters

IF TEST = 1 THEN
  'string to draw:
  LD$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  GOTO 5
END IF

INPUT " ENTER SENTENCE DESIRED", LD$

5 :
FOR I = 1 TO LEN(LD$)
  A$ = MID$(LD$, I, 1)
  DRAW "S" + STR$(4 * SIZE) + L$(ASC(A$)) + "BR" + STR$(Separation)
  IF A$ = "I" THEN SPI = SPI + 2
  GOTO 10:
  IF (I * 5 - SPI) * SIZE >= Xmax - 4 * SIZE THEN
    LineNum = LineNum + 1
    DRAW "BM" + STR$(x) + "," + STR$(y + (LineNum - 1) * 7 * SIZE)
  END IF
10 :
NEXT I

PRINT LD$
END
'==================================================================
'Subroutines

FormLETTERS:
L$(65) = "BD6U5E1R2F1D2L4R4D3BU6"           'A
L$(66) = "R3F1D1G1L3R3F1D1G1L3U6BR4"        'B
L$(67) = "BR4BD1H1L2G1D4F1R2E1BU5"          'C
L$(68) = "R3F1D4G1L3U6BR4"                  'D
L$(69) = "R4L4D3R3L3D3R4BU6"                'E
L$(70) = "R4L4D3R3L3D3BR4BU6"               'F
L$(71) = "BR4BD1H1L2G1D4F1R2E1U1L1R1BU4"    'G
L$(72) = "D3R4L4D3BR4U6"                    'H
L$(73) = "R1D6L1R2BU6L1R1"                  'I
L$(74) = "BD5F1R2E1U5"                      'J
L$(75) = "D6U3F3H3E3"                       'K
L$(76) = "D6R4BU6"                          'L
L$(77) = "D6U6F2E2D6U6"                     'M
L$(78) = "D6U5F4D1U6"                       'N
L$(79) = "BR3L2G1D4F1R2E1U4H1BR1"           'O
L$(80) = "R3F1D1G1L3U3D6BR4BU6"             'P
L$(81) = "BR3L2G1D4F1R2E1H1F2H1U4H1BR1"     'Q
L$(82) = "R3F1D1G1L3U3D6U3R1F3BU6"          'R
L$(83) = "BD5F1R2E1U1H1L2H1U1E1R2F1BU1"     'S
L$(84) = "R2D6U6R2"                         'T
L$(85) = "D5F1R2E1U5"                       'U
L$(86) = "D4F2E2U4"                         'V
L$(87) = "D5F1E1U1D1F1E1U5"                 'W
L$(88) = "D1F4D1BL4U1E4U1"                  'X
L$(89) = "D1F2D3U3E2U1"                     'Y
L$(90) = "R4D1G4D1R4"                       'Z

RETURN
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#8
Pretty nice. I may work on this in spare time for thicker letters and the full alphabet.
Reply
#9
My letters were formed using a 6-high by 4-wide pattern, to get decent-looking letters. A 5x5 pattern es also feasable, but not as good. And, our friend, Antoni Gual, posted a program that uses Screen 13 and draws a 5-high by 4-wide font! You can find it posted by Antoni, here:
http://forum.qbasicnews.com/viewtopic.php?t=10587
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)