M+font renders Japanese characters as overlapping
I use the m+fonts for most of my stuff since I have a lot of my entertainment in Japanese as well as English - a unified font that displays both in a manner that looks good is pretty much a must. I found m+fonts a while back, which fulfils the purpose with the fonts "M+ 1mn", "M+ 1m" and "M+ 2m" (all of which produce the same bug). At some point though, it bugged out - I discovered this fairly recently when I fired up a song with a Japanese collaberator on MPD and polybar displayed this. Twitter (The browser being Firefox Nightly) had also had the bug for a while, but I had assumed it was on their end since websites usually choose their own fonts - and I don't use twitter enough that I actually cared to look into it.
The bug is not on the fonts side, my terminal handles it well enough. This bug is not on Xorg's side either, I can reproduce it under sway. Unfortunately I have no real knowledge of when this started happening - all I know is that it did work at one point, and now it doesn't any more. Using one of the fonts that doesn't have mixed width isn't a possibility, since that makes English text way wider than is reasonable.
I appreciate any help, or any pointers towards how I might troubleshoot this issue.
EDIT: I have of course attempted reinstalling the font a couple of times. No dice.
About this post
- Posted
- Archived
- Score
- 3 · 100% up
- Kind
- Gallery · 2 files
- ID
- ixlghv
4 comments
Do you still get the overlap if you set the font size larger in polybar? I.e. do they remain overlapped but large, or space themselves with increasing font size?
No appreciable difference. It got a bit more spaced out maybe? But this is fontsize multiplied by 10 (hence why it's cut off) and it still doesn't work properly.
I looked at your screenshot. This looks to me like the software you are using just can't deal with "double-width" characters in a mono-spaced font. You should go and check the software's bug tracker.
EDIT:
Here's a blog post that shows how to control the fall-back behavior for the fontconfig system:
https://eev.ee/blog/2015/05/20/i-stared-into-the-fontconfig-and-the-fontconfig-stared-back-at-me/
Maybe experiment with that. You might be able to go back to using a font without CJK characters for English if you can get control over the fallback behavior for the missing CJK characters.
The same bug exists in firefox. This seems to be a rendering issue in something shared between firefox and polybar - I have no idea what that could be though. And I think it would've gotten noticed and fixed long ago if firefox couldn't handle doublewidth at all.