Feature Request: Separate font settings for specific Unicode ranges
Issue
I was helping out a friend (Japanese) patch Source Code Pro to include the M+ font, AND powerline/nerd fonts. It was pretty tedious. He explained that he wanted to do this because iTerm scrolls poorly if he uses a standard font without Japanese glyphs. I assume this was because the OS was selecting a font that could display the glyphs for each character. I pointed out the non-ASCII text option. It works well enough for his performance issue, but it made me think that font patching is ridiculous considering the fact that we have pretty well defined unicode ranges now.
Proposal
It would be nice to have separate font settings for Global
, East Asian Text
, Private Use Area
, and non-ASCII
.
-
Global
would be the default font. Since programming is done in English, this may be preferred even if there's a language-specific font (which was the case for my friend). -
East Asian Text
would be for Japanese, Chinese, or Korean text. -
Private Use Area
would basically be the Dingbats type fonts. Nerd font uses the PUA for adding those glyphs. This would be useful for removing the need to have specially patched fonts. -
non-ASCII
would be the catch-all and backwards compatible option.
Proof of concept
This is a patch to show where unicode ranges can be targeted: 0001-Force-font-selection-for-Japanese-glyphs.patch
The patch hard codes a font for the Kanji unicode ranges as a proof-of-concept.
Here is a video to demonstrate the performance difference (16MB): https://share.esdf.io/mAxwDGSo0k/
The left window is the current nightly version of iTerm2 and the right window is the patched version. I'm using a free-spinning mousewheel to scroll the contents. Halfway through the video, I spin the wheel and move the mouse to the other window to show the difference in the scrolling while letting the wheel spin.