Advertisement
crackychan

2021 10 - Anki - Simplified Chinese Character display with SimSun font

Sep 23rd, 2020 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.09 KB | None | 0 0
  1. Anki 2020 September
  2. anki font simplified chinese mandarin serif sans serif handwriting
  3.  
  4. To anyone who searches this, here is the style code I use for Anki reviews. While learning simplified Chinese characters, noticed that some characters change between serif and sans serif font. When reviewing with strictly sans serif, this would cause inaccuracies in writing characters. During tests where handwriting was required, I would lose points from these inaccuracies. Example would be 每, which transforms to a + symbol in the box instead of two dots.
  5.  
  6. Was trying to use SimSunB font. Works fine on Windows PC, but would not on Android. Use SimSun (without the B). It worked for me and another who had the same problem. Since a user cannot simply "install" fonts on Android OS like you would on a Windows PC, the font needs to be included in your Anki Collection's media folder. This is easier to do on desktop then sync to your Android phone. Anki servers will transfer the font file for you.
  7.  
  8. ....\AppData\Roaming\Anki2\ [name of your collection] \collection.media\
  9. Location of where to place the .ttf font file. Be sure to add an underscore ( _ ) to the beginning.
  10.  
  11. I used this pre-made Anki collection for my study. Was following the "Remembering the Hanzi: Simplified Edition" by James W. Heisig and Timothy W. Richardson. Highly recommend looking into if you haven't heard of it.
  12.  
  13. https://massimmersionapproach.com/table-of-contents/stage-1/practice/recognition-rtk/
  14.  
  15. The collection includes SimSun.ttf. Use the code below to have Anki Android "load" the font file.
  16. To date, I still have no confirmation why an Android user cannot simply "install" a font file. Probably something to do with licenses and Google wanting you to use their Google Fonts database for use.
  17.  
  18.  
  19. Huge shout-out to Alpakajunge and DavidA on the Anki Discord for the help! Also shout-out to McKillian and Subarmale for previous help as well!
  20. https://discord.com/invite/jjQrw97
  21. https://apps.ankiweb.net/
  22.  
  23. This may help too:
  24. https://github.com/ankidroid/Anki-Android/wiki/Advanced-formatting
  25.  
  26. ------------------------- ------------------------- ----- ------------------------- -------------------------
  27. ------------------------- ------------------------- Front ------------------------- -------------------------
  28. ------------------------- ------------------------- ----- ------------------------- -------------------------
  29. <div class="keyword">{{Keyword}}</div>
  30. <div class="keyworddefinition"><i>{{KeywordDefinition}}</i></div>
  31. <hr>
  32.  
  33.  
  34.  
  35. ------------------------- ------------------------- ---- ------------------------- -------------------------
  36. ------------------------- ------------------------- Back ------------------------- -------------------------
  37. ------------------------- ------------------------- ---- ------------------------- -------------------------
  38. <div class="keyword">{{Keyword}}</div>
  39. <div class="keyworddefinition"><i>{{KeywordDefinition}}</i></div>
  40. <hr id=answer>
  41.  
  42. <span class="hanzi">{{Hanzi}}</span>
  43.  
  44.  
  45. <br><br><br>
  46. <div class="componentsearch">{{ComponentsSearch}}</div>
  47. <br>
  48. <div class="story">{{Story}}</div>
  49.  
  50.  
  51.  
  52.  
  53. ------------------------- ------------------------- ----- ------------------------- -------------------------
  54. ------------------------- ------------------------- Style ------------------------- -------------------------
  55. ------------------------- ------------------------- ----- ------------------------- -------------------------
  56. .night_mode { }
  57.  
  58. .card {
  59. #font-family: arial;
  60. font-size: 15px;
  61. text-align: center;
  62. color: black;
  63. background-color: white;
  64. }
  65.  
  66. .card1 { background-color: #ffffff; }
  67. @font-face { font-family: simsun; src: url('_simsun.ttf'); }
  68. .hanzi { font-size: 100px; font-family: simsun; src: url('_simsun.ttf');}
  69. .traditional { font-size: 100px; font-family: simsun; src: url('_simsun.ttf');}
  70. .pinyin { font-family: courier; }
  71. .keyword { font-family: Meiryo; font-size: 50px;}
  72. .keyworddefinition { font-family: Meiryo; font-size: 17px;}
  73. .story { font-size: 18px; color: #999}
  74. .componentsearch { font-size: 12px; color:grey}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement