Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / How to change the font in editor - I am converting my game to Russian

Author
Message
billy777
23
Years of Service
User Offline
Joined: 9th Jan 2003
Location:
Posted: 9th Apr 2008 21:24
As most know... Russian language has strange characters.

My program is looking like this when I try to put the Russian text in...

center text 400,100,"?????"


instead of this...


center text 400,100,"Назад"


I have tried to change the font in DarkEdit and in DB directly but nothing is working - I have tried to change the drop down list box for "Script" to Cryllic - but it still does not seem to work.

I also thought about using NOTEPAD as the editor and then just compiling to exe with DOS comand line instructions - but not familiar with command line instructions for DB.

Thanks
Bill
Omega gamer 89
18
Years of Service
User Offline
Joined: 10th Sep 2007
Location: Pittsburgh, PA
Posted: 9th Apr 2008 21:52
... did you try the SET FONT command? Its in the index of the help file under the text commands.
Did you try that?

...but I am the ferret king!!!! BWAHAHAHAHAHAHA!!!! tremble before my ferret minions!

Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Apr 2008 21:53
you need to use a font that supports russian characters and set the charset to the right one
look up SET TEXT FONT in the help file

Omega gamer 89
18
Years of Service
User Offline
Joined: 10th Sep 2007
Location: Pittsburgh, PA
Posted: 9th Apr 2008 22:18
right, thats what I meant, SET TEXT FONT. sorry for the slip up.

...but I am the ferret king!!!! BWAHAHAHAHAHAHA!!!! tremble before my ferret minions!

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 9th Apr 2008 22:52
I think billy777 is refering to the editor itself where you type the program, not only the output.

@billy777
If you use the default editor that comes with DBC (I know - it's cumbersome and not ideal for development) there should be an ini file that comes with it that resides in the same directory as DB.exe

Under [SETTINGS] you should see several language setup options. If you don't have the appropriate help language files, the only thing you have to change is the TextLanguage-Charset and set it equal to 204:



In DarkEdit, I remember reading somewhere on the forums that there are some problems with the font setup and it doesn't lend itself to behave properly 100% of the time except with the default.

You may be able to change your windows language characterset or keyboard when typing in DarkEdit and that may do the trick.

Under Control Panel, look for keyboard. Add a language (Russian) and apply the settings you want for special characters (LeftAlt Shift key etc.). Don't forget to switch your keyboard back to whatever you normally have it set to when you no longer need Russian.

Enjoy your day.
billy777
23
Years of Service
User Offline
Joined: 9th Jan 2003
Location:
Posted: 9th Apr 2008 23:48
Thanks Latch...

that actually helped. I am now able to get the correct Russian characters into DB editor (did not work in darkedit)

But... once I compile it to an exe and run the program... the text is different strange characters:

text output = Íàçàä


This may be ok - I'm not sure if this program was running on a Russian version of windows it would automatically convert to correct characters???

Thanks
Bill
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Apr 2008 04:48
Now you have to do what the other guys were suggesting. You have to use SET TEXT FONT "<font type>",characterset.



If using the TEXT command, you'll also have to adjust the font size.

Enjoy your day.
billy777
23
Years of Service
User Offline
Joined: 9th Jan 2003
Location:
Posted: 10th Apr 2008 18:43
OH... ok... thanks "guys" and thanks again Latch...

It works!

The manual with all the commands doesn't even show the ability to put the comma and then characterset number in after the set font string.
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Apr 2008 00:08
@Omega
sorry, thought you were saying something different

@billy
glad to hear it works
what fonts are you using?
i'd have thought the standard windows fonts would be ok (arial, verdana, times new roman, etc)

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Apr 2008 07:34
Quote: "The manual with all the commands doesn't even show the ability to put the comma and then characterset number in after the set font string."


Lol! You are correct. I actually dug out my manual for the very first time ever to check. Sure enough, it's not mentioned.

Although I have a manual for DBC I've never used it as the on-line help (pressing F1) is more likely to be up to date than a printed book.

And, sure enough, it's there!

TDK_Man

Login to post a reply

Server time is: 2026-07-05 16:06:46
Your offset time is: 2026-07-05 16:06:46