LinuxForum.Fans
Тема

Растянутый шрифт

Автор: riso 12 сообщений 8032 просмотров
#208175

Не могу понять почему многие шрифты из установленных плохо или не правильно отображаются в urxvt.

Есть такие настройки dejavu sans medium и получаю такой результат:


И вообще почти все шрифты кроме терминуса отображаються коряво.
В чем может быть причина ?

#209069

ttf-droid вам в помощь.
(btw: В консольке ставьте Mono шрифты)
(btw2:Красивее Ubuntu Mono - пока что не видел шрифта для консоли)
:lol:

#209072

ага, понял уже что нужно mono ставить ) Спасибо за ubuntu mono

#209091

terminus в консоли хорош.

#209101

Не спорю, юзал его года 2, после чего надоело. Зато с ним нет проблем со сглаживанием.

#218828

Теперь проблема вылезла в gentoo, установил оверлэй lcd-filtering, шрифт в консоли стал растянутым, использую dejavu sans mono.
.Xdefaults

text
Xft.antialias:  1
Xft.autohint:   0  
Xft.dpi:        96  
Xft.hinting:    1  
Xft.hintstyle:  hintfull  
Xft.lcdfilter:  lcddefault  
Xft.rgba:       rgb
Rxvt*font: xft: dejavu sans mono:size=8

xdpyinfo |grep resolution

text
resolution:    96x96 dots per inch
#218864

У меня cleartype-пакеты cairo, libXft и fontconfig в арче.

.Xdefaults

Показать
text
! Normal
! color0    BLACK
! color1    red
! color2    green
! color3    yellow
! color4    blue (синий)
! color5    purple (фиолетовый)
! color6    cyan (голубой)
! color7    white

urxvt*color0: #000000 urxvt*color1: #C00000 urxvt*color2: #00C000 urxvt*color3: #C0C000 urxvt*color4: #0C00C0 urxvt*color5: #AA00AA urxvt*color6: #00AAAA urxvt*color7: #FFFFFF

! Light ! color8 darkgray ! color9 red ! color10 green ! color11 yellow ! color12 blue (синий) ! color13 purple (фиолетовый) ! color14 cyan (голубой) ! color15 lightgray

urxvt*color8: #212121 urxvt*color9: #FF8080 urxvt*color10: #80FF80 urxvt*color11: #FFFF88 urxvt*color12: #99CCFF urxvt*color13: #B14CC2 urxvt*color14: #9BFFFF urxvt*color15: #D0D0D0

URxvt*scrollBar: false

URxvt*perl-ext: tabbed URxvt.font: xft:Droid Sans Mono:pixelsize=13 URxvt.boldFont: xft:Droid Sans Mono:pixelsize=13 URxvt*saveLines: 3200

URxvt*background: #212121 URxvt*foreground: #C0C0C0

URxvt.tabbed.tab-bg: 4

URxvt.tabbed.new-button: no URxvt.tabbed.tabbar-fg: 15 URxvt.tabbed.tabbar-bg: 8 URxvt.tabbed.tab-fg: 8 URxvt.tabbed.tab-bg: 2

Шрифт Droid Sans.

Вот как выглядит:

#218866

а у меня так выглядит dejavu sans mono:size=9

Пробовал droid sans mono - результат тот же. Когда arch стоял проблем не наблюдал.

#220158

Проблема оказывается в самом rxvt-unicode, у них в faq описана:

Показать

Why does rxvt-unicode sometimes leave pixel droppings?

Most fonts were not designed for terminal use, which means that character size varies a lot. A font that is otherwise fine for terminal use might contain some characters that are simply too wide. Rxvt-unicode will avoid these characters. For characters that are just "a bit" too wide a special "careful" rendering mode is used that redraws adjacent characters.

All of this requires that fonts do not lie about character sizes, however: Xft fonts often draw glyphs larger than their acclaimed bounding box, and rxvt-unicode has no way of detecting this (the correct way is to ask for the character bounding box, which unfortunately is wrong in these cases).

It's not clear (to me at least), whether this is a bug in Xft, freetype, or the respective font. If you encounter this problem you might try using the -lsp option to give the font more height. If that doesn't work, you might be forced to use a different font.

All of this is not a problem when using X11 core fonts, as their bounding box data is correct.

Решения есть - патч. Поэтому этой проблемы и нет в archlinux, глянул PKGBUILD , патч накладывается. Называется патч font-width-fix.patch. Где найти, пока не гуглил.

#220164

riso, арчик юзер-френдли однако, но именно там, где это не лишне :)

#220168

ага, но меня в арче напрягает всего одна вещь, многие пакеты из aur устарели, то закачка не доступна, сайт лежит, то версия на сайте новая, а pkgbuild еще не обновлен. Все это мелочи, но из них складывается впечатление.

#220169

riso, встречался с этим, но очень редко.
А в генто мне не нравится, что иногда пакеты даже фундаментальные не собираются и пол дня на поиск решения проблемы тратишь... Ну, каждому свое wink

Войдите или зарегистрируйтесь, чтобы ответить.