Problems displaying East Asian characters

Asked by MrChris

Hi
First of all, I would to say how much I like mnemosyne. I've been using ever since reading about a different program which does the same. Mnemosyne has helping me memorising a lot.

Recently and especially after upgrading Ubuntu to 9.04, displaying East Asian characters has been driving me nuts though.
I've installed the apprioprate languages (Japanese, Chinese), the required fonts (and even more fonts), I've been scouring the ubuntuforums.org and googled but I seemingly can't solve this problem:

I'm using mnemosyne 1.2.1, installed manually. My desktop environment is Gnome.
My cards database contains flashcards in Japanese (Kanji, Hiragana and Katakana) and Chinese (simplified Chinese characters and pinyin). Occasionally some characters cannot be displayed. The behaviour is inconsistent and it changes depending on what config I play around with.
Characters that are not displayed correctly are:
Japanese: The "tai" in "taishou" e.g. the subject of an investigation
Chinese: The "chuán" in chuánzhēn e.g. a fax
Pinyin: The ē in "fēn" e.g. minute

Anki, the other memorisation tool I use, displays those characters and everything else correctly. I know Anki is a QT-based application whereas mnemosyne is a GTK application. But it proves that the required fonts are installed and language support in Ubuntu is configured correctly.
Japanese or Chinese support is working fine too using SCIM. No problems.

There are a couple of things I don't understand:

-In mnemosyne -> Settings -> Configure mnemosyne -> Set Q/A font, what's the recommended usage of the list of available fonts?
Does that list mean, every type of Script can be configured with a different font?
Sometimes I get the impression that not all fonts that are installed in my system are available in that list - where does mnemosyne get that list of fonts? How can this be updated/refreshed?

What's the connection between the X-Server, Gnome, GTK and mnemosyne in terms of fonts? Which one is prevalent if anything? If I specify a sort order for families in /etc/fonts/local.conf, this seems to be honored by mnemosyne (the fonts are rendered differently) but some characters are still not displayed correctly. If a font cannot be displayed correcty, is the next specified script being tried?
Does mnemosyne recognize if a font cannot be displayed correctly? I've had cases where I was able to input a work correctly, it was displayed correctly in the list of cards but failed to display properly in the preview window. How are they different?

What effect does a font selection have when inputting characters? I know it's (supposed to be) UTF-8 but If I enter a UFT-8-based word with a font that does not have this word in its list (e.g. a pinyin character), is the UTF-8 code of the character saved without change? Should this display properly when switching to a more appropriate font?

I know some of these questions extend the range of mnemosyne and some questions might seem stupid. But I've tried many solutions from different websites and forums and none seem to solve all my problems regards displaying fonts. I really hope I am not asking for something impossible but would welcome any hints in the right directions unless it's "RTFM" etc.

Many thanks in advance
Chris

P.S. I'd be glad to upload config files or provide sample xml files. Please let me know if something is needed.

Question information

Language:
English Edit question
Status:
Answered
For:
The Mnemosyne Project Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Peter Bienstman (peter-bienstman) said :
#1

On Sunday 31 May 2009 04:05:12 pm MrChris wrote:
> New question #72800 on The Mnemosyne Project:
> https://answers.launchpad.net/mnemosyne-proj/+question/72800
>
> Hi
> First of all, I would to say how much I like mnemosyne. I've been using
> ever since reading about a different program which does the same. Mnemosyne
> has helping me memorising a lot.

You're welcome!

> Anki, the other memorisation tool I use, displays those characters and
> everything else correctly. I know Anki is a QT-based application whereas
> mnemosyne is a GTK application. But it proves that the required fonts are
> installed and language support in Ubuntu is configured correctly. Japanese
> or Chinese support is working fine too using SCIM. No problems.

Anki uses Qt4, Mnemosyne 1.x uses Qt3. The upcoming 2.x series of Mnemosyne
uses Qt4 as well.

> There are a couple of things I don't understand:
>
> -In mnemosyne -> Settings -> Configure mnemosyne -> Set Q/A font, what's
> the recommended usage of the list of available fonts? Does that list mean,
> every type of Script can be configured with a different font?

No, all cards must use the same font at the moment. In Mnemosyne 2.x, this is
more configurable.

> Sometimes I
> get the impression that not all fonts that are installed in my system are
> available in that list - where does mnemosyne get that list of fonts? How
> can this be updated/refreshed?

I just call Qt's font dialog, so I'm afraid what happens after that is beyond
the control of Mnemosyne.

> What's the connection between the X-Server, Gnome, GTK and mnemosyne in
> terms of fonts? Which one is prevalent if anything? If I specify a sort
> order for families in /etc/fonts/local.conf, this seems to be honored by
> mnemosyne (the fonts are rendered differently) but some characters are
> still not displayed correctly. If a font cannot be displayed correcty, is
> the next specified script being tried? Does mnemosyne recognize if a font
> cannot be displayed correctly?

As I said, there in no specific font handling code in Mnemosyne. Everything is
handled by Qt and the rest of the OS.

> I've had cases where I was able to input a
> work correctly, it was displayed correctly in the list of cards but failed
> to display properly in the preview window. How are they different?

The input window uses the system's default font. Displaying cards uses the
font you specified in the configuration screen. This inconsistency has been fixed
in the Mnemosyne 2.x codebase.

> What effect does a font selection have when inputting characters? I know
> it's (supposed to be) UTF-8 but If I enter a UFT-8-based word with a font
> that does not have this word in its list (e.g. a pinyin character), is the
> UTF-8 code of the character saved without change?

My guess is that that should be the case.

> I know some of these questions extend the range of mnemosyne and some
> questions might seem stupid. But I've tried many solutions from different
> websites and forums and none seem to solve all my problems regards
> displaying fonts. I really hope I am not asking for something impossible
> but would welcome any hints in the right directions unless it's "RTFM" etc.

What I think happened is that your system upgrade changed some libraries,
which is why it no longer works. I'm very sorry that I can't be more helpful
than that, because as I said, Mnemosyne just relies on the system libraries to
display fonts....

Peter

Can you help with this problem?

Provide an answer of your own, or ask MrChris for more information if necessary.

To post a message you must log in.