Author Topic: AGI and changing font  (Read 3581 times)

0 Members and 1 Guest are viewing this topic.

Offline morpa

AGI and changing font
« on: December 16, 2017, 05:58:06 PM »
I tried out the latest version of WinAGI - great AGI-ide. One thing though - I want to localize some strings in my Kings Quest translation with non ASCII like ?,?,?, Is this possible with an AGI-game, and how do i do it - with WinAGI if possible. Thankful for any help.

Offline Kawa

Re: AGI and changing font
« Reply #1 on: December 17, 2017, 07:56:06 AM »
In the original AGI interpreters I've tested, there's one external font file for the higher-res Hercules graphics. Though a bit mangled I can tell that it only has the 7-bit printable range. NAGI has three font files, and all of them too have the same range, but NAGI has a slightly different reaction to using the string "????": in AGI, I get nothing. In NAGI with 2x zoom (which uses the Herc font) I get nothing as well, but in NAGI at 1x zoom I get garbage. Which is to be expected, really. I think the original interpreter might just extract and use the video card's built-in font as I can't for the love of me find any font data in there, but only loads the 95 printable characters. NAGI has no higher moby to load, and showed garbage instead.

Offline Collector

Re: AGI and changing font
« Reply #2 on: December 17, 2017, 10:15:22 AM »
I think you are right about it using the built-in fonts. There were some fan made games in Cyrillic (in fact the very first fan made AGI educational Program, "Groza" or  "Thunderstorm"), but if I try to run them through DOSBox it is just jumbled pixels. I suppose a test would be to compile DOSBox with a bitmapped font with diacritics or Cyrillic.
KQII Remake Pic

Offline AGKorson

Re: AGI and changing font
« Reply #3 on: December 29, 2017, 06:40:27 PM »
AGI definitely uses the video card font data for fonts. It does some weird stuff with them though, that I haven't been able to fully decipher. According to MSDOS reference material, there are 8x8 font data for characters 00 - 7Fh at INT 43h (memory location F000:FA6E) and 8x8 font data for characters 80h - FFh at INT 1Fh. When AGI puts characters to screen, it looks like it grabs the font data from INT 43h, regardless of the character value (which explains the garbled output, since >7Fh will be using data outside the range for this location). But during startup, when various DOS interrupt vectors are reassigned, AGI does reassign the vector for INT 1Fh (the extended character data) to the location where each character is output before being sent to the screen. I don't know yet why this is being done, or what effect it ends up having.

Regardless, original Sierra AGI does not display/support extended characters.

But NAGI can; I actually wrote a NAGI font editor ten years ago that you can use to edit/create your own NAGI fonts, including creating characters for all 255 byte codes. I'm attaching the install file for NAGI Font Editor if you want to give it a try; just open one of the *.nbf files included in NAGI to change the fonts however you want. I've also attached a 'spanish' version of the 16x16 font file I used for testing.  (You can also get NFE from -

Note that WinAGI can handle messages using extended codes, if you want to create a sample game to test the fonts in NAGI. BUT, the rich text editor used for syntax highlighting reacts a bit goofy when extended codes are involved, so I'm adding a feature to turn off syntax highlighting in case anyone wants to use extended codes.

But just be aware that while you can use NAGI to display extended characters, AGI input is strictly limited to the regular characters; the text input/parsing routines and words encoding in the WORDS.TOK file were written to explicitly preclude the possibility of entering extended characters as input.

SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.121 seconds with 30 queries.