How to deal with microscopic fonts in old Tk X11 apps on a 4K display?

I need to use some old, annoying software (Modelsim) that uses Tk/Tcl, and I’m going blind. It’s bad enough it’s on a blinding white background, but I can barely read these tiny fonts. I don’t want to scale up my entire UI, but even so I did try increasing the dpi for Xft… it made my KDE fonts huge but had no effect on this program.

I was wondering if anyone had any ideas?

Screenshot

System:
Kernel: 6.7.0-zen3-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc available: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=e47b5a22-506c-4573-b60f-520b613f7533 rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
drm.edid_firmware=DisplayPort-0:/edid/Samsung-EDID-RGB.bin ibt=off
Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: Gigabyte product: Z690 AERO D v: -CF
serial: <superuser required>
Mobo: Gigabyte model: Z690 AERO D serial: <superuser required>
UEFI: American Megatrends LLC. v: F28 date: 12/14/2023
CPU:
Info: model: 13th Gen Intel Core i7-13700K bits: 64 type: MST AMCP
arch: Raptor Lake gen: core 13 level: v3 note: check built: 2022+
process: Intel 7 (10nm) family: 6 model-id: 0xB7 (183) stepping: 1
microcode: 0x11D
Topology: cpus: 1x cores: 16 mt: 8 tpc: 2 st: 8 threads: 24 smt: enabled
cache: L1: 1.4 MiB desc: d-8x32 KiB, 8x48 KiB; i-8x32 KiB, 8x64 KiB
L2: 24 MiB desc: 8x2 MiB, 2x4 MiB L3: 30 MiB desc: 1x30 MiB
Speed (MHz): avg: 924 high: 1102 min/max: 800/5300:5400:4200 scaling:
driver: intel_pstate governor: powersave cores: 1: 1100 2: 1101 3: 1102
4: 1101 5: 800 6: 800 7: 1101 8: 800 9: 1100 10: 800 11: 1096 12: 1099
13: 1100 14: 800 15: 1100 16: 800 17: 797 18: 800 19: 800 20: 800 21: 800
22: 800 23: 800 24: 800 bogomips: 164044
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: AMD Navi 21 [Radeon RX 6950 XT] vendor: XFX driver: amdgpu
v: kernel arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22
pcie: gen: 4 speed: 16 GT/s lanes: 16 ports: active: DP-1
empty: DP-2,DP-3,HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:73a5
class-ID: 0300
Device-2: Razer USA Gaming Webcam [Kiyo] driver: snd-usb-audio,uvcvideo
type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.1:7
chip-ID: 1532:0e03 class-ID: 0102
Device-3: MacroSilicon USB Video
driver: hid-generic,snd-usb-audio,usbhid,uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.4:9 chip-ID: 534d:2109
class-ID: 0300
Device-4: Elgato Systems GmbH Game Capture HD60 X
driver: hid-generic,snd-usb-audio,usbhid,uvcvideo type: USB rev: 3.0
speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-2.1:4
chip-ID: 0fd9:0082 class-ID: 0300 serial: <filter>
Device-5: AVerMedia USB Device driver: snd-usb-audio,uvcvideo type: USB
rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-3.2:7
chip-ID: 07ca:0110 class-ID: 0102 serial: <filter>
Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4
compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting,radeon
alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x571mm (40.00x22.48")
s-diag: 1165mm (45.88")
Monitor-1: DP-1 mapped: DisplayPort-0 model: Samsung serial: <filter>
built: 2021 res: 3840x2160 hz: 60 dpi: 52 gamma: 1.2
size: 1872x1053mm (73.7x41.46") diag: 801mm (31.5") ratio: 16:9 modes:
max: 3840x2160 min: 720x400
API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
device: 1 drv: swrast surfaceless: drv: radeonsi x11: drv: radeonsi
inactive: gbm,wayland
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.3.3-arch1.1
glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6950 XT (radeonsi
navi21 LLVM 16.0.6 DRM 3.56 6.7.0-zen3-1-zen) device-ID: 1002:73a5
memory: 15.62 GiB unified: no
API: Vulkan v: 1.3.274 layers: 13 device: 0 type: discrete-gpu name: AMD
Radeon RX 6950 XT (RADV NAVI21) driver: mesa radv v: 23.3.3-arch1.1
device-ID: 1002:73a5 surfaces: xcb,xlib device: 1 type: cpu name: llvmpipe
(LLVM 16.0.6 256 bits) driver: mesa llvmpipe v: 23.3.3-arch1.1 (LLVM
16.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
Device-1: Intel Alder Lake-S HD Audio vendor: Gigabyte driver: snd_hda_intel
v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 00:1f.3
chip-ID: 8086:7ad0 class-ID: 0403
Device-2: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel
pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab28
class-ID: 0403
Device-3: PreSonus Audio AudioBox USB driver: snd-usb-audio type: USB
rev: 1.1 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-12.3:18
chip-ID: 194f:0302 class-ID: 0103
Device-4: Giga-Byte USB Audio driver: hid-generic,snd-usb-audio,usbhid
type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-2:2
chip-ID: 0414:a00b class-ID: 0300
Device-5: Razer USA Gaming Webcam [Kiyo] driver: snd-usb-audio,uvcvideo
type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.1:7
chip-ID: 1532:0e03 class-ID: 0102
Device-6: MacroSilicon USB Video
driver: hid-generic,snd-usb-audio,usbhid,uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.4:9 chip-ID: 534d:2109
class-ID: 0300
Device-7: Elgato Systems GmbH Game Capture HD60 X
driver: hid-generic,snd-usb-audio,usbhid,uvcvideo type: USB rev: 3.0
speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-2.1:4
chip-ID: 0fd9:0082 class-ID: 0300 serial: <filter>
Device-8: AVerMedia USB Device driver: snd-usb-audio,uvcvideo type: USB
rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-3.2:7
chip-ID: 07ca:0110 class-ID: 0102 serial: <filter>
API: ALSA v: k6.7.0-zen3-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 1.0.1 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Alder Lake-S PCH CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:7af0 class-ID: 0280
IF: wlo1 state: up mac: <filter>
Device-2: Aquantia AQC113C NBase-T/IEEE 802.3bz Ethernet [AQtion]
vendor: Gigabyte driver: atlantic v: kernel pcie: gen: 3 speed: 8 GT/s
lanes: 2 port: N/A bus-ID: 08:00.0 chip-ID: 1d6a:14c0 class-ID: 0200
temp: 44.0 C
IF: enp8s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-3: Intel Ethernet I225-V vendor: Gigabyte driver: igc v: kernel
pcie: gen: 2 speed: 5 GT/s lanes: 1 port: N/A bus-ID: 09:00.0
chip-ID: 8086:15f3 class-ID: 0200
IF: enp9s0 state: down mac: <filter>
Bluetooth:
Device-1: Intel AX211 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:21 chip-ID: 8087:0033
class-ID: e001
Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.3
lmp-v: 12 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
Local Storage: total: 16.61 TiB used: 1.87 TiB (11.2%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital
model: WD BLACK SN850X 2000GB size: 1.82 TiB block-size: physical: 512 B
logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 620331WD temp: 50.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:3 vendor: Western Digital
model: WD BLACK SN770 1TB size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 731100WD temp: 56.9 C scheme: GPT
ID-3: /dev/nvme2n1 maj-min: 259:5 vendor: Western Digital
model: WD BLACK SN770 1TB size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 731100WD temp: 54.9 C scheme: GPT
ID-4: /dev/sda maj-min: 8:0 vendor: HGST (Hitachi) model: HUS724040ALA640
size: 3.64 TiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 7200 serial: <filter> fw-rev: AA70 scheme: GPT
ID-5: /dev/sdb maj-min: 8:16 vendor: HGST (Hitachi) model: HUS724040ALA640
size: 3.64 TiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 7200 serial: <filter> fw-rev: AC50 scheme: GPT
ID-6: /dev/sdc maj-min: 8:32 vendor: SanDisk model: X110 2.5 7MM 256GB
size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 412 scheme: GPT
ID-7: /dev/sdd maj-min: 8:48 vendor: Seagate model: ST2000DM008-2FR102
size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 7200 serial: <filter> fw-rev: 0001 scheme: GPT
ID-8: /dev/sde maj-min: 8:64 vendor: HGST (Hitachi) model: HMS5C4040BLE640
size: 3.64 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 5700 serial: <filter> fw-rev: A5D0 scheme: GPT
Partition:
ID-1: / raw-size: 1.82 TiB size: 1.82 TiB (100.00%) used: 1.4 TiB (77.0%)
fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 1.3 MiB (0.4%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
used: 1.4 TiB (77.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
used: 1.4 TiB (77.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 1.82 TiB size: 1.82 TiB (100.00%)
used: 1.4 TiB (77.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 62.61 GiB used: 509.8 MiB (0.8%)
priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 24
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 35.0 C mobo: N/A gpu: amdgpu temp: 54.0 C
mem: 54.0 C
Fan Speeds (rpm): N/A gpu: amdgpu fan: 1073
Info:
Processes: 605 Uptime: 2h 57m wakeups: 0 Memory: total: 64 GiB note: est.
available: 62.62 GiB used: 9.77 GiB (15.6%) Init: systemd v: 255
default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
Packages: pm: pacman pkgs: 2199 libs: 596 tools: octopi,paru,yay pm: rpm
pkgs: 0 Shell: fish v: 3.7.0 default: Bash v: 5.2.26 running-in: konsole
inxi: 3.3.31
Garuda (2.6.22-1):
System install date:     2023-05-03
Last full system update: 2024-01-23
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       No/Undetected
Failed units:

Try launching your application (gtk or Qt?) with the environment variables suggested here.

1 Like

Unfortunately that doesn’t work. I haven’t found any environment variables that affects it. It’s neither GTK nor QT, it’s TK.

Do the global scale settings help at all? That’s what I’d try first. It will change the size of everything, but I think it will affect that program too.

Alternatively, you could change what resolution your monitor is using to something lower like 1080p. Again, not a perfect long term solution, but it would be pretty easy to switch back from when you use other applications.

Both of these options are in System Settings | Display configuration.

No, global scale settings don’t work… at least none that I’ve found.
I already have my global scale in the KDE display settings increased to 125% so I can read.

But just to be 100% certain, I increased it to 200%… and now my display is frozen and I can’t do anything. I’m trying to figure out how to reset the settings but nothing I’ve done has worked. All I have is a mouse cursor.

This is awesome.

Does anyone know how to reset the KDE display settings in a terminal without deleting half my config files? I can ssh in to my computer. I tried booting to a snapshot but that doesn’t help at all because my config files are in my home directory.

Edit:

So it wasn’t frozen, it’s just that everything was so big I couldn’t see or do anything. I remembered I have a hotkey to open a terminal, so I did that and then ran systemsettings from the terminal, which let me set my screen scaling back to 125%

But as frustrating as that was, it did help. Once I realized I could fix it, I first opened Modelsim and discovered some fonts were actually scaled up huge, but the important ones were still tiny. So that tells me it’s just not possible… they must have hardcoded the font sizes.

The only other possible option I can think of that doesn’t make my workspace intolerable (1080p on a 32" 4K monitor is just not something I can deal with)… is maybe setting the resolution of a virtual desktop lower, so just that program can exist there. But I’m guessing that’s probably not possible. I’ll have to research it…

Ok, I found a solution. I finally have a reason to use KDE Activities. You can run scripts when you switch to an activity so I made a script that changes resolution back and forth with xrandr. I think this is the best solution I’m going to find.

The only minor issue with it is that it runs the script as soon as I meta-tab, not when the switch is complete. This means I cannot hover back and forth or even see the activity choices before it changes resolution. This would be fine except a resolution change blacks out my screen for about 3 seconds.

I’m considering my problem solved, but if anyone knows a way to make an activity script not run until having finished entering the activity and releasing the hotkeys… please comment here. Thanks.

Edit:

Well this is ridiculous but once I could actually read the fonts in Modelsim I found where you can manually set each font size. I tediously went through and changed each font point size from 12 to 18 and now I don’t even need to use my low resolution activity. But it’s still really handy that I can switch to low resolution like that… this isn’t the last time I will need to navigate tiny ureadable menus in old programs.

If anyone else wants to set this up with activities, this is the post I found that explains how to do it:
https://www.reddit.com/r/kde/comments/rqvgr2/run_custom_scripts_when_launching_activities/

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.