You are not logged in.

#1 2016-10-11 00:44:33

Flat
Member
Registered: 2016-05-30
Posts: 18

[Solved] Noto Sans Mono (CJK JP) in URxvt

For some reason when I try to use Noto Sans Mono or Noto Sans Mono CJK JP in URxvt as the font it falls back to the default hugely spaced font. I've tried other fonts that work fine and made sure to use the name from fc-list. Is there something else I'm missing?


.xresources:

URxvt.font: xft:Noto Sans Mono CJK JP:pixelsize=16:antialias=true:hinting=true,xft:Source Code Pro for Powerline:pixelsize=16:antialias=true:hinting=true,xft:IPAGothic:pixelsize=16:antialias=true:hinting=true

! do not scroll with output
URxvt*scrollTtyOutput: false

! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
URxvt*scrollWithBuffer: true

! scroll back to the bottom on keypress
URxvt*scrollTtyKeypress: true
URxvt.perl-ext-common: default,matcher
URxvt.url-launcher: /usr/bin/xdg-open
URxvt.matcher.button: 1
urxvt*depth: 32
urxvt*background: rgba:0000/0000/0200/c200
URxvt*scrollBar:false
URxvt.geometry: 106x25

$ fc-list | grep "Noto Sans Mono CJK JP"

/usr/share/fonts/OTF/NotoSansMonoCJKjp-Regular.otf: Noto Sans Mono CJK JP,Noto Sans Mono CJK JP Regular:style=Regular
/usr/share/fonts/OTF/NotoSansMonoCJKjp-Bold.otf: Noto Sans Mono CJK JP,Noto Sans Mono CJK JP Bold:style=Bold,Regular

Last edited by Flat (2016-10-12 02:23:40)


(´ω)

Offline

#2 2016-10-11 07:35:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: [Solved] Noto Sans Mono (CJK JP) in URxvt

What if you default to "Noto Mono" and only used the CJK variant as fallback (I don't know whether latter contains latin glyphs. You'll have to try whether you can get all desired glyphs on your side ;-)

Offline

#3 2016-10-11 13:39:09

Flat
Member
Registered: 2016-05-30
Posts: 18

Re: [Solved] Noto Sans Mono (CJK JP) in URxvt

The problem isn't that specifically I don't have the CJK glyphs (Although the CJK does indeed contain all latin characters as well) It's that no noto font loads e.g. Noto Sans, Noto Sans Mono, Noto Mono. No combination of the word Noto with it's variants or Noto alone will get URxvt to load the correct font.


(´ω)

Offline

#4 2016-10-11 13:56:14

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: [Solved] Noto Sans Mono (CJK JP) in URxvt

try

strace urxvt 2>&1 | grep -i noto

and see whether it tries (and fails) to open the font file.

sudo fc-cache -fs

or

sudo fc-cache -rs

will (really) forcefully rebuild the fc cache. maybe worth a shot.

Offline

#5 2016-10-11 14:18:48

Flat
Member
Registered: 2016-05-30
Posts: 18

Re: [Solved] Noto Sans Mono (CJK JP) in URxvt

Looks like it was loading the "Noto Sans" font no matter what. So I looked at fc-match and even "Noto Sans Mono" returns just "Noto Sans" so I made an alias for Noto Sans Mono CJK JP as the highest priority for monospace, however URxvt displays the characters with about a full character space in-between. nwanux.png is there a less hacky way to fix this other than

URxvt.letterSpace: -3
strace urxvt 2>&1 | grep -i noto
stat("/usr/share/fonts/noto", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/share/fonts/noto", O_RDONLY|O_CLOEXEC) = 7
open("/usr/share/fonts/OTF/NotoSansMonoCJKjp-Regular.otf", O_RDONLY) = 7
open("/usr/share/fonts/OTF/NotoSansMonoCJKjp-Bold.otf", O_RDONLY) = 8

(´ω)

Offline

#6 2016-10-11 14:28:34

frostschutz
Member
Registered: 2013-11-15
Posts: 1,637

Re: [Solved] Noto Sans Mono (CJK JP) in URxvt

I don't know the noto font and haven't touched this in years. Have you tried changing your font order?

URxvt*font:	-Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1,\
		-Misc-Fixed-Medium-R-Normal-ja-18-120-100-100-C-180-ISO10646-1,\
		xft:Bitstream Cyberbit:pixelsize=18

dd5mt4fmnz9yoh23q.png

Last edited by frostschutz (2016-10-11 14:31:25)

Offline

#7 2016-10-11 20:41:21

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: [Solved] Noto Sans Mono (CJK JP) in URxvt

https://wiki.archlinux.org/index.php/Rx … nt_spacing
I'm afraid "URxvt.letterSpace" is a pretty common statement :-(

Offline

#8 2016-10-12 02:22:50

Flat
Member
Registered: 2016-05-30
Posts: 18

Re: [Solved] Noto Sans Mono (CJK JP) in URxvt

Unfortunately using negative letter spacing doesn't look quite right in powerline (It smashes arrows into squares) due to different fonts/glyphs. Back to using Iosevka. I suppose this is solved as its going to get. Appreciate all the assistance!


(´ω)

Offline

Board footer

Powered by FluxBB