
-----------------------------------
iop
Thu May 20, 2004 1:33 pm

Problem with Fonts
-----------------------------------
I have this program
var fontID : int
fontID := Font.New ("Times New Roman:18x12:Bold")
var theDateTime : string
theDateTime := Time.Date
var l, u := 1

var h : int

get h %how high it goes after completeing one row

loop
    View.Update
    l := l + 1
    if l >= maxx then
        u := u + h
        if u >= maxy then
            u := 0
        end if
        l := 1
    end if
    Font.Draw (Time.Date, l, u, fontID, black)
    delay (10)
    cls
end loop


How can I make it so that the User can choose the parameters in fontID := Font.New ("Times New Roman:18x12:Bold") 

-----------------------------------
SuperGenius
Thu May 20, 2004 2:40 pm


-----------------------------------
have a string variable called font. Then ask the user to enter parameters seperately like:


put "enter size"
get size
put "enter font type"
get ftype


then add them all together:

font:= "size" + "type"
and then say fontID = (font)

keep in mind that what i've just said is a concept, so you still have to work out the correct syntax and stuff on your own.

-----------------------------------
iop
Thu May 20, 2004 2:47 pm


-----------------------------------
If you ment
var fontID : int
var size, ftype, font : string
put "enter size"
get size
put "enter font type"
get ftype
font := "size" + "type"
fontID := (font)
Then it does not work

-----------------------------------
SuperGenius
Thu May 20, 2004 2:56 pm


-----------------------------------


keep in mind that what i've just said is a concept, so you still have to work out the correct syntax and stuff on your own.

This is not actual code. My idea of helping people is giving them advice and then they do it for themselves. Just collect the parameters and add them into one string and call font.new with your string. just make sure the syntax is right.
