Jitai (字体): The font randomizer that fits

Jitai actually has a measure in place to check that all characters in the word exist within the font – it’s lines 106 through 131 in the script. This has worked perfectly fine until just recently, but judging by your reports, it’s somehow broken! I suspect this might be down to recent browser updates that broke the approach used: especially Google Chrome breaks compatibility all the time. It may even work just fine in, say, Firefox.

I unfortunately won’t have time to debug and fix this anytime soon, but if anyone would like to fork and fix it on GitHub, I’d be happy to merge the fix in!

(cc @btlindsay, @Thud, @saibaneko, @Hubbit200)

1 Like

Hi obskyr,

First of all, thanks a lot for making this plugin, it’s really amazing.

I think the glyph support detection broke because blank canvases are no longer generating the same data url.

Please take a look at https://gist.github.com/yannickboesmans/bfdcfb82ca3ee6ae854d279ddf9fcceb/revisions for a potential fix.
It uses an alternative method to check whether the canvas is blank.

It seems like I can’t open a pull request on github gists, so you may have to just copy the code into the main repo.

Thanks again for making this great plugin!


Btw, this still works in 2022. Just installed Tampermonkey and the Jitai script, added fonts and just works. No configuration needed. Just magic.

1 Like

Is this PC only or could it work on mobile? I’m super unfamiliar with scripts and coding so I have no idea haha…

It’s not PC only, but it requires a browser with userscript support, so on mobile you’d need Firefox (I heard it supports extensions, apparently including Tampermonkey) or something like Kiwi (which supports Chrome extensions). It won’t work with non-browser apps like Flying Durtles or Tsurukame.

1 Like

Okay great! thank you so much!! I’ve been using chrome, so I’ll check kiwi out. I’ll definitely look into getting the script too, it seems like a really good addon to have!

1 Like

Is there a way I can diagnose what current font is displayed for something? It seems I’m having issues on a font suddenly with the 々 not coming up for some reason

Not sure how familiar you are with HTML, but there’s a relatively easy way to do that. If you right-click the word and click “Inspect” in Chrome or Firefox (I guess other browsers also have something similar these days), you’ll get a window with some HTML code, and one line of it will be highlighted. The line should look something like this:
<span lang="ja" style="font-family: nagayama_kai;">花火</span>
The part after “font-family:” is the font used for the current review.

1 Like

I think I found out how to do it. I’ve commented out the offending fonts but if it keeps happening, it may not be font specific. It’s strange because I’ve had zero issues with my font sets for like 2 months.

Update, it doesn’t seem to be specific to fonts. That is unfortunate. Since it didn’t occur before, ever, with all of these fonts I’ve been using.

1 Like