I learned a bit more, but progress is slow.  Here are some observations:

* I was able to "fix" the slightly broken ru.po file that we have and get
the Russian translation to work. I didn't really know what I was doing; I
just did "make ru.gmo" and made likely-looking changes in places where I was
getting error messages and/or where the file header differed from the
examples that work. I notice we have some other broken translations, so
maybe those are fixable too. Maybe I should fix these and push a commit?

* Interestingly, the Russian translation is able to use the Microsoft
TrueType core fonts for the web that I have installed on my Ubuntu 10.04
system (they come from the ttf-mscorefonts-installer package). For instance,
the flags -messageFont "-*-arial-medium-r-normal--*-*-*-*-*-*-*-*"
-clockFont "-*-arial-bold-r-normal--*-*-*-*-*-*-*-*" -coordFont
"-*-arial-bold-r-normal--*-*-*-*-*-*-*-*" make that work, and the fonts look
nice, though I didn't check all the board sizes to be sure everything fits
right. This is much better than helvetica backed up by fixed.

* For some reason that isn't clear to me, the Ukrainian translation is *not*
able to use those fonts. They also cannot be used in the en_US.utf8 locale.
In both cases, XCreateFontSet always returns an error after failing to find
a font for *any* charset.

I think I have tracked the failure down to the
/usr/share/X11/locale/*/XLC_LOCALE file that gets chosen, but I don't know
what the problem with it is yet. This highly cryptic file controls how
XCreateFontSet chooses fonts for a locale. The ru_RU.utf8 locale has its own
XLC_LOCALE file, while the uk_UA.utf8 locale doesn't have one and is
configured to use the one for en_US.utf8 instead. (This is determined by
/usr/share/X11/locale/locale.dir and locale.aliases. All of this stuff is
part of X, not something we supply with xboard.) For some reason the
en_US.utf8 XLC_LOCALE file has criteria that cause XCreateFontSet to reject
all the Microsoft fonts, while the Russian one accepts them, or at least
enough of them to get the job done.

I don't know if there is any practical way for us to work around an issue in
the XLC_LOCALE file, but if I finish tracking this down I can try reporting
it upstream.

On Sun, May 29, 2011 at 8:41 PM, Tim Mann <[email protected]> wrote:

> I pushed a commit that uses "fixed" as a fallback font for missing
> charsets. It's ugly in large sizes (particularly the clocks), but at least
> it works.
>
> A nice (?) side effect of this commit is that "fixed" also will be used as
> a fallback when the user doesn't have helvetica installed at all. Everyone
> should have "fixed", as I understand it. The nice aspect is that the user
> without helvetica doesn't get an error message and xboard functions. There
> is also a not-nice aspect: the fixed font is ugly, so we may get complaints
> (or users who are unhappy but don't complain) about xboard having ugly
> fonts, when the real problem is just that they don't have helvetica
> installed.
>
>
> On Sun, May 29, 2011 at 6:06 PM, Tim Mann <[email protected]> wrote:
>
>> Basically this happens because the helvetica fonts that xboard uses by
>> default don't have Cyrillic characters, at least not the versions of those
>> fonts that you and I have on our machines. (I think we are both using some
>> release of Ubuntu, right? I'm using 10.04.)
>>
>> I don't understand why we get wrong characters instead of the "missing
>> character" glyph (which usually looks like a grayed-out open box), though.
>>
>> I am working to find a good way around this. At worst, I can tweak xboard
>> to use the "fixed" font family for charsets that it can't find in helvetica.
>> Unfortunately the fixed-width characters are a bit ugly. So far I haven't
>> found any other fonts that work with xboard and display Cyrillic in xboard
>> successfully, but I am confused about why some of the other fonts I have on
>> my system don't work. I have a number of fonts that xfontsel understands
>> (i.e., they are the X core font style of font, not the new fontconfig style
>> that xboard can't use), and which xfontsel can use to display Cyrillic text,
>> but XCreateFontSet fails and/or I still get incorrect characters with them.
>>
>> Sigh, none of this should be a problem in the GTK version of xboard since
>> gtk uses fontconfig fonts.
>>
>>   --Tim
>>
>>
>> On Sun, May 29, 2011 at 12:10 AM, Arun Persaud <[email protected]> wrote:
>>
>>> Hi
>>>
>>> I just pushed the new Ukrainian translation we got from the TP. When
>>> starting xboard (including your new commits) with
>>>
>>> LANG=uk_UA xboard
>>>
>>> I still get some garbage in the menu names though? I do get Umlaute and
>>> other special characters for
>>>
>>> LANG=de_DE xboard
>>>
>>> Any idea where this comes from?
>>>
>>> ARUN
>>>
>>
>>
>
_______________________________________________
Bug-XBoard mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-xboard

Reply via email to