You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CI] The Windows job measures dialog layouts without fonts #863
The Windows CI job measures every dialog layout with no fonts, so its GUI geometry tests do not test real Windows.
The workflow sets QT_QPA_PLATFORM=offscreen (.github/workflows/test.yml, the line that writes it to GITHUB_ENV). On Windows the offscreen plugin uses QFreeTypeFontDatabase, which reads only QT_QPA_FONTDIR or Qt's own lib/fonts folder and never C:\Windows\Fonts. Qt then draws every text with its fallback box font (height 16, leading 3 at 16 pixels). That is how #834 happened: the row height test failed on Windows CI only, while the real Windows desktop was never affected (the captures before and after #835 are identical, see #862).
Possible fix, not tried yet: set QT_QPA_FONTDIR=C:\Windows\Fonts in the Windows job, or run the layout tests there with the native windows platform, then check which geometry tests move.
Research: the workflow only writes QT_QPA_PLATFORM=offscreen in the Linux step (test.yml#L132). On Windows the offscreen platform comes from the GUI tests themselves through os.environ.setdefault("QT_QPA_PLATFORM", "offscreen") (for example tests/test_eegplot_gui.py#L19). Either way, the Windows job runs offscreen Qt with no fonts.
Added a Windows-only step to the test job that writes QT_QPA_FONTDIR=C:\Windows\Fonts to GITHUB_ENV (commit on local branch agent/20261129-fix-863)
Blocked: GitHub refused the push: refusing to allow a GitHub App to create or update workflow .github/workflows/test.yml without workflows permission. A maintainer needs to apply the patch below. No PR has been opened, and the Windows job has not run with this change.
--- a/.github/workflows/test.yml+++ b/.github/workflows/test.yml@@ -131,6 +131,15 @@
libxcb-xinerama0
echo "QT_QPA_PLATFORM=offscreen" >> "$GITHUB_ENV"
+ # Qt's offscreen platform on Windows reads fonts only from QT_QPA_FONTDIR or+ # Qt's own lib/fonts, never the system folder; without this every dialog is+ # measured with Qt's fallback box font instead of Segoe UI (#863).+ - name: Point offscreen Qt at the Windows fonts+ if: runner.os == 'Windows'+ shell: bash+ run: |+ echo 'QT_QPA_FONTDIR=C:\Windows\Fonts' >> "$GITHUB_ENV"+
- name: Determine MATLAB availability
After applying it, check the Windows job for geometry tests that change (for example the _row_height test from #834/#835). If QFreeTypeFontDatabase cannot load Segoe UI from that folder, the fallback is to drop the offscreen default on Windows and use the native windows platform.
Activity
claude commentedon Nov 29, 2026
🤖 Plan:
QT_QPA_PLATFORM=offscreenin the Linux step (test.yml#L132). On Windows the offscreen platform comes from the GUI tests themselves throughos.environ.setdefault("QT_QPA_PLATFORM", "offscreen")(for exampletests/test_eegplot_gui.py#L19). Either way, the Windows job runs offscreen Qt with no fonts.testjob that writesQT_QPA_FONTDIR=C:\Windows\FontstoGITHUB_ENV(commit on local branchagent/20261129-fix-863)refusing to allow a GitHub App to create or update workflow .github/workflows/test.yml without workflows permission. A maintainer needs to apply the patch below. No PR has been opened, and the Windows job has not run with this change.After applying it, check the Windows job for geometry tests that change (for example the
_row_heighttest from #834/#835). IfQFreeTypeFontDatabasecannot load Segoe UI from that folder, the fallback is to drop the offscreen default on Windows and use the nativewindowsplatform.