Hello everybody.
Go excuse for my bad English, because I'm Russian.
Three days ago, began to study GLBasic (this is the first programming language that I study). And immediately ran into another problem:
CODE:
----------------------------------------------
scr$ = "Some text on russian"
na$ = "Some text on russian"
LOADFONT "1.bmp", 1
SETFONT 1
WHILE KEY(1)=0
GETSCREENSIZE sx#, sy#
PRINT scr$ + sx#+ na$ +sy#, 25,25
SHOWSCREEN
WEND
END
---------------------------------------------------
GETSCREENSIZE comand displays 640x480, but my screen resolution is 1024x768! What is my mistake? Why the program does not display my real screen resolution?
My second problem is russian fonts. I created a font with "Font Creator" in GLBasic, save him as 1.bmp. But instead of Russian letters displayed various symbols and letters! What is my mistake?
Please help me with my two little problems. Thanks!
First of all! Welcome :)
GETSCREENSIZE will deliver the size of the current window, not your desktop resolution. By default the window size is set to 640x480 unless you change in your project settings or by the SETSCREEN command.
Is there a GLBasic command reads the monitor mode support?
Well, there is an INLINE solution:
http://www.glbasic.com/forum/index.php?topic=961.msg4965#msg4965 (http://www.glbasic.com/forum/index.php?topic=961.msg4965#msg4965)
Thanks
Kitty Hello, for very helpful post
QuoteWell, there is an INLINE solution:
http://www.glbasic.com/forum/index.php?topic=961.msg4965#msg4965 (http://www.glbasic.com/forum/index.php?topic=961.msg4965#msg4965)
I would like to know more about fonts, more precisely about the support of Russian letters!
I think it would be a good idea if you post the bmp file with the font (as an attachment).
QuoteI think it would be a good idea if you post the bmp file with the font (as an attachment).
(http://pic.ipicture.ru/uploads/091117/gT1RD4pCMH.jpg)
the font looks ok for me. What about a small code snippet to demonstrate the failure?
CODE:
------------------------------------------
LOADFONT "1.bmp", 1
SETFONT 1
WHILE KEY(1)=0
GETSCREENSIZE sx#, sy#
PRINT "ßÃ'â,¬Ã¸Ã²ÃµÃ'‚ üøÃ'â,¬!", 25,25
SHOWSCREEN
WEND
END
------------------------------------------
SCREENSHOT:
(http://pic.ipicture.ru/uploads/091118/d2x7Vsv34K.png)
I can't copy/paste these characters. What do you get when you do this:
a$ =" ßÃ'â,¬Ã¸Ã²ÃµÃ'‚ üøÃ'â,¬!"
FOR i=0 TO LEN(a$)
DEBUG ASC(MID$(a$,i,1)+", "
NEXT
DEBUG "\n"
(turn debug mode on)
Then i run this code in debug mode
CODE:
---------------------------------------
a$ =" ßÃ'â,¬Ã¸Ã²ÃµÃ'‚ üøÃ'â,¬!"
FOR i=0 TO LEN(a$)
DEBUG ASC(MID$(a$,i,1)+", " // <----- syntax error
NEXT
DEBUG "\n"
---------------------------------------
Displayed "syntax error"
a closing bracket is missing
try: DEBUG ASC(MID$(a$,i,1))+", "