Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Wide symbols in Kate

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
tkzv
Tux's lil' helper
Tux's lil' helper
Posts: 123
Joined: Fri Aug 22, 2014 6:56 pm

Wide symbols in Kate

  • Quote

Post by tkzv » Sun Mar 01, 2026 6:10 pm

Is there any way to make all symbols in Kate strictly either single or double width? Right now, European:CJK width ratio is something like 3:5, and I'd like 1:2, like in Konsole.

I was told that this may be possible with a specific CJK font, but he didn't know if such font exist. Is there one?
Top
tkzv
Tux's lil' helper
Tux's lil' helper
Posts: 123
Joined: Fri Aug 22, 2014 6:56 pm

Re: Wide symbols in Kate

  • Quote

Post by tkzv » Sun Apr 05, 2026 12:22 am

Kate is set to use "Monospace" font. Which package is that?

How do I find, which fonts Kate uses for Japanese symbols?

I got the impression, that Kate uses different fonts for digits in lines "秋23456789" and "あ23456789". Or even different digits left and right of "a" in "あ123a123". How do I check that?

After changing settings in "eselect fontconfig" how do I apply changes?
Do I need "fc-cache -fv" ?
Is it enough to restart Kate?
"kwin_x11 --replace" ?
Exit X Window and start it again?
Top
flexibeast
l33t
l33t
Posts: 682
Joined: Mon Apr 04, 2022 4:15 am
Location: Naarm/Melbourne, Australia
Contact:
Contact flexibeast
Website

Re: Wide symbols in Kate

  • Quote

Post by flexibeast » Sun Apr 05, 2026 12:58 am

tkzv wrote: Sun Apr 05, 2026 12:22 am Kate is set to use "Monospace" font. Which package is that?

How do I find, which fonts Kate uses for Japanese symbols?
Assuming Kate does indeed use Fontconfig (which it probably does, check the output of `ldd /usr/bin/kate | grep fontconfig`) the wiki's "Fontconfig" page has information about this, some of which i describe below.

"Monospace" in this context is not a particular package, but the first appropriate result returned by Fontconfig when Kate asks for a monospace font. This can be checked by asking Fontconfig directly, via fc-match(1):

Code: Select all

fc-match -s 'mono' | head -n1
The `-s` option sorts the output from 'best' to 'worst' match.

Then, to find which font will be returned in the context of Japanese, add `lang` to the query:

Code: Select all

fc-match -s 'mono:lang=jp' | head -n1
Remove `| head -n1` from both commands to list all fonts that match.
https://wiki.gentoo.org/wiki/User:Flexibeast
My most recent wiki contributions
Top
tkzv
Tux's lil' helper
Tux's lil' helper
Posts: 123
Joined: Fri Aug 22, 2014 6:56 pm

Re: Wide symbols in Kate

  • Quote

Post by tkzv » Sun Apr 05, 2026 2:02 am

flexibeast wrote: Sun Apr 05, 2026 12:58 am ldd /usr/bin/kate | grep fontconfig
Thanks, it does use fontconfig :)
flexibeast wrote: Sun Apr 05, 2026 12:58 am

Code: Select all

fc-match -s 'mono' | head -n1
The `-s` option sorts the output from 'best' to 'worst' match.

Code: Select all

fc-match -s 'mono:lang=jp' | head -n1
The "best" for both queries is `DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"` It has no hieroglyphs.
How does this best-to-worst-matching work? Do programs scan this list and use the first font that has the required symbol? If yes, the topmost with CJK is `wqy-zenhei.ttc: "WenQuanYi Zen Hei Mono" "Regular"`

Somehow, it appears in Kate's font selection dialog only when "Show only monospaced fonts" is unchecked. Bug?

But yes, it seems that the line "あ23456789" uses digits from "WenQuanYi Zen Hei Mono" and the line "秋23456789" uses digits from "DejaVu Sans Mono".
The line "あ234f6789" uses WenQuanYi for "234" and DejaVu for "6789".

At least one question sorted out. Thanks.
But how does Kate pick them?
Does it assume that every symbol after Japanese-exclusive "あ" is also Japanese until it encounters end-of-line or a European letter? Can I disable this behavior?
And why does it behave correctly when I use "Droid" font instead of "Monospace"?

Could you answer several more Fontconfig questions?

I disabled all 3 DejaVu configs in "eselect fontconfig" and refreshed the cache. What should be the result? I still get DejaVu on top of fontconfig queries.

I've got several CJK fonts. How do I set the preferred one? With something like

Code: Select all

<test name="lang">
            <string>ja</string>
</test>
<prefer>
                        <family>WenQuanYi Zen Hei Mono</family>
</prefer>
in ~/.config/fontconfig/fonts.conf ?

Is it possible to use fontconfig to set double symbol width e.g. when "WenQuanYi Zen Hei Mono" supplies symbols missing in "Droid Sans Mono Dotted"? Preferrably, by increasing spacing between symbols rather than stretching them.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic