[mnemosyne-proj-users] Default font size too small on Linux, <font> markup not recognised?

224 views
Skip to first unread message

mzatanoskas

unread,
May 3, 2010, 4:50:58 PM5/3/10
to mnemosyne-proj-users
Well the moving the .mnemosyne folder from XP to Ubuntu was simple
enough, but I have one problem.

Although the standard size was fine for XP, the default font size
seems to be a lot smaller for Linux. This is the case for latin as
well as non-latin characters. Also marking up text as <font size="3"></
font> etc doesn't seem to be recognised. At least for the Japanese
characters I've been trying it on.

Setting the config option to have non-latin characters at a larger
font size does work, but doesn't solve the problem of the latin
characters or of the <font> markup that I use in my cards. (Actually
I'm wondering whether activating this option didn't actually cause the
font markup problem, as I seem to remember it was working before, but
I can't be sure).

Anyone have any ideas?

On a related note, will there be a find and replace function to edit
the database in 2.0?! It's a function that I would find very useful as
the way I formulate and markup my flashcards has changed massively
since I first started using the program. It's very much trial and
error to see what layout works best, and now I have thousands and
thousands of flashcards that I'd like to edit by replacing <u></u> by
<b></b> for example.

thanks.

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To unsubscribe from this group, send email to mnemosyne-proj-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mnemosyne-proj-users?hl=en.

Peter Bienstman

unread,
May 4, 2010, 1:53:00 AM5/4/10
to mnemosyne-...@googlegroups.com
> Well the moving the .mnemosyne folder from XP to Ubuntu was simple
> enough, but I have one problem.
>
> Although the standard size was fine for XP, the default font size
> seems to be a lot smaller for Linux. This is the case for latin as
> well as non-latin characters. Also marking up text as <font size="3"></
> font> etc doesn't seem to be recognised. At least for the Japanese
> characters I've been trying it on.
>
> Setting the config option to have non-latin characters at a larger
> font size does work, but doesn't solve the problem of the latin
> characters or of the <font> markup that I use in my cards. (Actually
> I'm wondering whether activating this option didn't actually cause the
> font markup problem, as I seem to remember it was working before, but
> I can't be sure).
>
> Anyone have any ideas?

Note that when you set a font in the config screen, you can also set its size
:-)

> On a related note, will there be a find and replace function to edit
> the database in 2.0?!

I might add it at some point, but probably not for 2.0.

Cheers,

Peter

mzatanoskas

unread,
May 4, 2010, 12:46:20 PM5/4/10
to mnemosyne-proj-users
Thanks for the reply Peter.

> Note that when you set a font in the config screen, you can also set its size
> :-)

Oh yeah! Don't know how I missed that! Well that makes things a bit
easier, I can read my cards now. Unfortunately I still have the
problem of the font size not mark up not working. I use different font
sizes a lot in my flashcards, eg small size for hints or long example
sentences and a very large size to see the Japanese Kanji. It seems
that it's specifically the Japanese characters that I can't get to
change size using font markup, latin characters work fine.

> > On a related note, will there be a find and replace function to edit
> > the database in 2.0?!
>
> I might add it at some point,

Excellent news!

> ...but probably not for 2.0.
>

Noooooo!! :D

Unfortunately I have no idea how much work implementing this function
would entail, but can I just say again quite how useful that function
would be to me! For example if it turned out my syntax was wrong for
the font mark up I could replace it all in seconds.

Indeed this leads me to a new problem I have, it seems all my image
links are broken in Linux (and I imagine my sound links as well).
Apparently there are two reasons:

1. Windows uses backslashes instead of forward slashes.

2. When you control + "I" insert an image in Windows it seems that
capitalisation does not matter and is ignored. Unfortunately
capitalisation does seem to matter in Linux.

If a find and replace function existed then both these problems (well
problem 1 at least, dunno about 2) could be solved very quickly!

Problem 2 is not so bad as long as all my flashcards links are
consistently lowercase I can go and change all the folder, image and
sound names to lower case. I hope the image and sound files are
lowercase already because there are many thousands of them.

Problem 1? Does this mean you can't share databases between Windows
and Linux? How do you deal with images in your setup with Unison? If I
do need to change the cards to get them to work for Linux, what would
be the best way to do it? Would I have to export my entire database
and apply a find and replace in notepad to the backslashes? (Please
tell me there wouldn't be any other backslashes in the .xml generated,
or that would get really messy!)

To summarise, I have two problems (at the moment!):

1. Media links broken because of capitalisation and backslashes. Is it
possible to have markup that both Windows and Linux can read? If not,
how should I best solve this problem?

2. Font size on Japanese fonts doesn't work. This is more important to
me that it might seem, especially in the future when it comes to
learning how to write complicated characters, I need large characters
and small example sentences. (also I don't want to spend ages solving
problem 1, only to find that problem 2 is not solvable and turns out
to be a deal breaker further down the line in which case I'd have to
undo all the work all the work spent on problem 1 in order to go back
to windows!)

Any help and advice very gratefully received, I've been hitting the
cards hard recently and every session missed is a good 300 or so
stacked up for the next day!! I'd be tempted to just to stick to using
Mnemosyne on Windows, but the whole reason I decided to dual boot
Ubuntu (which entailed a whole saga of pain of its own which I won't
go into here) was to learn Japanese with Mnemosyne on a Japanese
system and then switch to French on a French system, etc (which you
can do with Ubuntu and not Windows).

Hopefully I'm missing something obvious.

Peter Bienstman

unread,
May 4, 2010, 1:12:26 PM5/4/10
to mnemosyne-...@googlegroups.com
> Thanks for the reply Peter.
>
> > Note that when you set a font in the config screen, you can also set its
> > size
> >
> > :-)
>
> Oh yeah! Don't know how I missed that! Well that makes things a bit
> easier, I can read my cards now. Unfortunately I still have the
> problem of the font size not mark up not working. I use different font
> sizes a lot in my flashcards, eg small size for hints or long example
> sentences and a very large size to see the Japanese Kanji. It seems
> that it's specifically the Japanese characters that I can't get to
> change size using font markup, latin characters work fine.

This is the subset of html you can use for markup:

http://doc.trolltech.com/3.0/qstylesheet.html

> Indeed this leads me to a new problem I have, it seems all my image
> links are broken in Linux (and I imagine my sound links as well).
> Apparently there are two reasons:
>
> 1. Windows uses backslashes instead of forward slashes.
>
> 2. When you control + "I" insert an image in Windows it seems that
> capitalisation does not matter and is ignored. Unfortunately
> capitalisation does seem to matter in Linux.

I've fixed this for 2.0.

For 1.x, if you need search and replace, just export to xml (don't reset
learning data), do search and replace in a text editor, start a new database,
and reimport the xml file.

> Does this mean you can't share databases between Windows
> and Linux?

I've added all my images under linux, and they show up OK under windows, but
perhaps if you go the other way, it's different.

Cheers,

Peter

mzatanoskas

unread,
May 4, 2010, 1:37:38 PM5/4/10
to mnemosyne-proj-users
Thanks for the prompt replies and suggestions as ever Peter.

>
> This is the subset of html you can use for markup:
>
> http://doc.trolltech.com/3.0/qstylesheet.html
>

It states you can use font size markup:

<quote>

"<font>...</font> Customizes the font size, family and text color.
The tag understands the following attributes:

* color -- The text color, for example color="red" or
color="#FF0000".
* size -- The logical size of the font. Logical sizes 1 to 7 are
supported. The value may either be absolute (for example, size=3) or
relative (size=-2). In the latter case the sizes are simply added.
* face -- The family of the font, for example face=times.
"</quote>

And that markup works fine for all characters in Windows, but it's
definitely not working for me on my Japanese characters in Linux...

> > 1. Windows uses backslashes instead of forward slashes.
>
> > 2. When you control + "I" insert an image in Windows it seems that
> > capitalisation does not matter and is ignored. Unfortunately
> > capitalisation does seem to matter in Linux.
>
> I've fixed this for 2.0.
>
> For 1.x, if you need search and replace, just export to xml (don't reset
> learning data), do search and replace in a text editor, start a new database,
> and reimport the xml file.
>

Can I confirm that if I change all the backslashes to forward slashes,
links will still work in Windows?

Jesse

unread,
May 4, 2010, 1:52:47 PM5/4/10
to mnemosyne-...@googlegroups.com


2010/5/4 mzatanoskas <mzata...@googlemail.com>

Thanks for the prompt replies and suggestions as ever Peter.

>
> This is the subset of html you can use for markup:
>
> http://doc.trolltech.com/3.0/qstylesheet.html
>

It states you can use font size markup:

<quote>

"<font>...</font>       Customizes the font size, family and text color.
The tag understands the following attributes:

   * color -- The text color, for example color="red" or
color="#FF0000".
   * size -- The logical size of the font. Logical sizes 1 to 7 are
supported. The value may either be absolute (for example, size=3) or
relative (size=-2). In the latter case the sizes are simply added.
   * face -- The family of the font, for example face=times.
"</quote>

And that markup works fine for all characters in Windows, but it's
definitely not working for me on my Japanese characters in Linux...


What might be going on is that your system is unable to find that point size within the font you've chosen. As always, I'll recommend Bitstream Cyberbit (free; Google it or direct download from Netscape's old FTP: http://aol-4.vo.llnwd.net/pub/communicator/extras/fonts/windows/Cyberbit.ZIP ). Looks great on Linux and covers every kanji I've thrown at it so far across many font sizes. Also, just confirmed that <font size=""> works on kanji in that font within Mnemosyne on my Arch Linux install.

Other possibilities, if that doesn't help or you hate beautiful brush-style typefaces for some reason: Running sudo fc-cache, to refresh the font cache, sometimes fixes text issues. Also, running Mnemosyne from a terminal (Alt-F2, type in mnemosyne, check "Run in terminal" then hit "Run") might show you a useful error message.

--
Jesse Weaver

Peter Bienstman

unread,
May 4, 2010, 2:01:27 PM5/4/10
to mnemosyne-...@googlegroups.com
> Thanks for the prompt replies and suggestions as ever Peter.

> And that markup works fine for all characters in Windows, but it's
> definitely not working for me on my Japanese characters in Linux...

I'm afraid it's a Qt or some other font issue, then, beyond Mnemosyne's
control...

> Can I confirm that if I change all the backslashes to forward slashes,
> links will still work in Windows?

Works for me. Make sure to use the latest version, though.

Peter

------------------------------------------------
Peter Bienstman
Ghent University, Dept. of Information Technology
Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium
tel: +32 9 264 34 46, fax: +32 9 264 35 93
WWW: http://photonics.intec.UGent.be
email: Peter.B...@UGent.be
------------------------------------------------

mzatanoskas

unread,
May 4, 2010, 2:23:49 PM5/4/10
to mnemosyne-proj-users
> I'm afraid it's a Qt or some other font issue, then, beyond Mnemosyne's
> control...

Fair enough. If anyone using Linux to display Japanese characters can
replicate this problem or has any ideas how to solve it please let me
know!

EDIT***** Just saw your post Jesse. Thanks for your suggestions, I'll
download that font you mentioned and try it again. It's good to know
that it does work with linux, hopefully it's not an Ubuntu specific
problem. I should point out though, that I can change the size of the
font with the default setting, just not with the font mark up.

> > Can I confirm that if I change all the backslashes to forward slashes,
> > links will still work in Windows?
> Works for me. Make sure to use the latest version, though.
>
> Peter
>

Good stuff. Because swapping forward slashes with backslashes again in
an xml would be a real pain I imagine given all the tags use forward
slashes as well.

As far as capitalisation is concerned I'll have to batch rename the
files to lower case. About half I entered using the import function
and entered the case correctly, half was with the Ctrl = "I". But
rather than going through everything to see what needs changing and
what doesn't , it might be simpler to just rename everything lower
case, folders, filenames and the xml data.

Right, better get to it.

mzatanoskas

unread,
May 5, 2010, 2:55:45 PM5/5/10
to mnemosyne-proj-users
Thanks a lot for the help, all is well again it seems.

It took a number of tries to get it right, as the capitalisation of
the links to files and folders was a mess, I ended up just changing
everything to lower case. So far I haven't come across a broken link
yet *cross fingers*.

As far as the original font markup problem was concerned, I managed to
solve it by simply resetting the configuration settings to default. It
seems changing the multiply non-latin font by a number setting makes
mnemosyne ignore the font markup. Which is why the latin font markup
was unaffected presumably. Feature/bug?! I had thought I'd tried
resetting to default already before posting, but maybe not. *ahem*

I downloaded that font you recommended Jesse all the same, and have to
agree it's a lovely font, somehow the same old Japanese vocab seems
that much more refined and cultured now, I thank you!

Finally exporting, editing and importing was much less of a hassle
than I had thought it would be. You have to be careful not to leave
lot's of abandoned .mem files in your folder which could get
confusing, but it has one big advantage over an automatic find/replace
feature. You're forced to leave a backup as such, ie the original .mem
file before the find/replace operation which if it went wrong could be
a royal pain in the **** to fix.

Thanks again for the help and advice.

Peter Bienstman

unread,
May 6, 2010, 1:44:16 AM5/6/10
to mnemosyne-...@googlegroups.com, mzatanoskas

> As far as the original font markup problem was concerned, I managed to
> solve it by simply resetting the configuration settings to default. It
> seems changing the multiply non-latin font by a number setting makes
> mnemosyne ignore the font markup. Which is why the latin font markup
> was unaffected presumably.

This whole non-latin font increase thing is a big hack. I've gotten rid of it
in Mnemosyne 2.0 and replaced it by formatting options per field.

Peter
Reply all
Reply to author
Forward
0 new messages