Jitai (字体): The font randomizer that fits

1 Like

didnt find this one for download.

It’s an Adobe font you can see here, but unless you have an Adobe Creative subscription, you won’t be able to download it without buying it.

In any case, as I wrote earlier, over the next few months all the major browsers will follow Safari in disallowing external sites from accessing your local non-system fonts, so I wouldn’t pay for it for this purpose, even though it’s fairly cheap to get a personal license.

Also, here is the Google Fonts link for fonts supporting Japanese—there are hundreds of them and the search methods for Latin fonts don’t really translate well to Japanese, but at least you could scroll through when you’re bored…

(Note that the “handwriting” filter isn’t great here; it gives you three fonts, but there are others, like Kiwi-Maru, that is obviously handrwriting-style but is filtered out if you select handwriting.)

2 Likes

And here’s a link to at present ~60 Google fonts, along with a specimen with nonsense mixed kanji/hiragana/katakana text you can use.

2 Likes

Thank you for creating this! Fyi there are a couple dead links in the font list at the moment, the one for the EPSON fonts, which should point here:

https://www.epson.jp/dl_soft/readme/27767.htm

(Note that if your Windows PC is not set to Japanese language, you may not be able to run the EPSON EXE file, but I was still able to extract it as an archive using 7-Zip and get the TTF files out and install them manually with no problem.)

The link for HakusyuKaisyoExtraBold_kk is also dead (the download links on its page are broken), but I found it over here:

https://www.onlinewebfonts.com/download/a8a9b098d0e2133272bcc9d5e0162f7d

There is probably a better source than this.

Also a Safari user here. That issue was really annoying for me and my learning process, and I didn’t want to change browsers.
I made a quick workaround for Safari to use the webfonts that also the [Read that if you can] script uses. Maybe it will be helpful also for others, so I’ll post it here:
Jitai-Webfonts-Fix

Though, note that it is a quick&dirty workaround. It increases the starting time of the review session noticeably since it first loads all fonts. But once all fonts have been downloaded, it works like a charm.
If someone is more fluent in JS you can definitely optimize it, but for now its enough for my purpose.

1 Like

Awesome, thanks! I would miss the notification of this until a moment when, for the first time in probably a week, I have nearly 18 hours until my next review to see if it works, right?

Would using it in self-study sessions as well be as simple as changing the regex in the @include line to also include those URL’s? The iOS script manager will only install scripts from websites, not files, but I could maybe use Github—I’d need to try it. But maybe since you already have a GreaseMonkey account with the upload, that change would be easy for you?

I made a few changes since my last update. Here again is the link: Jitai Webfonts Fix

  • It loads now (dramatically) quicker
  • Made it easier to add your own fonts. I wanted to mainly focus on difficult fonts (handwritten, pixel-style, …) that challenge me like the ArmedBanana font, and removed fonts from the “Read that if you can script” that didn’t really work for me.
  • Also now works in Self Study Session

I agree about your comment that GitHub would be nice to host the script (like the Niai script and others do), rather than GreaseMonkey. Then people could actually contribute to it and make the script better / send in bug fixes to address issues as we had now. The last time this script was officially updated is a few years ago.
Btw, I am still looking for a hosted ArmedBanana font. I’d really like it to include in the Webfont fix. Maybe hosting it on my GitHub account together with the script might be an option, but since it’s the legal property of another person… not sure how to deal with that.

2 Likes

Agreed on all counts, and thanks for doing that!

(To be perfectly clear, I’m just brainstorming below; I have no real “complaints”, because this is strictly better than the old script!)

There’s something that goes way beyond a quick kludge I think (maybe it’s time for me to finally learn JavaScript and DOM programming, I’ve always worked exclusively server-side), but a “nice to add” in a hypothetical future version:

There are a couple Google fonts that are just totally illegible at the default size/weight on my primary device, and not in a fun or “good to stretch yourself” way—like Dela Gothic One, in which complicated kanji can render as a solid irregular polygon with a little hole or two.

To exclude them now you have to

  1. Figure out the illegible font’s name
  2. Make a private copy of the script
  3. Edit it to remove the name from the fonts list
  4. Plus—for browsers that won’t load local userscripts (like, Safari on iPad)—upload your own version somewhere
  5. Reinstall the script
  6. Notice any time there’s an update, and merge it with your mods to fonts.

which is all a bit of a pain.

I’m sure I’m in the distinct minority here given my skillset, but for me the most annoying bit is actually #1 — I have to open the Web Inspector (which is super-fiddly on iPad), find the main question <span>, and get the name from there. I’m wondering if I could (or should) just stick a console.log(currentFont) in there so I can just check the console when it gives me one?

(But it’s nice that you did it by rewriting the span element to include a style="font-family: "$fontname";";¹ attribute—if you’d done it as a pure style, it would’ve been even harder to find the font name!)

But that’s just me—I think for most potential users, #3–6 are the items that will get them hung up.

Unfortunately, right now Jitai is simpler than many WaniKani userscripts for not having to have any local persistent storage—and I don’t see any way to avoid that if you wanted to add a font inclusion/exclusion interface.


¹ A bit off-topic, but I’m curious, since (as I wrote above) I don’t know anything about DOM manipulation… but why does this even work? Like, in
<span lang="ja" style="font-family: "Kaisei HarunoUmi";">最終</span>

the tag’s style attribute seems to have double quotes inside double quotes?

Actually, a little injection so that there was, like, a small italic

Kaisei HarunoUmi

in one of the corner text elements might be sufficient for the font-identification thing. (And it would make it easier to notice you like a particular font and to download it if you want to use it yourself!)

I shouldn’t say anything since I’m not the maintainer of this script, but I imagine it wouldn’t be too difficult to add a button which adds the current font to a local blacklist

The inner quotes are actually escaped, it just doesn’t show in the DOM

1 Like