Pixelated Text Anki in Hyprland and Plasma-Wayland with scaling 1.25

[phoenix@ArchLinux ~]$ echo $ANKI_WAYLAND 
1
[phoenix@ArchLinux ~]$ echo $QT_QPA_PLATFORM 
wayland

even after setting these variable , its still looking pixelated.

Version ⁨2.1.65 (aa9a734f)⁩
Python 3.11.5 Qt 6.5.2 PyQt 6.5.2
OS: Arch Linux x86_64
Kernel: 6.4.12-arch1-1
DE: Hyprland

Are you using the official binary build from the Anki website, or your distro’s package?

I have two builds, both showing same behaviour.

  1. https://aur.archlinux.org/packages/anki-bin
  2. Anki-beta using Pip method https://betas.ankiweb.net/

console Output AnkiBeta->

[phoenix@ArchLinux ~]$ pyenv/bin/anki
Running with temporary Qt5 compatibility shims.
Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
Preparing to run...
Qt warning: QGuiApplication::setDesktopFileName: the specified desktop file name ends with .desktop. For compatibility reasons, the .desktop suffix will be removed. Please specify a desktop file name without .desktop suffix 
1021636467 inserted a new menu.
gettext _() is deprecated: Postpone cards
gettext _() is deprecated: Postpone cards
addons21/149564514/defer_cards.py:20:intTime is deprecated: please use 'int_time'
addons21/149564514/config.py:11:json is deprecated: please implement your own
addons21/295889520/main.py:18:isWin is deprecated: please use 'is_win'
addons21/295889520/main.py:18:isMac is deprecated: please use 'is_mac'
874215009/advancedbrowser/internal_fields.py:8:intTime is deprecated: please use 'int_time'
Starting main loop...
conf key heatmap should be fetched with col.get_config(), and saved with col.set_config()
conf key heatmap should be fetched with col.get_config(), and saved with col.set_config()
conf key heatmap should be fetched with col.get_config(), and saved with col.set_config()
['_ch-pygments-solarized.css', '_ch-hljs-solarized.css']
conf key imgocc should be fetched with col.get_config(), and saved with col.set_config()
conf key imgocc should be fetched with col.get_config(), and saved with col.set_config()
conf key imgocc should be fetched with col.get_config(), and saved with col.set_config()

Given that it happens with both system and bundled Qt libraries, I’m guessing it’s some font-related issue. Your distro’s forums may have some ideas.

I asked on https://bbs.archlinux.org/viewtopic.php?pid=2118687#p2118687 , and then found out that Anki was running on wayland, QT_QPA_PLATFORM=wayland and ANKI_WAYLAND=1 were set , so is it known bug that pixalation will ocuur in wayland or is it just me facing this ?

If i set QT_QPA_PLATFORM=xcb , then anki runs on xwayland and font renders perfectly.

But the problem is , i 't want to keep QT_QPA_PLATFORM=wayland for other QT programs.

Is there a way to make only force anki to run on xwayland ? i tried ANKI_WAYLAND=0 but it dosen’t change anything and anki still runs on wayland.

I use Sway (Wayland) and fonts are nice and crisp, so I’m not sure what the problem could be. You could make a simple wrapper script that sets QT_QPA_PLATFORM and then invokes Anki if you don’t want to have the setting applied globally.

1 Like

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