|
Swedish keyboard mapping table |
juan maluenda
Member #7,257
May 2006
|
Hi. Appreciate all the help i can get! J. |
Johan Halmén
Member #1,550
September 2001
|
Guess I'm oldfashioned, but I use FontEd and Grabber and dat files. In FontEd I often fail to include åäö. I end up in a 7 bit PCX/BMP character table. I have to increase the range or include the range 80-ff. Then it works. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest. |
Evert
Member #794
November 2000
|
You don't need a keyboard mapping table, you need a proper font. ^ is Allegro's default character for glyphs it cannot display. |
miran
Member #2,407
June 2002
|
Use FontEd. Down in my sig. By default you only edit characters 32-127, that's the 7bit ASCII range. Then you add a range, it asks you for start and end indexes which you can leave at 128-255. This fills the font with the full 8bit ASCII table. You then proceed to edit the characters you're interested in, save the font as a .pcx or .tga and load it in your program directly or use grabber or dat to put it into a datafile. -- |
Riccard
Member #7,261
May 2006
|
I am working on the same game as Juan. The thing is - we have doublechecked that the fonts we use has Even though these are in the used font - allegro still continues to display Is there some configuration needed or anything? Cheers |
Evert
Member #794
November 2000
|
Post the font and post a small sample programme. |
juan maluenda
Member #7,257
May 2006
|
Looking at the font in grabber the range is dictated from 0x20 to 0xFF |
GullRaDriel
Member #3,861
September 2003
|
Perhaps set_uformat(...) will help ? Try adding set_uformat( U_ASCII ); before allegro_init(); "Code is like shit - it only smells if it is not yours" |
miran
Member #2,407
June 2002
|
As Gulldi said, you need to set uformat to what you actually use. That is Allegro should use the same encoding as what you write. By default Allegro uses UTF-8 but you seem to be writing your strings in extended 8 bit ASCII. Either make Allegro use ASCII or you should switch to UTF-8. I suggest the second approach because it will give you a lot less trouble. To switch to UTF-8 just select UTF-8 in the enciding settings of your text editor. EDIT: Attached is a screenshot of you program on my computer. I copied and pasted the code you posted into a text editor that supports UTF-8 and compiled. Works out of the box! -- |
GullRaDriel
Member #3,861
September 2003
|
OFF-TOPIC: Miran said: As Gulldi said It seems that I am not the only one to have some problem with the Spell Check feature. Correct me if I am wrong, but the word replacement isn't working that good. "Code is like shit - it only smells if it is not yours" |
juan maluenda
Member #7,257
May 2006
|
Thanks a million guys! |
miran
Member #2,407
June 2002
|
Sorry, but your name is impossible for me to remember. I know it starts with Gull and there's a d in there somewhere, but after that I'm lost. What does "GullRaDriel" mean by the way? And in what language? And how are you supposed to pronounce it? (Yes, I copied&pasted this time) EDIT: Quote:
Thanks a million guys! So did you use the U_ASCII thing or did you do it like it's supposed to be done? -- |
GullRaDriel
Member #3,861
September 2003
|
Just call me Gull, It will be enough. The full story for this nick is long, but shorter, I was a Ra family member on a mmorpg named TheFourthComing, and the Ra family was from the Driel one's. I keep it so long for the sake of ...hum... I dunno, but I like it. The language... Hmmm... Say it as you would read it. I would not hear it, so it does not matter ;-) To end, Gull is propably a Russian or east country firstname. EDIT: Nice to see it working, and can you say us what you did ? "Code is like shit - it only smells if it is not yours" |
juan maluenda
Member #7,257
May 2006
|
Well i added set_uformat( U_ASCII ); to the beggining and that worked nicely. |
miran
Member #2,407
June 2002
|
Quote:
Im currently investigating the UTF-8 option, to be honest i do not fully follow with what you mean with "text editor". The font is good, the problem is with how you write text. If you look at your source code file with a hex editor or something like that, you will see that all the characters are coded with values between 32 and 127 (decimal) except for the Swedish characters which are encoded with values between 128 and 255. If this works for you, then good, but if you later decide to add support for other languages, this is very likely to break completely as there are many different 8 bit encodings out there, almost like one for each language. So by using U_ASCII you're limiting yourself to just a few languages. If you want to do it the proper way you must encode your text with UTF-8. In this encoding all normal English characters stay the same as with 7bit ASCII, but characters above 127 are encoded as 2, 3 or 4 bytes (there are well defined rules for that). In practice this means that all you need to do is select UTF-8 in your editor. Now I don't know where that can be set in Dev-C++ or if it can even be done, but I'm attaching a screenshot of Kate (the editor I've been using lately). Sorry, because it's translated, but it should at least give you an idea of what I mean. In most decent editors there's a similar menu under File|Encoding or Tools|Encoding or something... EDIT: By the way, the font you're using is plain old Arial which is completely unsuitable for most games. I think you should use something prettier. -- |
Milan Mimica
Member #3,877
September 2003
|
Doesn't ANSI C require the source code to be in ASCII?
-- |
miran
Member #2,407
June 2002
|
It's possible. If that's a problem (it isn't for me), you should put all your strings in separate txt files encoded in UTF-8. You should do that anyway if you want your program to be extensible... -- |
Evert
Member #794
November 2000
|
Quote: Doesn't ANSI C require the source code to be in ASCII? Yes. That's why Allegro's exunicod example uses escaped octal characters for the unicode text. |
LennyLen
Member #5,313
December 2004
|
Quote:
The full story for this nick is long, but shorter, I was a Ra family member on a mmorpg named TheFourthComing, and the Ra family was from the Driel one's. I keep it so long for the sake of ...hum... I dunno, but I like it. The language... Hmmm... Say it as you would read it. I would not hear it, so it does not matter ;-) To end, Gull is propably a Russian or east country firstname. Everytime I see your name, I think Galadriel.
|
GullRaDriel
Member #3,861
September 2003
|
Héhé, please just think to Gull instead of a woman name ;-p "Code is like shit - it only smells if it is not yours" |
LennyLen
Member #5,313
December 2004
|
{"name":"seagull038ly.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/0\/f06f3e41a143c10e5760738d3b4d225b.jpg","w":600,"h":400,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/0\/f06f3e41a143c10e5760738d3b4d225b"}
|
GullRaDriel
Member #3,861
September 2003
|
I do not catch the joke here "Code is like shit - it only smells if it is not yours" |
Evert
Member #794
November 2000
|
It's a picture of a gull. |
GullRaDriel
Member #3,861
September 2003
|
Gul is also a minister somewhere. Happy to see I am also a Gull. But it does not really matter as I am not really a Gull ;-) "Code is like shit - it only smells if it is not yours" |
|