Hello, I’m having an issue with AnkiMobile using a custom Japanese font. I’m using the font Genei Chikugo Mincho v2 (源暎ちくご明朝) on my cards. The font is free and it can be downloaded here: 【フリーフォント】源暎フォント ダウンロード - 御琥祢屋. When I use anki on my PC (Windows 10, Anki version 2.1.49), the font renders as expected, which can be seen in this image:
(correct font appearance)
However, when I use my iPhone (iOS 15.1, iPhone 6s, AnkiMobile version 2.0.83), the custom Japanese font does not render at all. This can be seen in the image below. This is especially clear in the さ and い characters. I use vertical text on mobile, so that’s why the text orientation is different.
(incorrect font appearance)
Here is the css for my card type:
Front Template
<div class="tategaki">{{Expression}}</div>
Back Template
<div class="tategaki">{{furigana:Reading}}</div>
<hr id=answer>
<div class="meaning">{{Meaning}}</div>
{{Audio}}
Styling
@font-face {
font-family:"genchiku";
src: url("_genchiku.ttf");
}
.card {
font-family:"genchiku";
font-size:3em;
background-color:#2f2f31!important;
color:#ffffff!important;
text-align:left;
}
.tategaki {
font-size:1.1em;
}
.meaning {
font-size:0.8em;
}
.mobile .card {
font-size: 1.8em;
}
.mobile .tategaki {
font-size:1.1em;
align:center;
margin:0 auto;
text-align:left;
text-orientation:upright;
writing-mode:vertical-rl;
-ms-writing-mode:vertical-rl;
-webkit-writing-mode:vertical-rl;
}
This is what my collection.media folder looks like. I cleaned out my collection.media folder a few weeks ago and manually deleted some unneeded fonts from past decks. All the files below what’s shown here are just more mp3 files.
What have I done to attempt to fix the problem?
-
Reread the Custom Fonts section of the anki manual.
I’ve tried every combination of quotation marks and renaming the ttf file and no matter what, the font will work on PC but not on mobile. -
Uninstall and Reinstall anki.
I’ve uninstalled and reinstalled anki on my desktop, as well as uninstalling and reinstalling ankimobile on my phone. -
Restart Computer/Phone
I’ve restarted both my computer and my phone multiple times and have found no difference. -
Setting iPhone Language to Japanese
I set the language of my phone to Japanese, synced again, and no difference was found. -
Installing the custom font on my iPhone using a third-party font installer app
I’ve tried installing the font using the app FontInstall.app, and it was supposedly succesfully installed to my phone, but it had no effect on anki. -
Trying other fonts
I have used another font, Crimson Pro, in conjunction with Genei Chikugo with a font stack in font-face, and Crimson Pro was rendered correctly. Neither Crimson Pro or Genei Chikugo are installed on either of my systems, PC or mobile.
Crimson Pro is a free font and can be found here: https://fonts.google. com/specimen/Crimson+Pro -
Searching for Solutions Online
I’ve looked on the anki forums and on reddit for issues with fonts not showing on mobile, but almost all of them were related to the person not using@font-face
correctly or not using a TTF file. I’ve read over the “Custom Fonts” section of the main manual and I’m stuck becuase I’ve followed it exactly multiple times.
Custom Japanese fonts have previously worked just fine in AnkiMobile a few months ago, so I figure it has something to do with iOS15 or my phone just being old.
I am aware that Japanese fonts are rather large, so that could be why the english Crimson Pro font worked properly while my Genei Chikugo japanese font did not. I read in the AnkiMobile manual that mobile has trouble with more than three fonts, so I made sure to delete all fonts except the aforementioned two, as well as all unused note types.
Thanks for reading through this, any assistance would be appreciated.