Jitai (字体): The font randomizer that fits


#1

Jitai logo What is Jitai?

One thing that can become a bit of a problem when using WaniKani is that you are only ever exposed to one font. What this means is that if you ever run into a kanji in the wild, even if you know it, you might not recognize it. Especially with handwriting and calligraphy and all that jazz being around, it helps a lot to get in a bit of training on fonts that aren’t Meiryo.

That’s where Jitai (字体) comes in! When you’re doing reviews, Jitai automatically sets the font of the radical/kanji/vocabulary to a random Japanese font you have installed. Can’t read it? No problem! Just hover over it with the mouse pointer, and it’ll switch back to the normal font. If you want to compare to the random font again after answering, same thing there: just hover, and all your problems are solved. Several times already I’ve gone “oh, so people write that kanji like that, too!?” It’s pretty great!

So what’s the “[…] that fits” part about? Well, lemme tell you! It means Jitai feels like it’s part of WaniKani. The font changes at logical times (every new question), and goes back to the default font when you’ve answered a question so you get to be 100% sure which kanji it was. To my knowledge, no other font randomizer works in this particular way, which is why I wrote my own. “Fits” also means it fits your system – no modification is required for Jitai to start using most normal Japanese fonts you have installed.

A script like this already exists since earlier – Wanikani random fonts by @Wind. I’d like to thank @Wind immensely for making it – without it, I probably wouldn’t have thought of making something myself. Plus, the hover-to-revert feature was a stroke of genius! However, that script has some shortcomings. For example, it changes on a timer, which feels awkward and a bit out-of-place. Here are the differences between Jitai and Wanikani random fonts:

  • Jitai changes font on every new word, and not on a timer.
  • You don’t need to edit the font list to fit your system (although it is possible); Jitai detects which fonts are installed.
  • Once you’ve answered a question, Jitai switches back to the normal font so you can see clearly which kanji it was.
  • Jitai only randomizes the font on reviews, not lessons. When you’re being introduced to a kanji, you probably don’t want it written by a calligraphy master…
  • The font of the answer box isn’t changed, so you can see what you’re writing.
  • Jitai is compatible with reorder userscripts (WaniKani Reorder Ultimate 2 as of version 1.2.0, others as of version 1.3.1)
  • A bunch of other tiny quality-of-life changes for that extra bit of polish.

Well, get on with it! Lemme download it!

Sure! Jitai is a userscript, which means it’s installed with a userscript manager like Tampermonkey (Firefox, Opera, Chrome, or Edge – since version 4, Greasemonkey is sadly enough broken). In case you haven’t used userscripts before, the wonderful @Mempo has been nice enough to provide instructions on how to install and edit userscripts on both Firefox and Chrome (although for Firefox, you’ll have to install Tampermonkey instead of Greasemonkey).

Jitai logo  Get Jitai! (Version: 1.3.2)

Download Jitai from OpenUserJS. Click the “install” button in the top right!

GitHub logo  Jitai on GitHub Gists

At this link you can fork Jitai, perhaps to make a version with your own fonts.


Jitai will only use fonts that you have installed. Chances are you don’t have a lot of Japanese fonts, so I would recommend installing the freejapanesefont.com fonts shown in the list on GitHub. If you’d like to add a font that isn’t in the list, that’s pretty easy too! Just edit the script (as shown in @Mempo’s tutorial), read the comments at the top, and add your font to the list as shown.

Screenshot of font window with font name

Make sure you set the correct font name – on Windows, it’s the name shown at the top of the font display window.

Currently, the fonts used (provided you have them) out of the box are:

  • The default Japanese fonts on Windows
  • An aesthetically diverse set of the default Japanese fonts on OS X
  • The most common Japanese fonts used on Linux
  • A couple of families people tend to want to use (EPSON families, cinecaption, etc.)
  • A set of fonts from freejapanesefont.com
  • For a full list of the immediately supported fonts and where to get them, see the list of fonts on GitHub.

That’s it, really.

If you have any questions, any comments, any… anything, really, this is a forum thread! So you know what to do. If you’ve got any feature / change / bugfix requests, I’ll be happy to answer them. Same if you’d like a font to be added to the default list (in case there’s a widely wanted font I missed, or if there’s a font you think would be useful for others) – I’ll probably be more than happy to add it.

In case you come across this months down the line, and I don’t check this thread actively, I can be reached @obskyr on Twitter. I’ll answer pretty gosh-darn fast there if I know myself correctly.

Enjoy!


Quiet Mode: Don't want to draw attention to yourself?
Google's Noto Fonts Are Really Beautiful
Font types and recommendations for Jitai
WaniKani random font
Just made level 60 and failed N1 a second time
There should be an option to change the kanji font
Fonts differ across platforms?
Sum up your recent WaniKani Review sessions with a short clip/gif
[iOS] Mobile AlliCrab for WaniKani
[iOS] Mobile AlliCrab for WaniKani
[iOS] Mobile AlliCrab for WaniKani
Radical shape not exact for kanji
Favorite or Must Have Scripts and Apps?
[iOS] Tsurukame - native app with offline lessons and reviews
Any ways to recognise unreadable fonts?
Going monolingual
Chart of Frequency of Kana used in WK Kanji readings
Simplified Chinese Font
Let's praise these USERSCRIPTS and their awesome CREATORS
How to decipher stylised kanji?
Quick add-in that might help people a lot
How do I change review font?
🤔 Everything I own has different fonts for Kanji writing
Who Has Reached Higher Levels with no Scripts? Raise Your Hands
Not being able to read Kanji, even though you know Kanji?
WaniKani random font
Encountering the vocabulary and kanji in the wild
WaniKani random font
Fonts differ across platforms?
#2

Hey! Great job! That’s clean. Thank you.
I’m going to test that in my next review and probably stick with it!

Edit: it works like a charm <3


About to enter the painful levels... searching for advice on how to handle the pain
About to enter the painful levels... searching for advice on how to handle the pain
#3

Very interesting and nice, thank you.


#4

Yes, thank you, I will kindly take this, it is mine now.

I guess I need to install some new fonts now, huh?


#5
SceleratSleuth said... Yes, thank you, I will kindly take this, it is mine now.

 Don't know how comfortable I am with Komaeda using my scripts, but I guess I can't really be picky... 😁

#6

Cool beans! Gonna go get some…obscure fonts to use with this then, hardi-har-har!


#7

I remember thinking a few days ago, 'I will never be able to read people’s messy chicken scratch kanji." But maybe with this script and Armed Banana… anything is possible. :wink:

Seriously, thank you for your hard work, this is great!


#8

good idea! using it now
Thanks!


#9

Ugh so pretty do want

edit: 
Ok now i have used it and confirmed that it is rad
SUGGESTION. I really like the fact that it switches back to Meiryo after you submit your answer. But I’m finding myself doing a little “wait how did it look again” type double take, wanting to see the secondary font again. So could you inverse the mouse over function in the post-submission screen? So that if I entered my answer, saw it switch to Meiryo and wanted to see the secondary font again I could mouse over the word to see the alternate font again?
Rad either way just a thought. 


#10
wawhite said... Ugh so pretty do want

edit: 
Ok now i have used it and confirmed that it is rad
SUGGESTION. I really like the fact that it switches back to Meiryo after you submit your answer. But I'm finding myself doing a little "wait how did it look again" type double take, wanting to see the secondary font again. So could you inverse the mouse over function in the post-submission screen? So that if I entered my answer, saw it switch to Meiryo and wanted to see the secondary font again I could mouse over the word to see the alternate font again?
Rad either way just a thought. 
Good idea, especially for things you get wrong. You might want to see why.

But the script sounds great! I will add.

#11

Question: Not every font has all kanji characters, does it detect if a font doesn’t have the kanji that’s supposed to be showing at the moment and choose a different font? Because I have the other random font script installed right now, which works fine, but that part is pretty annoying because sometimes it just shows nothing until I hover over it because of missing characters in the font.


#12
Basvdelsen said... Question: Not every font has all kanji characters, does it detect if a font doesn't have the kanji that's supposed to be showing at the moment and choose a different font?
Yep, it does! Glad you asked. That's one of the "tiny quality-of-life" improvements I mentioned. It detects whether chosen fonts have the glyphs in the current question, and if they don't, they're ignored that particular time. I noticed myself that things sometimes showed up blank, especially with obscure radicals, so I wrote a workaround for it.

Quality lies in the details!

Edit: By the way, getting to the hoverswitch in a bit. I'm busy for a few hours, don't know if I'll implement it - I'll try and see what feels right, though.

#13

This is really nice. Two questions:

1) How would I edit the script to stop the font returning to WK’s default when I answer?

2) The script seems to be using only one of the Japanese fonts on my Macbook Pro at the moment. Any idea why it would do that? There’s plenty of J-fonts installed. 


#14

Sweet, I just switched, works great. 


#15

This is really interesting. The point of Wanikani after all is to learn to read kanji, and this kind of script would make one’s skill set more diverse.

You have earned one (1) gratitude. 

Tack så himla mycket! <3


#16

Häftigt!


#17

I have the same issue as with the other font changer, whenever I reorder my reviews it stops cycling through the font list.
With the other font changer it starts out with one random font and it sticks to that random font after I reordered. This one changes to meiryo and never changes back. Would be nice if this gets fixed.
tested with reorder ultimate 2, and also with WK review order. 


#18

YAY!! Thanks so much!!! It’s working! :slight_smile:

Now… I just need to increase the number of fonts I have. I think there must only be 3 or 4 on this computer, lol.


#19

:SADFACE:

When I try to clicky the links to get the much needed fonts… they time out and the webpage can’t be loaded. 


#20

This is awesome! Added it to my scripts! :slight_smile: