Support of Pāḷi accents on Android‏

99 views
Skip to first unread message

rob.abh...@gmail.com

unread,
Mar 15, 2015, 12:09:13 PM3/15/15
to anki-a...@googlegroups.com
I want to use Anki to study the Pāi language. 

The challenge that I am facing is that P
āi uses an extended character set to show accents on letters.

I type in the extended characters into Word and copy them into Anki and everything looks fine on the computer (
I am attaching a screen shot showing a card that I created). When I view this card on my Android (Samsung Note 4), only the accented "a" (ā) appears. The accented "t" (ṭ), the accented "l" (ḷ) and the accented "n" (ṇ) do not appear on my phone.

Any idea how I can view these accented characters on my phone?
Screen caputre.jpg

ospalh

unread,
Mar 15, 2015, 3:33:20 PM3/15/15
to anki-a...@googlegroups.com, rob.abh...@gmail.com
Hmm.
Maybe a font issue. Maybe the standard Android font, Droid does not contain n with dot below &c.
Try finding a good font with all the characters (maybe Arial, although i am against that one on aesthetic grounds), and read the manual (+ the Anki desktop manual linked there).

rob.abh...@gmail.com

unread,
Mar 15, 2015, 8:58:47 PM3/15/15
to anki-a...@googlegroups.com, rob.abh...@gmail.com
Thanks for your quick reply.

I have tried a few times to load new fonts into Anki using my PC using the instructions in the manual. I tried Arial, Arial Unicode (big file), Times New Roman and Times New Roman Extended. I even tried the Google Noto Sans Brahmi font (which is supposed to support Pali).

Each time I rename / copy a Windows 8 font file into the Anki User collection.media directory and start Anki, it takes time to upload the new font file... but the Anki card display remains (font does not change... I expected it to look different when using Times as compared to Arial). When I sync Anki on Android, it also takes time to upload the new font file, but the Anki card display remains. Again, everything looks fine on the PC, but letters are missing on the Android.

The fact that my cards do not display with the new font suggests to me that I am doing something wrong with my card template. I have attached a screen shot of what my card template looks like. If the .jpg is difficult to read, here is what is in the Styling section (this is for the Times extended font):

.card {

font-family: myfont;

font-size: 20px;

text-align: center;

color: black;

background-color: white;

@font-face { font-family: myfont; src: url('_timesx.ttf'); }

}


Just as an experiment, I changed "color: black" to "color: red" in the template file. The PC version of Anki then showed text in red (as expected). However, my Android version of Anki continued to show text in white on a black background. This suggests to me that perhaps the template changes done on the PC do not sync with my Android. On the other hand, even though all Pali letters show correctly on the PC, they do not change to Times Roman font... 

Any suggestions?

Thanks,
Rob :-)
Screen1.jpg

Tim

unread,
Mar 15, 2015, 10:28:05 PM3/15/15
to anki-a...@googlegroups.com, rob.abh...@gmail.com
@font-face { font-family: myfont; src: url('_timesx.ttf'); }

You need to move this line outside of the .card{...} curly braces to the bottom of the styling section

rob.abh...@gmail.com

unread,
Mar 15, 2015, 10:57:28 PM3/15/15
to anki-a...@googlegroups.com, rob.abh...@gmail.com
Very fast response :-)

Works perfectly now! I am very appreciative.

It is possible that others may face the same issue. I would like to suggest that the on-line documentation be tweaked to emphasize where the line is to be inserted (i.e. outside the curly brackets).

Thanks,
Rob :-)



On Monday, March 16, 2015 at 12:09:13 AM UTC+8, rob.abh...@gmail.com wrote:

Tim

unread,
Mar 15, 2015, 11:44:35 PM3/15/15
to anki-a...@googlegroups.com, rob.abh...@gmail.com
Which documentation are you referring to excatly?

rob.abh...@gmail.com

unread,
Mar 15, 2015, 11:57:41 PM3/15/15
to anki-a...@googlegroups.com, rob.abh...@gmail.com
Hi Tim,

ospalh provided me with a link to https://ankidroid.org/docs/manual.html#customFonts which pointed me to the desktop manual.

I followed the instructions to install fonts found in: http://ankisrs.net/docs/manual.html#installingfonts (the desktop manual)

This portion of the desktop manual provides an example to show the syntax but does not tell me that this new line has to be placed outside of the .card curly brackets.

Thanks,
Rob :-)


On Monday, March 16, 2015 at 12:09:13 AM UTC+8, rob.abh...@gmail.com wrote:

Tim

unread,
Mar 16, 2015, 12:29:19 AM3/16/15
to anki-a...@googlegroups.com, rob.abh...@gmail.com
OK I sent a pull request to the main Anki project:
Reply all
Reply to author
Forward
0 new messages