Is there a way to make double width CJK characters take exactly 2 spaces, like in Konsole?
I’m working with multilingual tables, and I’d rather use Kate than LibreOffice or Vim. The width of Europeah:CJK symbols is 5:3 and it even varies a bit for kana and kanji.
Turns out, my problem is a bit more interesting. When “Monospace” font is selected for Kate:
the font for lines consisting of English letters and numbers like “0123456789” or “abcdefghij” is “DejaVu Sans Mono”,
the font for lines consisting of hieroglyphs (Kanji) or Japanese syllables (Kana) like “秋葉原大阪” or “あきはばら” is “WenQuanYi Zen Hei Mono”,
the font for lines mixing Kanji with digits like “秋23456789” is WenQuanYi for Kanji and DejaVu for digits,
the font for lines where digits follow Kana is WenQuanYi for all, making digits half the width of Kana, but ~3/5 the width of digits and letters in the rest of the file (which is DejaVu),
the font for lines mixing Kana with digits and European letters, like “あ2345f789” is: WenQuanYi for Kana, DejaVu for letters, WenQuanYi for digits/spaces/punctuation after Kana, DejaVu for digits/spaces/punctuation after European letters.
This kind of kills any semblance of monospaced in Kate.
Why does that happen?
And what is “Monospace”, anyway? Is it sort of virtual font that picks the first available constant-width font (according to Fontconfig preferences) that has the required symbol ?
If a real font is selected instead of “Monospace”, the width of digits in “あ2345f789” remains constant at least.
Is varying width of digits for “Monospace” a bug?
On a related note: “WenQuanYi Zen Hei Mono” font only appears in “Select Font” dialog of Kate if “Show only monospaced fonts” is disabled. But it does appear as monospaced when queried by Fontconfig tools: fc-match -s mono Same for most monospaced Noto fonts. Is that a bug in Kate/KDE?
I found no single font, or even a font family, with a uniform single/double widths for hieroglyphs, Kana, Latin, Cyrillic, IPA, punctuation sumultaneously. Is there a way to set up Kate to display Kana and Kanji with exactly double width, like it’s done in Konsole? For example, set up font substitution in Fontconfig so that e.g. when a Japanese symbol is not found in “Droid Sans Mono Dotted”, the character is taken from “Noto Sans Mono CJK JP” with extra letter spacing added?