You are not logged in.

#1 2022-04-26 00:10:56

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Hi

I use fully updated Arch + Gnome on my laptop.
Some options of menus of Subtitle Edit installed from AUR are unreadable because badly rendered fonts.
Subtitle Edit is the only app installed on my laptop affected by this bug.
I have Arch + KDE Plasma installed on my desktop computer and the fonts of Subtitle Edit menus are correctly rendered there.
Please see the screenshots below for comparison.

bug on Gnome
https://i.imgur.com/IqmXRx5.png

ok fonts on KDE Plasma
https://i.imgur.com/V5YL7Qx.png

Subtitle Edit in AUR
https://aur.archlinux.org/packages/subtitleedit

How to fix the fonts on Gnome? Thanks for reading.

Offline

#2 2022-04-26 06:59:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Looks like some DPI issue,
https://wiki.archlinux.org/title/HiDPI# … plications
https://wiki.archlinux.org/title/HiDPI#GDK_3_(GTK_3)
https://wiki.archlinux.org/title/HiDPI#X_Resources

And it'll probably matter whether gnome is on X11 or wayland and subtitleedit is running on Xwayland

Offline

#3 2022-04-26 11:58:24

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Thanks seth. I use Wayland, the bug also occurs on X11. I created this file on my system:

~/.Xresources
Xft.dpi: 96

! These might also be useful depending on your monitor and personal preference:
Xft.autohint: 0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

Restarted Gnome session, but the bug persists on both Wayland and X11.

Last edited by Strangiato (2022-04-26 12:10:01)

Offline

#4 2022-04-26 13:49:14

giannis-arch
Member
Registered: 2017-09-20
Posts: 20

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

I had the same problem with Strangiato (subtitleedit - X11). I have changed  Xft.dpi from 96 to 97.

Offline

#5 2022-04-26 14:52:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

nb. that the mere existence of ~/.Xresources does nothing at all, you still have to merge it into the xrdb.

xrdb -q | grep -i dpi
xrdb -m ~/.Xresources

will merge it.

Offline

#6 2022-04-26 15:41:25

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

seth wrote:

nb. that the mere existence of ~/.Xresources does nothing at all, you still have to merge it into the xrdb.

xrdb -q | grep -i dpi
xrdb -m ~/.Xresources

will merge it.

ran your commands and restarted Gnome session, but the bug persists.

Offline

#7 2022-04-26 15:43:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

The first command is to tell you whether the resource is there and if you restart the session, the second command turned irrelevant.
This is transient data on the X11 server, https://wiki.archlinux.org/title/X_resources

Edit: and I'm not sure whether and how you can get that into xwayland on a wayland session.

Last edited by seth (2022-04-26 15:44:00)

Offline

#8 2022-05-01 12:06:19

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Followed these steps on xorg:

1. changed dpi to 97 in ~/.Xresources file
2. ran 'xrdb -m ~/.Xresources'
2. ran 'xrdb -q | grep -i dpi'. The output was 'Xft.dpi:    97'
3. ran Subtitle Edit without logout

The fonts are still buggy.

Offline

#9 2022-05-01 13:57:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Not sure whether "97" instead of "96" (probably default assumption) is gonna help here.

xrandr -q; xdpyinfo | grep resolution

Offline

#10 2022-05-01 15:08:24

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Tried 97 because post #4 here.

$ xrandr -q; xdpyinfo | grep resolution
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 16384 x 16384
LVDS-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 310mm x 174mm
   1366x768      59.99*+
   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  
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
bash: xdpyinfo: comando não encontrado

Offline

#11 2022-05-01 15:11:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

https://archlinux.org/packages/extra/x8 … -xdpyinfo/

The physical resolution of the display is 112 DPI, so I'd try that - but first check the xdpyinfo.
You can impact that value w/ eg. "xrandr --dpi 112".

Offline

#12 2022-05-01 16:24:25

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

112 dpi fixes the bug, but dpi is reverted to 96 on X11 and Wayland after re-login/reboot.
Removing nocpp argument from /etc/gdm/Xsession file does not help even after reboot.
https://wiki.archlinux.org/title/x_reso … ing_errors

Last edited by Strangiato (2022-05-01 16:35:13)

Offline

#13 2022-05-01 19:29:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,030

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Dependign on how you start X11, https://wiki.archlinux.org/title/Xinit#xserverrc

exec /usr/bin/Xorg -nolisten tcp -dpi 112 "$@" vt$XDG_VTNR

But for GDM/Gnome specifically, I'm not sure there's anything but https://wiki.archlinux.org/title/XDG_Autostart

Offline

#14 2022-05-01 20:41:34

Strangiato
Member
Registered: 2020-01-10
Posts: 521

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

I have created a bash script and a .desktop entry to run it on login. I'm not sure if this is the best approach, but it works.
Thank you very much for your help seth.

Offline

#15 2024-02-28 14:51:58

DJXJD
Member
Registered: 2024-02-28
Posts: 1

Re: Fonts of Subtitle Edit (mono) menus are badly rendered on Gnome

Hi there,

I'm currently having the same issue with Subtitle Edit on Hyprland (via xwayland), and I haven't been able to fix it based on whats here.
If anyone has been able to fix it in a way that would work on Hyprland, I would really appreciate any help I can get.

Thank you very much!

Offline

Board footer

Powered by FluxBB