Skip to content

[Bug]: a layout title test fails on Windows, macOS and some Linux: its map names fit the title box in other fonts #3043

Done

Description

@jgregoriorincon

What happens
tests::layout_title::a_wrapped_map_title_is_sized_for_its_drawn_lines (added in #2972) fails on main on Windows, windows-11-arm and macOS since that merge, and on Fedora with Noto Sans. It passes on Ubuntu. The failing line is assert!(wraps(&s, li, "Title"), "{style}") for classic.

Why
Its four map names were picked to sit at the wrap boundary in the fonts of the Ubuntu runner. The width is measured with the installed sans (Segoe UI, SF, Noto Sans, DejaVu Sans…), so in other fonts the classic name fits on one line, the title doesn't wrap, and the test's precondition fails. The sizing itself is right on every platform.

Fix
The test picks its names on the machine it runs on: a fixed-seed search over the same words for a name that wraps and that the sheet's line breaking counts differently from the drawn lines, then checks the box against the drawn lines. It panics if no such name turns up, so it never passes without testing. Test only.

Activity

  1. jgregoriorincon commented on Nov 26, 2026

    @jgregoriorincon
    ContributorAuthor

    I'll take this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions