Custom CSS / custom fonts in the official Android client

34 views
Skip to first unread message

Toby

unread,
Aug 9, 2018, 11:52:45 PM8/9/18
to mnemosyne-proj-users
Hello

I'm using Mnemosyne as part of my Japanese studies and I'm finding the standard Android font insufficient, but I don't want to root the phone.

Is there a way to add my own CSS to the cards, in order to load a custom font from the phone's internal memory? 

I've found several posts about an older Android client, which mention an export directory, but I'm using the official client with the sync function and I don't think I have an export directory. Can I place a style.css file and a font file by hand somewhere in the phone?

-Toby

Peter Bienstman

unread,
Aug 10, 2018, 2:46:17 AM8/10/18
to mnemosyne-...@googlegroups.com

Hi,

 

Mnemosyne’s internal font setting option is using CSS, but I’m afraid it does not work on Android due to the restrictive way its font system is set up…

 

Cheers,

 

Peter

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/3e197bc7-296c-4e67-8c20-838f2b7e72e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Toby

unread,
Aug 10, 2018, 4:39:53 AM8/10/18
to mnemosyne-proj-users
The reason I was asking is because AnkiDroid uses CSS too and it allows you to put a custom font file in the media directory and reference it from the CSS using a relative path.

I was wondering if the same thing would be possible in Mnemosyne.

Tobia

Peter Bienstman

unread,
Aug 10, 2018, 5:13:15 AM8/10/18
to mnemosyne-...@googlegroups.com
In theory yes, but they use an elaborate custom rendering mechanism to bypass the standard Android font handling.

If someone want to help implementing this, that would be nice :-)

Cheers,

Peter

-----Original Message-----
From: mnemosyne-...@googlegroups.com <mnemosyne-...@googlegroups.com> On Behalf Of Toby
--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/d3838870-c392-4db7-978a-0d4a13b43aec%40googlegroups.com.

Toby

unread,
Aug 10, 2018, 5:19:41 AM8/10/18
to mnemosyne-...@googlegroups.com
Oh, that's why AnkiDroid is so slow at loading the custom fonts. On every card that uses them, it takes up to half a second, on a brand new flagship phone.

Well, if anybody has any other advice, especially for Japanese, that would be welcome. Even a standard Mincho font would be preferable to the Gothic thing Android seems to be using.

Toby

unread,
Aug 11, 2018, 7:06:33 AM8/11/18
to mnemosyne-proj-users
Anyways, font or not, is there such a thing as a custom CSS file in Mnemosyne, especially in the Android client?

In Anki I can write custom CSS in the card design screen, that will be applied to all cards of that type.

Is there such a thing in Mnemosyne?

Toby

Peter Bienstman

unread,
Aug 12, 2018, 12:43:49 AM8/12/18
to mnemosyne-...@googlegroups.com
Hi,

For Mnemosyne's card types, that functionality is not exposed to the ui, as Mnemosyne currently assembles the css itself at run time.

For cards you import from Anki, you have an interface similar to Anki's to edit css.

Cheers,

Peter



From: Toby <eta...@gmail.com>
Sent: Saturday, 11 August 2018 13:13
To: mnemosyne-proj-users
Subject: Re: [mnemosyne-proj-users] Custom CSS / custom fonts in the official Android client

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages