First off, I have been lurking here for a while and have now decided to
start in and begin writing a game. There are going to be some Greek
symbols in the game. So I read up at Roger Firth's site about this,
supplied the -C7 switch and tried this:
print "@@191" ! This should print alpha
But, instead it prints a ? or a blank square depending on the
interpreter. Can someone aid me in solving this problem? Thank you in
advance.
:Multum Viri:
Beware of the many...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)
iD8DBQFEFitT6g+XGPY+2XARAnrwAKCvPsCg3b37OBS80LrrOij1U4LieQCgo3Ho
8rnJVNT4/gRHNsK3ubvriZQ=
=NMDZ
-----END PGP SIGNATURE-----
What interpreters did you try? I compiled the following under Inform 6.30:
!% -C7
[ Main;
font off;
@print_unicode 945; print "^";
print "@{03B1}^";
print "@@196^";
];
Running under Windows Frotz 2002, I get
http://www.d.kinder.btinternet.co.uk/tmp/alpha.png
The only interpreters likely to work with this are Windows Frotz 2002,
Zoom (Unix and Mac), and possibly Filfre (Windows again) or ZMPP (Java).
None of the others have good enough Unicode support.
David
Well, I do most of my computing under FreeBSD (unix) so I tried that
code on the most recent zoom interpreter (1.0.4a) and it did not work
out. Neither did it work on Windows Frotz through WINE. However, when
I switched to a Windows machine and used the Windows Frotz it worked.
Strange, no? Anyways, I am very confused as to why zoom does not work?
~ I really can't think of any reason that it wouldn't as it even talks
about the Unicode support it has. Hmm... strange. Does someone know
what I could be doing wrong that would make Unicode characters not work?
:Multum Viri:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)
iD8DBQFEGCMP6g+XGPY+2XARAq0yAJ4/mqeoWRTVKDUTb7w/wla1tG3LjwCfcroE
p3MCyUM7JdkvKKYg2Q0K7Kg=
=JLNS
-----END PGP SIGNATURE-----
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Well, I do most of my computing under FreeBSD (unix) so I tried that
> code on the most recent zoom interpreter (1.0.4a) and it did not work
> out. Neither did it work on Windows Frotz through WINE. However, when
> I switched to a Windows machine and used the Windows Frotz it worked.
> Strange, no? Anyways, I am very confused as to why zoom does not work?
> ~ I really can't think of any reason that it wouldn't as it even
> talks about the Unicode support it has. Hmm... strange. Does someone
> know what I could be doing wrong that would make Unicode characters not
> work?
>
>:Multum Viri:
I seem to remember having to add extra checking into Mingsheng in order to
get it to work properly.
When I printed out a chinese character, I used the following:
[ chinese c exist;
if (HDR_TERPSTANDARD->0 < 1) { return; }
@check_unicode c -> exist;
if (exist & $0001) @print_unicode c;
];
Calling it with:
chinese ($7AF9);
for example, Where the code following the $ is obviously unicode
reference.
At the start of the game, I checked to see if the terp could support
unicode, and also if the font contained the characters I needed:
if (HDR_TERPSTANDARD->0 < 1)
{
print "Your interpreter says that it is pre v1.0 of the z-
machine standard, so it may
not be able to support extended Unicode.^^";
}
else
{
print "Your interpreter says that it is at least v1.0 of the
z-machine standard, so it may
be able to support extended Unicode.^";
@check_unicode $7AF9 -> exist;
if (exist & $0001) print "Chinese characters will be
displayed, if your font supports them.^^";
else print "Your font does not appear to be able to display
Unicode Chinese characters.^^";
}
I also added the option to turn them on or off.
It might be useful for you to check whether the font contains the
character you want to use, and report whether it does or not - so that you
can debug properly.
--
http://www.rexx.co.uk
To email me, visit the site.
http://www.rexx.co.uk/runes/ - personal online rune readings
The most obvious reason would be that the fonts you're using with Zoom
(and Windows Frotz under WINE) don't have that character in it. If you
look in the Examples/ directory of the Windows Frotz zip file there's a
Unicode.z5 - run that under the interpreters. It will show some Unicode
characters, so have a look for what's at character 0x03B1.
Also, you can use the @check_unicode opcode to ask the interpreter if a
character is available.
David
Thank you very much. That useful bit of code showed me that the
interpreters can display them but my font can not. Anybody have any
ideas about what to change my font to in order to display these greek
characters? I'm running unix.
:Multum Viri:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)
iD8DBQFEGXW/6g+XGPY+2XARAtaMAKCwk6cEqoSK0BeWJjuLw41cBQkEPQCgwH9B
rVKK294rU9k58lZoA4k8LTs=
=LnA+
-----END PGP SIGNATURE-----
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Thank you very much. That useful bit of code showed me that the
> interpreters can display them but my font can not. Anybody have any
> ideas about what to change my font to in order to display these greek
> characters? I'm running unix.
>
There's one called code2000 that contains most of the unicode set, but
other lighter ones are available.
You might be able to download things such as arial unicode, which contains
a fair bit of the set. Alternatively, find someone who has a recent
install of MS office, then you can nab some font files off them.