You are not logged in.

#1 2020-11-26 09:55:07

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Fonts look bad in old programs (like DDD)

Hi,

I am using Data Display Debugger (DDD) and the fonts look terrible/bad, this is also evident in `xfontsel`: https://i.imgur.com/wcjImbe.png

Both of them use the "X Logical Font Description" system. I am not sure what X configuration that I need to modify to make them look better. I have DejaVu, Luxi and Hack fonts installed, but none of them look good (they all have the similar staggered outline around the characters).

What should I do to improve the situation? Thanks for the help in advance!

Last edited by TheDcoder (2020-11-28 06:43:55)

Offline

#2 2020-11-28 06:59:23

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Fonts look bad in old programs (like DDD)

I did some more investigation and I discovered that if I turn off anti-aliasing from my appearance settings (I use Xfce), even the modern programs render jagged fonts like the old programs, so I think DDD and xfontsel aren't using anti-aliasing for fonts.

Does anyone know how to enable anti-aliasing for them?

Offline

#3 2020-11-28 07:45:30

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: Fonts look bad in old programs (like DDD)

https://wiki.archlinux.org/index.php/fo … ig_support
https://sourceforge.net/p/cdesktopenv/w … tsWithXFT/

…
*renderTable: xft
*xft*fontType: FONT_IS_XFT
*xft*fontName: Sans
*xft*fontSize: 8

Xft.dpi: 96
Xft.autohint: true
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintslight
Xft.hinting: true
Xft.antialias: true
Xft.rgba: rgb
…

No guarantee for specific motif clients, though. Notably if they're binary only, statically linked against some motif version.
Also this will NOT apply to xfontsel (is libXaw, not motif)

Edit: "their're", brain finger disconnection detected.

Last edited by seth (2020-11-28 13:52:59)

Offline

#4 2020-11-28 13:50:57

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Fonts look bad in old programs (like DDD)

@seth Wow! Those config resources did wonders and made the text look decent and modern, with smooth curves! One small issue though, the DPI of 96 produces HUGE text, a small snippet is enough to cover the entire screen... and I tried several different DPI values but "8" seems to be the most reasonable producing text at normal proportions, what's the reason behind this? My monitor's actual DPI is quite close to 96.

Minor edit: I originally used the value of 6 for ideal DPI but it is actually 8. Six is a bit on the smaller side and ten is a bit bigger than normal.

Last edited by TheDcoder (2020-11-28 20:14:19)

Offline

#5 2020-11-28 13:53:31

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: Fonts look bad in old programs (like DDD)

What's the output of "xrandr -q"?

Offline

#6 2020-11-28 20:10:22

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Fonts look bad in old programs (like DDD)

seth wrote:

What's the output of "xrandr -q"?

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  59.97    59.96    59.93  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+  50.00    59.94    59.99  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1366x768      59.79  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    66.67    60.00    59.94  
   720x400       70.08  

eDP-1 is the inbuilt display of my laptop and HDMI-1 is the 24" external monitor that I use.

Offline

#7 2020-11-28 22:06:20

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: Fonts look bad in old programs (like DDD)

Nothing suspicious (notably xwayland or bad dimensions) there, but the dualscreen might throw the logical DPI off.
What's the output of "xdpyinfo | grep resolution"?

Offline

#8 2020-11-28 22:09:40

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Fonts look bad in old programs (like DDD)

seth wrote:

What's the output of "xdpyinfo | grep resolution"?

It's 96x96 dots per inch.

seth wrote:

but the dualscreen might throw the logical DPI off.

I see, I am not really using both screens, I have configured the laptop's display to turn off when the external monitor is connected.

Offline

#9 2020-11-28 22:23:27

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: Fonts look bad in old programs (like DDD)

Well, the logical resolution seems ok as well.

Do you use either gnome or KDE?
Did you check that the database ends up w/ the intended value?

xrdb -q | grep -i xft

Offline

#10 2020-11-30 10:02:06

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Fonts look bad in old programs (like DDD)

seth wrote:

Do you use either gnome or KDE?

I use the Xfce desktop environment so I guess Gnome, but I do have some Qt/KDE applications installed.

seth wrote:

Did you check that the database ends up w/ the intended value?

No, but I checked now and the values look okay:

TheDcoder@arch ~> xrdb -q | grep -i xft
Xft.antialias:	1
Xft.hintstyle:	hintfull
Xft.rgba:	rgb
TheDcoder@arch ~> xrdb -override /tmp/.goodFontResources
TheDcoder@arch ~> xrdb -q | grep -i xft
Xft.antialias:	true
Xft.hintstyle:	hintslight
Xft.rgba:	rgb
*renderTable:	xft
*xft*fontType:	FONT_IS_XFT
*xft*fontName:	Sans
*xft*fontSize:	8
Xft.dpi:	8
Xft.autohint:	true
Xft.lcdfilter:	lcddefault
Xft.hinting:	true

Offline

#11 2020-11-30 15:04:12

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: Fonts look bad in old programs (like DDD)

No, xfce - the idea was that maybe the DE intercepts the rdb update and "fixes" the DPI.
This is certainly odd, but I have no idea why it would be off by a factor of 12 - unless you adjust it in some fontconfig rule?

Edit: or maybe

fc-match Sans

?

Last edited by seth (2020-11-30 15:05:43)

Offline

#12 2021-02-02 22:48:45

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Fonts look bad in old programs (like DDD)

Sorry it took so long for me to respond. I am not sure about the DE, perhaps I can try another DE to see if it fixes that.

seth wrote:

Edit: or maybe

fc-match Sans

?

The result is:

TheDcoder@arch ~> fc-match Sans
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"

Offline

#13 2021-02-03 01:13:05

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Fonts look bad in old programs (like DDD)

seth wrote:

No, xfce - the idea was that maybe the DE intercepts the rdb update and "fixes" the DPI.

I tested this theory by completely bypassing Xfce, I used IceWM and the fonts look exactly the same sad

I also made sure that there wasn't any funny stuff going on in the Xsession wrapper script used by LightDM.

Offline

Board footer

Powered by FluxBB