Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
urxvt ugly font rendering with some languages
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 644
Location: Ásgarðr

PostPosted: Sat Jul 20, 2024 2:00 pm    Post subject: urxvt ugly font rendering with some languages Reply with quote

Hello,
With xfce4-terminal & DejaVu Sans Mono, fonts looks great but not with urxvt.
The fonts are really badly rendered with some languages (korean, japanese, chinese, thai, hebrew)

Example currently with Korean (worse with Japanese and complex kanji, unless I raise the pixelsize, which is not really practical with the 1280x800 display) & ncmpcpp (music player)
https://img98.pixhost.to/images/292/495938373_ncmpcpp.png

~/.Xresources

Code:
URxvt.font:           xft:DejaVu Sans Mono:pixelsize=16
URxvt.boldFont:       xft:DejaVu Sans Mono:bold:pixelsize=16
!URxvt.font:          xft:Monospace:pixelsize=16
!URxvt.boldFont:      xft:Monospace:bold:pixelsize=16


I also tried with Monospace by the way but it is also bad.
I know the DejaVu Sans Mono font is good since the font are correctly rendered with the tint2 panel or with file manager (spacefm or thunar), or other terms like xterm.

Code:
Installed versions:  9.31-r3(11:38:16 29/06/2024)(256-color blink fading-colors font-styles gdk-pixbuf mousewheel perl startup-notification xft -24-bit-color -iso14755 -unicode3 -wide-glyphs)


Any tip ? Thanks


Last edited by sdauth on Sat Jul 20, 2024 5:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Sat Jul 20, 2024 2:14 pm    Post subject: Reply with quote

When I used to run X and urxvt

Code:
urxvt*font:  xft:dejavusansmono:size=14,\
             xft:dejavusansmono:style=Bold:size=14,\
             [codeset=JISX0208]xft:Kochi Gothic:antialias=false,\
             xft:Code2000:antialias=false

_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 644
Location: Ásgarðr

PostPosted: Sat Jul 20, 2024 2:49 pm    Post subject: Reply with quote

Thanks Anon-E-moose. I didn't know it was possible to adjust fonts depending on codeset. I don't have kochi font installed so i'll try later. (this is my laptop and I pull the packages from my desktop...)
Otherwise, with Monospace, plain xterm has no issue rendering those languages correctly.

Code:
xterm*faceName:           Monospace:style=Regular
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6145
Location: Dallas area

PostPosted: Sat Jul 20, 2024 3:21 pm    Post subject: Reply with quote

You can also adjust antialias, which does sometimes cause problems.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
sdauth
l33t
l33t


Joined: 19 Sep 2018
Posts: 644
Location: Ásgarðr

PostPosted: Sat Jul 20, 2024 5:52 pm    Post subject: Reply with quote

Anon-E-moose wrote:
You can also adjust antialias, which does sometimes cause problems.


So I tried with your config block (kochi) + also made a test with antialias for DejaVu Sans Mono, it doesn't improve much.
For example, with xfce4-terminal to see the difference : https://img98.pixhost.to/images/296/496035791_xfce_ncmpcpp.png

Also, my full .Xresources config, I have not modified it for years.

Code:
Xft.dpi:  100

*background:     rgb:10/10/10

!black
*color0:         rgb:20/20/20
*color8:         rgb:75/77/73
!red
*color1:         rgb:CC/00/00 
*color9:         rgb:ef/29/29
!green
*color2:         rgb:4e/9a/06
*color10:        rgb:8a/e2/34
!brown/yellow
*color3:         rgb:c4/a0/00
*color11:        rgb:fc/e9/4f
!blue
*color4:         rgb:34/65/a4
*color12:        rgb:72/9f/cf
!magenta
*color5:         rgb:75/50/7b
*color13:        rgb:ad/7f/a8
!cyan
*color6:         rgb:06/98/9a
*color14:        rgb:34/e2/e2
!white
*color7:         rgb:d3/d7/cf
*color15:        rgb:ee/ee/ec

! == xterm ==
XTerm*geometry:           130x35
XTerm*termName:           xterm-256color
xterm*faceName:           Monospace:style=Regular
xterm*faceSize:           12
xterm*dynamiccolors:      true
xterm*utf8:               2
xterm*visualBell:         off
xterm*highlightSelection: true
xterm*toolBar:            false
xterm*background:         black
xterm*foreground:         white
xterm*colorMode:          on
xterm*activeIcon:         true
xterm*cursorColor:        white
Xterm*multiScroll:        on
Xterm*jumpScroll:         on
xterm*scrollBar:          false
xterm*saveLines:          5000
XTerm*charClass:          33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
XTerm*on3Clicks:          regex ([[:alpha:]]+://)?([[:alnum:]!#+,./=?@_~-]|(%[[:xdigit:]][[:xdigit:]]))+

xfontsel*geometry:            700x450


! == URxvt ==
URxvt.geometry:       132x32
URxvt.termName:       rxvt-unicode-256color
URxvt*buffered:       false
URxvt.inheritPixmap:  false
URxvt.imLocale:       fr_FR.UTF-8
URxvt.scrollBar:      false
URxvt.scrollstyle:    plain
URxvt.saveLines:      20000
URxvt.cursorBlink:    false
URxvt.fading:         25%
URxvt*externalBorder: 8
URxvt*internalBorder: 8
URxvt.borderLess:     false
URxvt.lineSpace:      1
URxvt*hold:           false

URxvt.depth:          32
URxvt.background:     [78]#000000
URxvt.foreground:     grey80
URxvt.tintColor:      #262626


URxvt.font:           xft:DejaVu Sans Mono:pixelsize=16
URxvt.boldFont:       xft:DejaVu Sans Mono:bold:pixelsize=16

! Extensions
URxvt*perl-lib:         /usr/lib64/urxvt/perl/
URxvt.perl-ext-common:  default,clipboard,keyboard-select,tabbedex,matcher

!https://github.com/muennich/urxvt-perls/tree/master/deprecated
URxvt.colorUL:          #87afd7

! clipboard
URxvt.clipboard.autocopy:         true
URxvt.keysym.M-c: perl:clipboard: copy
URxvt.keysym.M-v: perl:clipboard: paste

! keyboard-select
URxvt.keysym.M-Escape:          perl:keyboard-select:activate
URxvt.keysym.M-s:               perl:keyboard-select:search

! matcher (add matcher)
! clickable url
URxvt.url-launcher:             /usr/bin/xdg-open
URxvt.matcher.button:           1

! tabbed
! set autohide to false to prevent window shrinking
URxvt.tabbedex.autohide:        false
URxvt.tabbedex.reopen-on-close: no
URxvt.tabbedex.new-button:      false
!! colors
URxvt.tabbedex.tabbar-fg: 2
URxvt.tabbedex.tabbar-bg: 0
URxvt.tabbedex.tab-fg:    3
URxvt.tabbedex.tab-bg:    0
!! keysym
!! tabbedex (add tabbeded)
!URxvt.keysym.Control-t:            perl:tabbedex:new_tab
URxvt.keysym.Control-Shift-T:       perl:tabbedex:new_tab
!URxvt.keysym.Control-d:            perl:tabbedex:kill_tab
URxvt.keysym.Control-Shift-W:       perl:tabbedex:kill_tab
URxvt.keysym.Control-Tab:           perl:tabbedex:next_tab
URxvt.keysym.Control-Shift-Tab:     perl:tabbedex:prev_tab
URxvt.keysym.Control-Shift-Left:    perl:tabbedex:move_tab_left
URxvt.keysym.Control-Shift-Right:   perl:tabbedex:move_tab_right
URxvt.keysym.Control-Shift-R:       perl:tabbedex:rename_tab
URxvt.tabbedex.no-tabbedex-keys:    true

! By default, when shell output appears the scrollback view
! will automatically jump to the bottom of the buffer to display new output.
! If in cases where you want to see previous output (e.g., compiler messages),
! set the following options :
! 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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum