Re: Angband with an accent: displaying extended characters



Leon Marrick writes:

> Linux and other graphical UNIX systems (X11, xaw, gtk, and other ports):
>
> I have been told that Linux (and other UNIX graphical systems) do
> not allow ordinary users to use custom or application-specific fonts,
> that one has to be root and that the fonts have to be installed in some
> special way.

It can also be a problem to discover which character set is in use.
You can check the locale environment variables (LC_CTYPE, LC_ALL etc) -
the locale name, if set, may or may not contain the character set name.

I think you need two steps. First attempt to set the character set if
the display allows that. Then try to discover which character set and
encoding is in use (from the system or a setting from the user), and
fall back on ASCII if you didn't find anything.

Note that with single-byte character encodings, the character set which
a Unix system thinks is in use isn't necessarily the one displayed by
the user's font. X.11 font names often include character set name, but
need not. Due to weird things Unixes choose to do about character sets
and the lack of a standardized way for system and programs to tell each
other about character sets, the user may be handling character set
issues himself and leave the system to think it is running its default.
It's gotten better over the years, but if Angband still tries to support
all kinds of ancient setups...

> People say that non-graphical terminals refuse to let the user
> change fonts. I'd be surprised if that were really so but, for
> argument's sake, let us assume that it is.

Depends on the terminal. I've used text terminals where I could select
one of several built-in fonts, and text terminals with only one font.
Whether I'd have wanted to switch font on my terminal just in order to
play Angband is a another matter.

> OK. So we have some systems that can handle 256-character fonts,

Hold on -- 256-character fonts? If Angband is going to the trouble of
supporting non-ASCII text, at least move to Unicode - maybe only with
support for ASCII and accented ASCII characters.
Windows speaks Unicode. Newer Linuxes has UTF-8 as default.
Single-byte 8-bit characters output to a UTF-8 terminal will not work.

> We need a way for accented names and other special characters to be 1)
> translated into the correct characters for that system (they differ),
> and 2) translated into basic ASCII characters if that is all that are
> available.

Unicode publishes character tables where accented characters are split
up in ASCII character + accents, upper<->lowercase translations, etc.
Libraries exist to convert between encodings, e.g. libiconv. (Haven't
used it myself, so I don't know if it can "ASCIIfy" characters.)

> # The Shadow Cloak of Luthien
>
> N:49:of L^'uthien # see explanation below

I think I'd prefer to edit straight UTF-8 or latin-1. Maybe there
should be a tool to translate between that and an ASCII encoding
which everyone can use. The file could be marked at the top with
which character set is in use.

BTW, check out RFC 1345 <http://www.faqs.org/rfcs/rfc1345.html>, which
has already invented such an ASCII encoding.


One other problem:
With non-ASCII character sets in Angband, we'll see non-ASCII postings
in rec.games.roguelike.angband. That will probably include MIME
quoted-printable postings which some newsreaders won't decode, and 8-bit
postings which some news servers might drop (since I think some servers
still only allow ASCII).
It might help if character dumps use an ASCII encoding.

--
Hallvard
.



Relevant Pages

  • Re: Fonts 10.4 to 10.5
    ... track of fonts could be immensely simplified for the majority of us by ... Standard PostScript fixed-length serif Latin character set. ... Chinese, Arabic, Hindi, Japanese, or Korean names, for example...) ...
    (comp.sys.mac.system)
  • Re: Asian Fonts in Explorer
    ... > I have installed all the Asian fonts included in the WinXP installation ... > I have installed the fonts and use IME from OfficeXP. ... > Asian character set the characters don't show in Windows Explorer. ...
    (microsoft.public.windowsxp.general)
  • Re: Host Print Transform Error... object T1000000 not found?
    ... So the real question is what font character set is referring to the code page, or was the code page specified in the spooled file attributes? ... there is a new spooled file attribute called job ccsid. ... We could take a tool that calls QGSLRSC and see what resources it references and dump the data stream looking for data stream errors. ... AFP Utilities 5722AF1, AFP Compatability Fonts 5722SS1 Feature 8, Additional Fonts 5722SS1 Feature 43 installed ...
    (comp.sys.ibm.as400.misc)
  • anyone using Mozilla on VMS, DECwindows and character sets such as iso-8859-x where x is 2 or 5?
    ... I'm slowly making progress with Mozilla, DECwindows and unusual fonts. ... I've now run across another problem, but I'm not sure if it is an HTML ... correct character set. ...
    (comp.os.vms)
  • Re: Bypassing of web filters by using ASCII
    ... The character set ASCII encodes every character with 7 bits. ... Internet ... connections transmit octets with 8 bits. ...
    (Bugtraq)