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
[Bug]: Test a_report_measures_each_layout_page_with_its_own_page_number fails on Windows: Segoe UI fits the two-digit page numbers in two lines #3417
I searched the existing issues and did not find a duplicate.
This is a bug report, not a usage question (questions belong in Discussions).
What happened?
tests::layout_report_text::a_report_measures_each_layout_page_with_its_own_page_number
(crates/engine/src/tests/layout_report_text.rs, added in #3215) fails on Windows on every run,
including alone:
assertion `left == right` failed
left: []
right: ["The report, layout \"Sheet\": Text is cut off in 1 layout element(s): Text (7); resize or move the text, or reduce its size"]
The test puts {page} eight times in an 18 × 6 mm box at 10 pt, which holds two lines, and expects
page 10's two-digit numbers to wrap to three lines. Whether they do depends on the font: layout text
is measured with the installed font (crates/render/src/fonts.rs), which is Segoe UI on Windows.
Measured with rustgis_render::layout::wrapped_lines(text, 18.0, 10.0, …):
With RUSTGIS_BUILTIN_FONTS=1 the test passes on the same machine. (The other layout_report_text tests pass with both fonts. A whole-workspace run with the built-in font isn't a clean alternative: render and ui-egui tests that expect an installed font then fail.)
It may also be why main's Windows test jobs went red: test / Test (windows-latest) passed on 9fbbdd4 (2026-11-28 10:17 UTC) and has failed on every finished main run since #3215 landed
(c3ccc31, 11:16 UTC), while Linux passes. macOS was failing before #3215, so that's something else.
Steps to reproduce
On Windows 11 with Segoe UI installed (the default):
cargo test -p rustgis-engine --lib -- tests::layout_report_text::a_report_measures_each_layout_page_with_its_own_page_number
Then the same with RUSTGIS_BUILTIN_FONTS=1 set: it passes.
Expected behavior
The test passes whatever font is installed. One way: choose the box width from the font's own
measures (with wrapped_lines), so that one-digit page numbers fit in two lines and two-digit ones
need a third, rather than relying on a fixed 18 mm.
This was already fixed by #3397 (6668f9e), which merged about two hours before I filed this.
The test now runs in a child process with RUSTGIS_BUILTIN_FONTS=1. On current main (f551803)
it passes on Windows 11 with Segoe UI installed, along with the other layout_report_text tests.
I filed this from a checkout that predated the fix, so I'm closing it.
Activity
dwarburg commentedon Nov 30, 2026
This was already fixed by #3397 (6668f9e), which merged about two hours before I filed this.
The test now runs in a child process with
RUSTGIS_BUILTIN_FONTS=1. On currentmain(f551803)it passes on Windows 11 with Segoe UI installed, along with the other
layout_report_texttests.I filed this from a checkout that predated the fix, so I'm closing it.