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 Professional Discussion / How to find characters in Charmap and display in DB Pro?

Author
Message
MaPo
16
Years of Service
User Offline
Joined: 6th Aug 2008
Location: Machu Picchu
Posted: 5th Oct 2008 00:59
Hi, I found a few posts on this in the forums, but still I cannot figure how to do it. For example, in charmap, under Terminal font, there is a neat little hook symbol with Character Code: 0xF4.

How can I display that symbol? I've tried everything I can think of. I even counted what symbol number that would be from 0-255. The hook would be number 244. So if I code:

set text font "terminal",1
print chr$(244)
wait key

I get some other off-center, partial character.

I am looking to get other symbols from other fonts as well. An example would be the spade, club, heart, and diamond symbols (U+2660, U+2663, U+2665, and U+2666)from "lucinda console".

Please help!
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 5th Oct 2008 19:30
i think you need to use the text commands to print other fonts. I know there are settings to change fonts with the text commands....however i have never used them myself. Try that and that should work.

SMD3DInteractive
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Oct 2008 23:53 Edited at: 5th Oct 2008 23:54
Take a look at the 'Principles' page in the help - there's a link there (at least in 7.0-beta-4) that shows you some of the valid values for the character code parameter of the SET TEXT FONT command.

MaPo
16
Years of Service
User Offline
Joined: 6th Aug 2008
Location: Machu Picchu
Posted: 6th Oct 2008 06:46
Thank you, SMD_3D Interactive and IanM... I really appreciate the responses. I checked out the 'Principles' listing in Help but found that it only offered one character set. I have found others via trial and error. I am still looking to find a way to convert Character Codes from charmap into DB Pro. I do notice that DB seems to look at character sets differently than other languages might. For example I found and displayed the "smiley face" in VB rather easily, but DB seems to be unable to find it.
MaPo
16
Years of Service
User Offline
Joined: 6th Aug 2008
Location: Machu Picchu
Posted: 6th Oct 2008 06:57
Maybe I should just say what I want to do, and forget the language stuff...

Black screen... you are "@" just like a rogue-like game. You face enemies such as "Q" and "R".

One of the dead enemies has food in their pocket. The food is represented by the "heart" symbol.

The "@", "Q", and "R" are easy to make. But how do I make the "heart" symbol. I found it, it's in Lucinda Console. How do I render it in DB Pro?
wschramm
22
Years of Service
User Offline
Joined: 22nd Jan 2003
Location: Ohio
Posted: 6th Oct 2008 07:19 Edited at: 6th Oct 2008 07:20
Not sure what the exact name is for the terminal font, but I know that it has to be spelled and capitalize the same as the font file in the fonts dir in order to work

Here is a example of a heart

set text font "Webdings",1
set text size 30
text 10,10,chr$(ASC("Y"))
wait key

notice the capital W if I put it lower case it does not load font and uses the last used font. Hope this helps

also depending on the font if the size is too small you'll get the off centered character look too

pcRaider
18
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 6th Oct 2008 08:12
You can handcraft a font of Windows by yourself.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 6th Oct 2008 21:20
Ya if your going to use that stuff....Why dont you use paint brush....draw all your characters at whatever font then use the image commands in darkbasic?

But im guessing you want to use nothing but characters.....

Just an idea anyways.

SMD3DInteractive

Login to post a reply

Server time is: 2025-06-18 06:00:06
Your offset time is: 2025-06-18 06:00:06