OK, I found out what's going on. Xaw is internationalized and supports utf8,
but on each widget we need to set the international resource to True, AND we
need to set the fontSet resource to the fontset we want to use. When
international is True, the widget's font resource is ignored and the fontSet
resource is used instead.

The current FindFont procedure (when ENABLE_NLS is defined) works by finding
a fontset, then pulling a single font out of it and returning that for use
with all the older code in xboard.c that was there prior to
internationalization and wants to deal with fonts instead of fontsets. It
looks like we need to change FindFont to just return the fontset, then
change the rest of the code to set fontSet resources using that value
instead of setting font resources.  That looks like it will be a fair amount
of work to carry through fully. Maybe it's best to nuke all the old code in
the process instead of trying to carry it around and make it still work if
compiling without ENABLE_NLS defined.

As a partial mock-up, though, you can see the fontSet resource at work just
by setting it from the command line:

LC_ALL=de_DE.utf8 ./xboard -ncp -size medium -xrm '*international: True'
-debug  -xrm '*whiteTime*fontSet:
-adobe-helvetica-bold-r-normal--34-*-*-*-*-*-*-*' -xrm '*blackTime*fontSet:
-adobe-helvetica-bold-r-normal--34-*-*-*-*-*-*-*' -xrm '*fontSet:
-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-*-*'

That only sets the clock font and the default font, not the coord font, but
gives you the idea.

On Tue, May 17, 2011 at 9:14 PM, Tim Mann <[email protected]> wrote:

> After some more random googling and flailing, I have learned that setting
> the resource "*international: True" in Xaw widgets makes them do something
> more nearly correct.  Try this:
>
> env LANG=de_DE.utf8 xboard -xrm '*international: True'
>
> When I do that, I get correct umlauts and the ß character in Weiß (=White).
> But I don't get the right font -- it looks like all the characters are
> coming from the "fixed" font; they are all small and fixed-width.
>
>
> On Tue, May 17, 2011 at 10:24 AM, Arun Persaud <[email protected]> wrote:
>
>> Hi
>>
>> does anyone know of any other Xaw program that uses gettext? Perhaps we
>> can just check their code and see how they do it ;) I can't think of any
>> right now though, but will search a bit once I have some time on my
>> hands...
>>
>> Arun
>>
>
>
_______________________________________________
Bug-XBoard mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-xboard

Reply via email to