Bỏ qua đến nội dung

Randomize Fonts New

Chờ xử lý #anki #addon #randomize #fonts #new
Unknown
16/4/2023

Cách tải addon Randomize Fonts New

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

82628558

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 82628558 và copy

5
2

Mô tả chi tiết

Update/rewrite of my old addon: https://ankiweb.net/shared/info/1603486068

This one is “better” in that you can select which cards ought to have their fonts randomized depending on a bunch of different criteria: Note contains field with name X Note contains field with contents matching X Note contains field with contents of length X Note contains field with X many Kanji Note has tags X (and/or) Y (and/or) Z… Note’s deck name matches X Note’s type name matches X Card is in state X Card has a success rate <|<=|==|>=|>|!= X Card has been passed X times

To configure: Go to Tools > Configure Random Fonts On the Search tab, check the box next to the criteria you would like to use, the fill out whatever values you’d like to use for that criteria On the “Configure Fonts” tab, disable any fonts which you don’t want to be considered when a random font is chosen for that language. In your card template, add the name of the language that should be used as a class of the field. i.e. “<span class=‘Japanese’>{{Japanese}}</span>”

Now, while you are reviewing, each card will be evaluated against your criteria. If it matches, the fonts will be randomized.

Notes:

  • I do not control which fonts are available for each language, Qt does. If it decides that your font does not support Japanese characters, it will not appear under “Japanese” in the “Configure Fonts” tab. Maybe find a different language that that font does appear under and use that instead?
  • Forgive me if the UI/UX isn’t that great. I’m not a designer and also I had this looking the way I wanted in Qt5, then the change to Qt6 changed things a lot.
  • If you want to see the name of the font which was randomly picked on each card, there is a hidden item with an ID of the name of the language that you can show with css. For example, “#JapaneseFontName { display: inline-block !important; }”. Style this to your liking.
  • The full list of languages can be found in the dropdown on the “Configure Fonts” tab or here (Ignore the “QFontDatabase::” prefix): https://doc.qt.io/qt-6/qfontdatabase.html#WritingSystem-enum

I’ll get this up to GitHub soon. Let me know if you run into any issues or have any suggestions.


Reviews (7)

👍 2025-06-12

very epic, works for me

👍 2025-04-23

Can’t get this to work for Simplified Chinese

👍 2024-10-27

Working perfectly for both Japanese and Korean, thank you so much.

For others using the WK card styles, the template line will look something like this instead: “<p class=“word”><span class=‘Korean’>{{Korean}}</span></p>”.

👍 2023-12-10

doesnt work for simplified chinese. even if it did, it wouldnt be good for me. a lot of my simplified chinese fonts are not in the right language group. i have yet to find out how qt decides what group they are, but this limitation should not be in this addon, why not allow for selection of specific fonts instead of a language group?

👍 2023-06-13

I was able to style the font block as small text on the bottom center and hide the “JapaneseFont” string with this CSS attached to the Styling:

#JapaneseFontName {

position: fixed;

left: 50%;

bottom: 0;

transform: translate(-50%, -50%);

margin: 0 auto;

display: block !important;

font-size: smaller;

}

#JapaneseFontName ruby rb {display: none;}

👍 2023-06-03

(Sorry changing my review here to positive, after some initial futtering with the settings, I got it to work. The fault was mine not the authors.)

I want to explain to people why this add-on is a really good idea and you should download it…

The idea behind randomizing the font is that breaks the contextual memory; often a memorizer will find that they can recall a perfectly in Anki, but they fail to recall it when they encounter that word in ‘real life’, this is because their memory of tha

👍 2023-05-25

Works perfectly fine for Japanese. Thanks!