Jitai (字体): The font randomizer that fits


#121
EskimoJo said...Can you explain what bit of code you changed to the lay people please! :-D
If you want to make the changes to your script directly, you can see what changes I made by having a look at the Revisions tab of my gist:
https://gist.github.com/cplaverty/ceee98a407a0bdab5db7/revisions
That will show you the two lines in the script that I changed.

If you just want to try it without messing with the code, the direct link to the script is:
https://gist.github.com/cplaverty/ceee98a407a0bdab5db7/raw/361cb5583f629426cbdb68555331c3b7eabe89f5/...
That should hopefully directly prompt you to install it in Tampermonkey.  Though of course this would just be temporary until the original script is modified as I don't intend to keep it up to date.

#122
cplaverty said... The Ultimate Reorder script cheekily overrides the implementation of Math.random() to always return 0 when 1x1 mode is selected.  It assigns the previous (true) implementation to Math.randomB before it does this.
 Hahah, oh man, I can't believe I didn't catch that. I was almost certain the error was related to the font-changing code somehow not being called, and not that the same font was being chosen every time... I don't use WaniKani Reorder Ultimate (and wasn't too keen on doing so), so I couldn't debug them together, which definitely would've helped.

Well, that was the information I needed! I've updated Jitai to version 1.2.0. This makes two changes:

  • Nagurigaki is switched out for aquafont. Less ugly and thick, but still handwriting-y.
  • Compatibility with WaniKani Reorder Ultimate 2's 1x1 mode is fixed!

Thanks!

#123

Thanks for the updates! Now I can use the script. Psyched.


#124
obskyr said...
cplaverty said... The Ultimate Reorder script cheekily overrides the implementation of Math.random() to always return 0 when 1x1 mode is selected.  It assigns the previous (true) implementation to Math.randomB before it does this.
 Hahah, oh man, I can't believe I didn't catch that. I was almost certain the error was related to the font-changing code somehow not being called, and not that the same font was being chosen every time... I don't use WaniKani Reorder Ultimate (and wasn't too keen on doing so), so I couldn't debug them together, which definitely would've helped.

Well, that was the information I needed! I've updated Jitai to version 1.2.0. This makes two changes:

  • Nagurigaki is switched out for aquafont. Less ugly and thick, but still handwriting-y.
  • Compatibility with WaniKani Reorder Ultimate 2's 1x1 mode is fixed!

Thanks!
Just did a few reviews to test and it works perfectly now with the reorder script. Thanks a lot for fixing this so fast!
(also, you even tweeted me it was fixed, thats some service right there... thank you <3)

#125

Re: http://www.freejapanesefont.com/hakusyu-kaisho-bold-calligraphy/

It says “only contains 1006 kanji as it’s a trial version.” So…I wouldn’t recommend installing that one. It’s too bad as it’s my favorite one on the site. It’s possible other ones are missing characters too. Guess we’ll see!


#126
Amenophyckxs said...Just did a few reviews to test and it works perfectly now with the reorder script. Thanks a lot for fixing this so fast!
(also, you even tweeted me it was fixed, thats some service right there... thank you <3)
 No problem! I'm very happy to help. I want people to use Jitai, since I believe people could benefit from it, so I'm glad I was able to fix it for the expanse of people who use WKU too. 😊

Subtractem said... Re: http://www.freejapanesefont.com/hakusyu-kaisho-bold-calligraphy/

It says "only contains 1006 kanji as it's a trial version." So..I wouldn't recommend installing that one. It's too bad as it's my favorite one on the site. It's possible other ones are missing characters too. Guess we'll see!
As mentioned, Jitai detects whether fonts contain the glyphs in the words WaniKani is trying to display, and only uses them if they can represent every single one. This means there's no downside to downloading fonts with a lack of glyphs, since they will only be used when they actually do work.

Maybe I should add that to the main post somewhere, seeing as people are wondering...

#127

Oh, sorry I missed that. 13 pages of discussion now hehe. Installing the font now then!


#128
obskyr said...
Alluka-Sama said... So for some reason this won't work for me at all.. Not sure why. I have several of the fonts installed. Even after disabling my other scripts to see if that would help it still didn't work.
 Which OS and browser are you on...? And were you doing reviews and not lessons?
 I was doing reviews and I'm using the latest Linux Mint distro and was using firefox but think I solved my problem. So I've tinkered with my config settings for firefox in the past so that may be why the script wasn't working, but its the only one so I dunno. But it also wasn't working on chromium. So I removed some scripts and restarted chromium and found it worked but not with the "Wanikani Override" script. Then removed all scripts and reinstalled them, installing the Wanikani Override one last and Jitai first and it works (frickin weird that it works now  but OK :) ). Those are the only two scripts I use that affect reviews. I'll just use chromium for wanikani I guess   Awesome script by the way, really liking a lot of the fonts, though a few of them I just can't decipher :p

#129

Just checking - doesn’t work with Safari?


#130
busaninja said...
AnimeCanuck said...I also use xMunch's reorder script, so I'd be interested in having the following problem looked at/fixed:

Amenophyckxs said... 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. 
 I also use Reorder Ultimate 2, but do not have this issue. This got me wondering....
Those of you having this compatibility issue, are you using the 1X1 reordering feature?
Nope! I never have that checked. I don't like to do that, as I'd rather let WK space the meanings and readings out as it likes, so that way it's "harder" for me to memorize. When they're back-to-back, it feels easier and I also get less exposure.

EDIT: Thanks for the quick update!!! I removed the last version and I'm going to download the new 1.2 version now. Hopefully that helps my issue, as I said, I don't use 1x1 ever. Also, I was seeing the same 2 or 3 fonts only, as if it's not really cycling through that many. (Plus, which font is the one that looks like WK's base font but has wider spacing? Whichever one that is, I'd like to delete from the list so it doesn't come up when other more varied fonts could instead?)

Thanks again! :D

#131
AnimeCanuck said..EDIT:  Also, I was seeing the same 2 or 3 fonts only, as if it's not really cycling through that many. (Plus, which font is the one that looks like WK's base font but has wider spacing? Whichever one that is, I'd like to delete from the list so it doesn't come up when other more varied fonts could instead?)
 Have you installed some of the mentioned fonts linked in the Opening post? Because I think most non-japanese systems won't have that many fonts preinstalled.

#132
Telmann said... Just checking - doesn't work with Safari?
 It probably does, seeing as Tampermonkey is available for Safari too. Try it and report back, if you'd like to!


AnimeCanuck said... (Plus, which font is the one that looks like WK's base font but has wider spacing? Whichever one that is, I'd like to delete from the list so it doesn't come up when other more varied fonts could instead?)
That might be MS Gothic. Do you have Hiragino Kaku Gothic Pro, Meiryo, Yu Gothic, or Osaka installed (for real, I'd like to know the answer)? If you have any of those, there shouldn't be a font with just a different spacing in the rotation.

That is a tiny tiny possible bug in the case that someone's got an old copy of Windows, though, actually. Huh!

#133

I just installed it, and it works so well. Thank you for your hard work! It’s replacing the old script as of now.



#134
obskyr said...
Telmann said... Just checking - doesn't work with Safari?
 It probably does, seeing as Tampermonkey is available for Safari too. Try it and report back, if you'd like to!
I can confirm it works for Safari. 

#135
obskyr said...
AnimeCanuck said... (Plus, which font is the one that looks like WK's base font but has wider spacing between characters? Whichever one that is, I'd like to delete from the list so it doesn't come up when other more varied fonts could instead?)  [EDIT ABOVE ^]
That might be MS Gothic. Do you have Hiragino Kaku Gothic Pro, Meiryo, Yu Gothic, or Osaka installed (for real, I'd like to know the answer)? If you have any of those, there shouldn't be a font with just a different spacing in the rotation.

That is a tiny tiny possible bug in the case that someone's got an old copy of Windows, though, actually. Huh!
 I am running Windows XP. ^_^;;

I do believe I have Yu Gothic installed, I don't think any of the others (except Meiryo) I have. I don't remember seeing them in my list of fonts as I perused them for Hirose, Tsuruya, and other Japanese fonts that I had installed (but all the ones from japanesefonts.com looked empty when I tried the "open" preview view of them, so I didn't end up adding them to your list in the script). I am yet to check out your link/git hub for more (like Amoured Banana). But as I said, for sure one thinner, more script-y one (that was still quite easy to read for most kanji) was working well in the cycle. So yes, I'm running a really old IME! XD

#136

Super minor update released. Jitai 1.2.1. All it does is add some alternate names for some default fonts (which Japanese operating systems may use) and prioritize PGothic and PMincho over the non-proportional versions, as that’s what WaniKani does. May fix the “different spacing” issue talked about earlier.


#137
AnimeCanuck said...I am running Windows XP. ^_^;;
 Ah, that may very well explain it! 1.2.1 should fix it, then, if I was on the money about what the issue was.

#138
obskyr said... Super minor update released. Jitai 1.2.1. All it does is add some alternate names for some default fonts (which Japanese operating systems may use) and prioritize PGothic and PMincho over the non-proportional versions, as that's what WaniKani does. May fix the "different spacing" issue talked about earlier.
 Haha, the "different spacing" isn't the issue, it's that the font that does this looks exactly the same as WK's default font. That's why I want to remove it from your script. XD

#139
AnimeCanuck said...
obskyr said... Super minor update released. Jitai 1.2.1. All it does is add some alternate names for some default fonts (which Japanese operating systems may use) and prioritize PGothic and PMincho over the non-proportional versions, as that's what WaniKani does. May fix the "different spacing" issue talked about earlier.
 Haha, the "different spacing" isn't the issue, it's that the font that does this looks exactly the same as WK's default font. That's why I want to remove it from your script. XD
Well, I think it's good to have the default font in there too. So not every item is in a weird font and you actually do occasionally get a "nice" one with the font you're used to. On Windows XP the default font should be MS PMincho (or one of the ones I mentioned if you've got them installed), so you can just remove those lines from the list if you never want to run into the default font at all.

#140
obskyr said...
AnimeCanuck said...
obskyr said... Super minor update released. Jitai 1.2.1. All it does is add some alternate names for some default fonts (which Japanese operating systems may use) and prioritize PGothic and PMincho over the non-proportional versions, as that's what WaniKani does. May fix the "different spacing" issue talked about earlier.
 Haha, the "different spacing" isn't the issue, it's that the font that does this looks exactly the same as WK's default font. That's why I want to remove it from your script. XD
Well, I think it's good to have the default font in there too. So not every item is in a weird font and you actually do occasionally get a "nice" one with the font you're used to. On Windows XP the default font should be MS PMincho (or one of the ones I mentioned if you've got them installed), so you can just remove those lines from the list if you never want to run into the default font at all.
 Yeah, basically. I mean, you have the mouseover in there. But it's that I had the default font plus this other identical font with wider spacing. So I was seeing the default font more than 2/3rds of the time. But as I said, I only had this script running for 20 reviews yesterday, which is a small sampling, too. (And I was sad to see my lovely Hirose and Tsuruya fonts not show up, but perhaps they're kana only???)