Jitai (字体): The font randomizer that fits

Amenophyckxs said...
busaninja said...
 I believe it's purely coincidental that the issue you're experiencing is happening when you click the reorder button. I have also used both random font scripts with both of the reorder scripts that you've mentioned (currently using Reorder Ultimate 2) and I haven't had any compatibility issues. So the problem must be some other conflict.
 There must be a reason, not a coincidence. Not sure what it is, but someone else commented after me saying they also have the same problem. It's just a matter of finding out what causes it. I guess your case is different. Maybe you're lucky, don't know. xD
Anyway, this looks like a nice script so I hope someone figures out what causes it.
 Sorry, I guess I could have worded that better. I didn't mean the issue itself is a coincidence. I just meant that I think the timing (random font stops working at the time you hit the reorder button, or choosing one random font at the beginning of a review session and sticking with it) is coincidental. When you use the reorder script, it must be triggering an interaction with something else (something that you and the other person reporting this issue have in common that I don't) and making it appear to be purely a clash with the reorder script.

I hope a solution to this issue is discovered for you so that you can enjoy using both scripts together.
1 Like
busaninja said... Sorry, I guess I could have worded that better. I didn't mean the issue itself is a coincidence. I just meant that I think the timing (random font stops working at the time you hit the reorder button, or choosing one random font at the beginning of a review session and sticking with it) is coincidental. When you use the reorder script, it must be triggering an interaction with something else (something that you and the other person reporting this issue have in common that I don't) and making it appear to be purely a clash with the reorder script.

I hope a solution to this issue is discovered for you so that you can enjoy using both scripts together.
 Oh, my bad, I misunderstood.
Yeah, I hope so too, cause this is something that is very useful. I've considered already dropping the use of the reorder script for a while as I think in the long run a script like this will actually benefit my reading skills, and the use of the reorder script is solely for convenience. (I'm used to having it now, but I guess I can get used to not having it again too)

This is awesome, thank you!

Maybe it’s because of the version of Ultimate Reorder Script? I use version no. 2.

Haven’t tested it yet, but good job anyway. The random font script needed an update.

Seems to work with reorder script for me (I’m using reorder ultimate 2 beta). Actually haven’t used the reorder functionality in a while, but presser reorder for you guys today, but the font changer was still working :slight_smile:

Oh and this killed me today:

After looking at the solution, I could see the similarities and different parts… But at first I could only see scribbles (and didn’t even notice the mountain on top :S)

That’s weird then… Gotta put it under the loop I guess.

edit. I seems not to work with Single Mode enabled. 

Works just as advertised.
Thanks a bunch :slight_smile:

It works great!

Would it be possible to add a keyboard shortcut to revert to the default font? Something like having it display the default font when you hold down Control or similar?

Jitai is now version 1.1.0! Here’s what’s changed in the new version:

  • Hover after answering to see the random font again, so you can compare!
  • Fixed a couple of OS X fonts (Hannotate and HanziPen), and added Kaiti TC.
  • Refactored to a more object-oriented approach - unless you wanted to mod Jitai, this doesn’t really matter, haha.

wawhite said…
So could you inverse the mouse over function in the post-submission screen?
EskimoJo said…
Good idea, especially for things you get wrong. You might want to see why.
Now that I’ve implemented this feature, I really (本~~当に!) want to know what you all think of it. Does it feel weird? Unnatural? Or does it fit in nicely? And is it a feature you feel helps you? Y’know, if I want it to keep being “the font randomizer that fits”, I gotta make sure it feels right. Lemme know what you think!

Acutally Hannotate and HanziPen are Chinese not Japanese fonts, so certain characters will look differently. If one want Japanese characters to render properly they should be removed and other Chinese ones likewise.

1 Like
jaearess said..Would it be possible to add a keyboard shortcut to revert to the default font? Something like having it display the default font when you hold down Control or similar?
 It's definitely possible. However, I don't think it'd be a good idea to implement, for two reasons: 1) There's no obvious key for it - control? Maybe, but feels a bit odd. Shift? Too much of a normal key. Alt? Nope, opens the browser menu. Way more importantly, though, 2) showing the default font isn't something you're meant to do a lot. If you find yourself using the hover often enough that you'd want a keyboard shortcut, you might as well not be using Jitai, since then you're still just reading the normal font.

After all, it's meant to be a bit harder, so you can learn to read the harder stuff. 😁
embe said... Acutally Hannotate and HanziPen are Chinese not Japanese fonts, so certain characters will look differently. If one want Japanese characters to render properly they should be removed and other Chinese ones likewise.
Whoops. You're actually right about that. I thought I had done my research and made sure the "TC" fonts worked properly in tags with the lang="ja" attribute, but no. I was looking at the box in 骨 to see if they worked for Japanese, but I now realize traditional Chinese has the box there too, and that there are other misleading differences in other characters.

Bumped the version to 1.1.1 and fixed that! Jitai will no longer use Chinese fonts. I also fixed using Yu Gothic on OS X - some versions of OS X have Yu Gothic installed under the name of "YuGothic" (missing the space).
1 Like

Just had a missing character in a font show up as a little cube, so it didn’t detect it as missing somehow. Font: AiharaHudemojiKaisho. Kanji character: Wisteria

Basvdelsen said... Just had a missing character in a font show up as a little cube, so it didn't detect it as missing somehow. Font: AiharaHudemojiKaisho. Kanji character: Wisteria

 Yup, I know about the AiharaHudemojiKaisho problem. I removed it from the font list... before the initial release, I think? Yeah. Before release. I initially had it in during development.

AiharaHudemojiKaisho represents glyphs it doesn't have with little boxes, which means it technically has those glyphs. The way Jitai checks if a font has a glyph is it writes it out and compares it to a blank slate. If they're the same, that emans the glyph doesn't exist, and the font is ignored. AiharaHudemojiKaisho doesn't leave the slate blank, though.

I guess it would be possible to add a special case for AiharaHudemojiKaisho specifically, but that seems kinda dumb. I think I'm just okay with not completely supporting that one font, especially seeing as it's not part of the font Jitai uses without modification.

And an idea, it would be cool if you could switch to another font each time you hover over and off it and it show the original font when click-and-hold-ing on it. 

It’s insane how much this changes reviews. Not only in the inteded way of it being hard to distinguish different fonts, but it has an added effect. It changes things enough where even if I recognize the kanji right away, my autopilot is totally switched off, to the point where my reviews are taking like three to four times as long right now. Which is time consuming to say the least. But in the long run, I feel like this will actually make them stick a lot better because I have to seriously think every time I do reviews with this it seems like. 

1 Like
obskyr said...
Basvdelsen said... Just had a missing character in a font show up as a little cube, so it didn't detect it as missing somehow. Font: AiharaHudemojiKaisho. Kanji character: Wisteria

 Yup, I know about the AiharaHudemojiKaisho problem. I removed it from the font list... before the initial release, I think? Yeah. Before release. I initially had it in during development.

AiharaHudemojiKaisho represents glyphs it doesn't have with little boxes, which means it technically has those glyphs. The way Jitai checks if a font has a glyph is it writes it out and compares it to a blank slate. If they're the same, that emans the glyph doesn't exist, and the font is ignored. AiharaHudemojiKaisho doesn't leave the slate blank, though.

I guess it would be possible to add a special case for AiharaHudemojiKaisho specifically, but that seems kinda dumb. I think I'm just okay with not completely supporting that one font, especially seeing as it's not part of the font Jitai uses without modification.
 Aww, but that's a pretty font
Basvdelsen said... And an idea, it would be cool if you could switch to another font each time you hover over and off it and it show the original font when click-and-hold-ing on it. 
 That sounds super confusing!
South said... It's insane how much this changes reviews. Not only in the inteded way of it being hard to distinguish different fonts, but it has an added effect. It changes things enough where even if I recognize the kanji right away, my autopilot is totally switched off, to the point where my reviews are taking like three to four times as long right now. Which is time consuming to say the least. But in the long run, I feel like this will actually make them stick a lot better because I have to seriously think every time I do reviews with this it seems like. 
This sounds great! I've also been having trouble with recognizing kanji in the wild, which was really off-putting and lowered my self-esteem.