GETSCREENSIZE and FONT problems

Previous topic - Next topic

Neo-Bagamut

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!
AMD Phenom X3 8750 BE (2.4 Ghz); DDR2 1066 Mhz PC8500 (2048 Mb); MSI GeForce NX8800GT GDDR3 512 Mb | 256 bit; Windows XP SP3 x86.

Quentin

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.

Neo-Bagamut

Is there a GLBasic command reads the monitor mode support?
AMD Phenom X3 8750 BE (2.4 Ghz); DDR2 1066 Mhz PC8500 (2048 Mb); MSI GeForce NX8800GT GDDR3 512 Mb | 256 bit; Windows XP SP3 x86.

Kitty Hello


Neo-Bagamut

Thanks Kitty Hello, for very helpful post

QuoteWell, there is an INLINE solution:
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!
AMD Phenom X3 8750 BE (2.4 Ghz); DDR2 1066 Mhz PC8500 (2048 Mb); MSI GeForce NX8800GT GDDR3 512 Mb | 256 bit; Windows XP SP3 x86.

Quentin

I think it would be a good idea if you post the bmp file with the font (as an attachment).

Neo-Bagamut

QuoteI think it would be a good idea if you post the bmp file with the font (as an attachment).
AMD Phenom X3 8750 BE (2.4 Ghz); DDR2 1066 Mhz PC8500 (2048 Mb); MSI GeForce NX8800GT GDDR3 512 Mb | 256 bit; Windows XP SP3 x86.

Quentin

the font looks ok for me. What about a small code snippet to demonstrate the failure?

Neo-Bagamut

CODE:
------------------------------------------
LOADFONT "1.bmp", 1
SETFONT 1
WHILE KEY(1)=0
  GETSCREENSIZE sx#, sy#
  PRINT "ПÃ'â,¬ÃÂ¸ÃÂ²ÃÂµÃ'‚ миÃ'â,¬!", 25,25
  SHOWSCREEN
WEND
END
------------------------------------------

SCREENSHOT:
AMD Phenom X3 8750 BE (2.4 Ghz); DDR2 1066 Mhz PC8500 (2048 Mb); MSI GeForce NX8800GT GDDR3 512 Mb | 256 bit; Windows XP SP3 x86.

Kitty Hello

I can't copy/paste these characters. What do you get when you do this:

Code (glbasic) Select

a$ =" ПÃ'â,¬ÃÂ¸ÃÂ²ÃÂµÃ'‚ миÃ'â,¬!"
FOR i=0 TO LEN(a$)
   DEBUG ASC(MID$(a$,i,1)+", "
NEXT
DEBUG "\n"

(turn debug mode on)

Neo-Bagamut

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"
AMD Phenom X3 8750 BE (2.4 Ghz); DDR2 1066 Mhz PC8500 (2048 Mb); MSI GeForce NX8800GT GDDR3 512 Mb | 256 bit; Windows XP SP3 x86.

Quentin

a closing bracket is missing

try:  DEBUG ASC(MID$(a$,i,1))+", "