Author Topic: Using strange characters in my font...  (Read 554 times)  Share 

Technocrat

  • AGS Baker
  • Always finishes what he sta
  • Technocrat worked on a game that was nominated for an AGS Award!Technocrat worked on a game that won an AGS Award!
Using strange characters in my font...
« on: 02 May 2012, 00:17 »
I've created a custom font, and I plan to see that the game is translated into French. Since french involves characters not present in English (acute accents, etc), I've decided to make use of thepeculiar set of symbols in the top cluster of this font, since they'd otherwise never be used in this game.



Problem is, I have no idea how these things would be entered into the text in AGS. My character map doesn't have "smiley face" or "double exclamation mark".

Could anyone explain to me how these strange letters could be placed into a character's speech? Merci!

Khris

  • Evil Dark Emperor Death-Kill
    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Using strange characters in my font...
« Reply #1 on: 02 May 2012, 01:14 »
Try this:
[code]  Display("Character test: %c", 25);[/code]
That might produce the arrow pointing down.

However, the first 32 characters are reserved and non-printable afaik, at least in ASCII-Code
http://whathaveyoutried.com/

The other day on yahoo answers:
"Can you print colored images with black ink? If so tell me how please Thanx Kimberly"

Deu2000

  • The only vaccum cleaner that supports TCP/IP
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re:
« Reply #2 on: 02 May 2012, 07:58 »
If you are going to translate your game into a language that has accents, try to erase the accents. I do that when i'm translating my games into spanish. Adios!
« Last Edit: 02 May 2012, 08:03 by Deu2000 »


Technocrat

  • AGS Baker
  • Always finishes what he sta
  • Technocrat worked on a game that was nominated for an AGS Award!Technocrat worked on a game that won an AGS Award!
Re: Using strange characters in my font...
« Reply #3 on: 02 May 2012, 12:46 »
If you are going to translate your game into a language that has accents, try to erase the accents. I do that when i'm translating my games into spanish. Adios!

Is that a reasonable thing to do? Most of my experience of languages with accents comes from school, where they'd have you executed if you missed them out, and insist that nobody could possibly understand what you mean without them. Granted, I'm sure that was hyperbole on their part, but (for example, in Spanish) is it still acceptable do leave the accents out?

Deu2000

  • The only vaccum cleaner that supports TCP/IP
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: using strange characters in my font...
« Reply #4 on: 02 May 2012, 13:13 »


cat

  • Mittens Vassal
  • AGS Baker
  • cat worked on a game that was nominated for an AGS Award!
Re: Using strange characters in my font...
« Reply #5 on: 02 May 2012, 14:58 »
Aren't there also other different letters in French? I think there is some kind of c with an s attached to the bottom. If you intend to do a German translation as well for example, you will have to use umlauts anyway. Maybe it's better to use TTF from the start.

Re: Using strange characters in my font...
« Reply #6 on: 02 May 2012, 21:03 »
Either use a TTF font or beg Radiant to release a new FontEdit that supports 256 characters font which you can use with AGS draconian.

The hard way is making two fonts and then merging them together.
Each standard wfn fonts is composed like this:

Header: 15 bytes
Address to character table: 2 bytes
Fonts data: ----
Character table: the last 256 bytes (128 entries of 2 bytes: adressess)

You'll need an hexadecimal editor like WinHEX and do this:
1. take the font data from the second  font and append it at the end of the font data of the first (prior to the character table)
2. do the same to the character table
3. update the Address to character table to point to the new position (the character table has been pushed down)
4. alter the address values of the second part of the character table so they point to the correct places, you'll have to do some math and use the "Modify data..." (16bit unsigned) feature
5. pray it works

Or you could write an application that does that.

Have fun.

- Alan


Snarky

  • Global Moderator
  • Mittens Baronet
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Using strange characters in my font...
« Reply #7 on: 02 May 2012, 21:20 »
That's good info, Alan. Do you have more details on how the actual font data is stored? I'm assuming it's literally a sequence of bitmaps, but how are the dimensions indicated, for example?

Re: Using strange characters in my font...
« Reply #8 on: 02 May 2012, 22:16 »
That's good info, Alan. Do you have more details on how the actual font data is stored? I'm assuming it's literally a sequence of bitmaps, but how are the dimensions indicated, for example?

There was a thread anout it on the forums if I recal correctly, I didn't get into understanding the inner workings of how it's stored because I realized I didn't need to for what I was doing.
A glance at the code might sate your enquiries -> acfonts.cpp

- Alan